How to read a CIDR prefix
The number after the slash tells you how many of the 32 IPv4 bits identify the network. A /24 leaves eight host bits, producing 256 total addresses. In a conventional subnet, the network and broadcast addresses are reserved, leaving 254 usable host addresses.
Longer prefixes create smaller networks. Every one-bit increase halves the address count: a /25 has 128 total addresses, a /26 has 64 and a /27 has 32.
| CIDR | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | Point-to-point |
| /32 | 255.255.255.255 | 1 | Single address |
The /31 and /32 exceptions
RFC 3021 permits both addresses in a /31 to be used on a point-to-point link, where a separate network and broadcast address are unnecessary. A /32 identifies exactly one IPv4 address and is commonly used for a host route.
For an exact network, broadcast address and usable range, enter the address and prefix in the subnet calculator.