← Blog · May 16, 2026 · networking, subnet

CIDR Notation Cheatsheet: From /8 to /32

CIDR (Classless Inter-Domain Routing, RFC 4632) replaced the rigid Class A/B/C address scheme with a single number — the prefix length — that says how many bits identify the network. The rest are host bits. That's the whole concept. Here's the table everyone reaches for.

The table

PrefixSubnet maskWildcardUsable hosts
/8255.0.0.00.255.255.25516,777,214
/9255.128.0.00.127.255.2558,388,606
/10255.192.0.00.63.255.2554,194,302
/12255.240.0.00.15.255.2551,048,574
/14255.252.0.00.3.255.255262,142
/16255.255.0.00.0.255.25565,534
/18255.255.192.00.0.63.25516,382
/20255.255.240.00.0.15.2554,094
/22255.255.252.00.0.3.2551,022
/23255.255.254.00.0.1.255510
/24255.255.255.00.0.0.255254
/25255.255.255.1280.0.0.127126
/26255.255.255.1920.0.0.6362
/27255.255.255.2240.0.0.3130
/28255.255.255.2400.0.0.1514
/29255.255.255.2480.0.0.76
/30255.255.255.2520.0.0.32
/31255.255.255.2540.0.0.12 (RFC 3021)
/32255.255.255.2550.0.0.01 (host route)

Full table including every prefix from /0 to /32 is available as an interactive filter in the netmask cheatsheet.

Four things people get wrong

1. "A /24 has 256 hosts."

It has 256 addresses. Two are reserved (network + broadcast), leaving 254 usable. In a real LAN, one is the gateway, so plan capacity at 253. Apparent loss of capacity matters most at the small end: a /29 has 8 addresses but only 6 usable, and that's a 25% overhead.

2. "The .0 address is always the network."

Only if your prefix aligns to an octet boundary. A 10.0.5.64/26 has network 10.0.5.64 and broadcast 10.0.5.127 — the network bits cut through the middle of the last octet. To find any subnet's network address, AND the IP with the mask. Use the subnet calculator if you don't want to do binary math by hand.

3. "/31 has no usable hosts."

Pre-2000, yes — the two reserved-address rule chewed up both of them. RFC 3021 (2000) changed that for point-to-point links. A /31 now gives you 2 usable hosts and is the recommended way to address router-to-router links. Old gear may not support it; modern routers do.

4. "CIDR means classless, so classes are obsolete."

Half-true. The old A/B/C classes are gone for routing, but the boundaries still appear in RFC 1918 private space (10.0.0.0/8 was a Class A, 172.16.0.0/12 carves out part of a Class B, 192.168.0.0/16 was 256 Class C's). And multicast (224.0.0.0/4) is what used to be called Class D. The classes survive as historical addresses-assignments, not as routing semantics.

The math shortcuts

Related tools

← All blog posts