IPv4 subnet cheat sheet

IPv4 CIDR prefix lengths with their subnet masks and host counts. Use the subnet calculator for the exact network, broadcast and range of any address.

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/23255.255.254.0512510
/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

Reading the table

Usable hosts is total addresses minus 2: the first address is the network address and the last is the broadcast address. The exceptions are /31 (point-to-point links, both addresses usable) and /32 (a single host).

Copied to clipboard