plain/devtools home

CIDR /24: how many hosts?

A /24 holds 256 IPv4 addresses and 254 usable hosts. The netmask is 255.255.255.0: the first 24 bits are the network and the last 8 bits address hosts.

Last reviewed 2026-11-04.

cidr-calculatorsamplesCtrl↵ run · s sample

Is an IP inside this block?

Split into smaller subnets

never leaves your browser

Worked example: 192.168.1.0/24

ItemValue
Network address192.168.1.0
First usable host192.168.1.1
Last usable host192.168.1.254
Broadcast address192.168.1.255
Netmask255.255.255.0
Wildcard mask0.0.0.255
Total addresses256
Usable hosts254

Why 254 and not 256

The first address names the network and the last is the broadcast address, so neither is given to a host: 256 minus 2 is 254.

Cloud differences

AWS reserves five addresses in every subnet (the first four and the last), so a /24 subnet in a VPC has 251 usable addresses. AWS allows subnet sizes from /16 to /28.

Splitting a /24

  • Two /25 subnets, 128 addresses each (126 usable).
  • Four /26 subnets, 64 addresses each (62 usable).
  • Eight /27 subnets, 32 addresses each (30 usable).

For every prefix from /8 to /32 see the CIDR subnet size table. A bigger network is a /16.

Running this on a server

Planning a /24 usually means planning a private network for a few servers. The hosting guide compares VPS options that offer private networking.

Frequently asked questions

How many hosts in a /24?

254 usable hosts, out of 256 addresses.

What is the subnet mask for /24?

255.255.255.0.

Is a /24 the same as a Class C?

In the old classful system, yes: a Class C network was a /24. Modern routing uses CIDR and ignores classes.

Sources

Related

esc
↑↓ move↵ open? all shortcuts

Keyboard shortcuts

Cmd or Ctrl shortcuts always work.
Everywhere
Everywhere
Open the command palette
CtrlK
Open the palette (outside a text field)
/
Show these shortcuts
?
Toggle light and dark theme
t
Go home
gh
Go to all tools
gt
On a tool page
On a tool page
Run the main action
Ctrl↵
Copy the output
c
Load the next sample
s
Focus the input
i
Leave a text field
Esc
Previous or next tool
[]
In the palette
In the palette
Move the selection
↑↓
Open the selected item
↵
Close
Esc