CIDR Cheat Sheet
This table lists every IPv4 CIDR prefix from /0 to /32 with the corresponding subnet mask, wildcard mask, address count, and usable host count. Click any prefix to see detailed examples and use cases. Working with IPv6? See the IPv6 cheat sheet.
| CIDR | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts | Network Bits | Host Bits |
|---|---|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 32 | 0 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | 31 | 1 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 30 | 2 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 29 | 3 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 28 | 4 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 27 | 5 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 26 | 6 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 25 | 7 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 24 | 8 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 23 | 9 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 22 | 10 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 21 | 11 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 20 | 12 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 19 | 13 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 18 | 14 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 17 | 15 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 16 | 16 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 15 | 17 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 14 | 18 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 13 | 19 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 12 | 20 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 11 | 21 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 10 | 22 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 9 | 23 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 8 | 24 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 | 7 | 25 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 | 6 | 26 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 | 5 | 27 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 | 4 | 28 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 | 3 | 29 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 | 2 | 30 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 | 1 | 31 |
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 | 0 | 32 |
Usable hosts excludes the network and broadcast addresses, except for /31 (point-to-point, RFC 3021) and /32 (single host).
Understanding CIDR Notation
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network prefix. The number after the slash indicates how many of the 32 bits in an IPv4 address are dedicated to the network portion. A smaller prefix length like /8 means fewer network bits and more host bits, resulting in a larger network with more available addresses. A larger prefix like /28 allocates more bits to the network and fewer to hosts, creating a smaller subnet. This system replaced the older classful addressing scheme (Class A, B, C) and allows for far more flexible and efficient allocation of IP address space.
Subnet Mask Chart by Network Size
The same 33 prefixes grouped by the job they do, for picking a size rather than looking one up.
/8 – /15
255.0.0.0 – 255.254.0.0
ISP and large enterprise allocations. Rarely a single broadcast domain.
/16 – /23
255.255.0.0 – 255.255.254.0
Campus and site-wide ranges, usually subdivided further before use.
/24
255.255.255.0
The standard LAN. 254 usable hosts, and the default assumption in most documentation.
/25 – /29
255.255.255.128 – 255.255.255.248
VLANs, cloud subnets and small offices. 126 down to 6 usable hosts.
/30 – /32
255.255.255.252 – 255.255.255.255
Point-to-point links, loopbacks and host routes.
/0 – /7
0.0.0.0 – 254.0.0.0
Default routes and global aggregates seen in BGP, not assigned to hosts.
Wildcard Masks
The wildcard mask column above is the bitwise inverse of the subnet mask, and it is the form Cisco access lists, OSPF and EIGRP expect. For the inverse masks on their own, with the conversion rule and worked ACL examples, see the wildcard mask cheat sheet.
Common Subnet Sizes
- /24 — 254 usable hosts. The standard subnet for most LANs and small office networks.
- /16 — 65,534 usable hosts. Common for campus networks and large enterprise environments.
- /30 — 2 usable hosts. Ideal for point-to-point links between routers.
- /32 — Single host address. Used for loopback interfaces and host routes.
Private vs Public Subnets
RFC 1918 defines three IPv4 address ranges reserved for private use. These addresses are not routable on the public internet and can be freely used within internal networks:
- 10.0.0.0/8 — 16,777,216 addresses (Class A private range)
- 172.16.0.0/12 — 1,048,576 addresses (Class B private range)
- 192.168.0.0/16 — 65,536 addresses (Class C private range)
Any address outside these ranges is considered public and must be assigned by a Regional Internet Registry (RIR). Most home and corporate networks use private addresses internally along with NAT (Network Address Translation) for internet access.