IPv4 subnet cheat sheet
Each step down in prefix length doubles the size of the network: a /24 has 256 addresses, a /23 512, a /22 1,024. Usable hosts are the total minus 2 (the network and broadcast addresses), except for /31 and /32.
Worked example: 10.0.0.0/8. Type any block to compare.
10.0.0.0/8 is 16,777,216 addresses: 10.0.0.0 to 10.255.255.255. 16,777,214 usable for hosts (the first is the network address, the last is broadcast).
- Network
10.0.0.0- First usable
10.0.0.1- Last usable
10.255.255.254- Broadcast
10.255.255.255- Addresses
16,777,216- Usable hosts
16,777,214- Netmask
255.0.0.0- Wildcard (ACL) mask
0.255.255.255- Historic class
A- Range type
Private network · not routed on the internet
Special-purpose range
Private network 10.0.0.0/8 RFC 1918
The largest of the three private IPv4 ranges: 16.7 million addresses for use inside homes and organisations. Not routed on the public internet.
IPv4 subnet table: /0 to /32
| Prefix | Netmask | Wildcard | Addresses | Usable hosts | /24s |
|---|---|---|---|---|---|
/0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 | 16777216 |
/1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 | 8388608 |
/2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 | 4194304 |
/3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 | 2097152 |
/4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 | 1048576 |
/5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 | 524288 |
/6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 | 262144 |
/7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 | 131072 |
/8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 65536 |
/9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 32768 |
/10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 16384 |
/11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 8192 |
/12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 4096 |
/13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 2048 |
/14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 1024 |
/15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 512 |
/16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 256 |
/17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 128 |
/18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 64 |
/19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 32 |
/20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 16 |
/21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 8 |
/22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 4 |
/23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 2 |
/24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 1/1 |
/25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 1/2 |
/26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 1/4 |
/27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 1/8 |
/28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 1/16 |
/29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 1/32 |
/30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 1/64 |
/31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | 1/128 |
/32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 1/256 |
Usable hosts subtract the network and broadcast addresses, except /31 (two usable, RFC 3021) and /32 (one). Cloud providers reserve more: AWS keeps 5 addresses in every subnet.
Split it into subnets
4 subnets.
| Subnet | Usable range | Hosts | Broadcast |
|---|---|---|---|
10.0.0.0/10 | 10.0.0.1 – 10.63.255.254 | 4,194,302 | 10.63.255.255 |
10.64.0.0/10 | 10.64.0.1 – 10.127.255.254 | 4,194,302 | 10.127.255.255 |
10.128.0.0/10 | 10.128.0.1 – 10.191.255.254 | 4,194,302 | 10.191.255.255 |
10.192.0.0/10 | 10.192.0.1 – 10.255.255.254 | 4,194,302 | 10.255.255.255 |
Is this IP in the range?
Range to CIDR blocks
What to know
The table lists every IPv4 prefix length with its dotted netmask, the number of addresses in one such network, and how many of them can be assigned to hosts. Prefixes that have their own page link to a full explanation with an example network.
To size a subnet, subtract any addresses your platform reserves from each row's usable count, then pick the smallest network that still covers your hosts with room to grow.
Gotchas
- /31 has 2 usable addresses on point-to-point links (RFC 3021), and /32 is a single address. Neither has a separate network or broadcast address.
- Cloud providers reserve more than two addresses per subnet: AWS and Azure reserve 5, Google Cloud reserves 4. A /28 in AWS has 11 usable addresses, not 14.
- A network address must be aligned to its size: a /26 starts on a multiple of 64 in the last octet, a /20 on a multiple of 16 in the third.
Related explainers
- What does /24 mean?A /24 has 256 addresses and 254 usable hosts with netmask 255.255.255.0. The typical home and office LAN,...
- What does /16 mean?A /16 fixes the first two octets: 65,536 addresses, 65,534 usable hosts, netmask 255.255.0.0. The largest...
- What does /8 mean?A /8 fixes the first octet and leaves 24 bits for hosts: 16,777,216 addresses, netmask 255.0.0.0. The old...
- What does /28 mean?A /28 has 16 addresses and 14 usable hosts, netmask 255.255.255.240. It is the smallest subnet AWS allows,...
- What does /31 mean?A /31 has 2 addresses and both are usable: RFC 3021 point-to-point links have no network or broadcast...
- What does /32 mean?A /32 is one IPv4 address: netmask 255.255.255.255, no network or broadcast. Used in firewall and security...