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.

IPv4 CIDR prefix reference
CIDRSubnet maskTotal addressesUsable hosts
/8255.0.0.016,777,21616,777,214
/12255.240.0.01,048,5761,048,574
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.2542Point-to-point
/32255.255.255.2551Single 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.

Technical references