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.
Is an IP inside this block?
Split into smaller subnets
Worked example: 192.168.1.0/24
| Item | Value |
|---|---|
| Network address | 192.168.1.0 |
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Broadcast address | 192.168.1.255 |
| Netmask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Total addresses | 256 |
| Usable hosts | 254 |
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
- RFC 4632: CIDR address allocation checked 2026-11-04
- AWS VPC: Subnet CIDR blocks checked 2026-11-04