CIDR Cheat Sheet
Every prefix from /8 to /30 with its dotted-decimal mask, wildcard mask and usable host count. Highlighted rows are the masks the CCNA exam loves most.
| CIDR | Subnet mask | Wildcard | Usable hosts | /24 subnets |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,214 | 1 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,606 | — |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,302 | — |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,150 | — |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,574 | — |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,286 | — |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,142 | — |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,070 | — |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,534 | 256 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,766 | 512 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,382 | 1,024 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,190 | 2,048 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,094 | 4,096 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,046 | 8,192 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,022 | 16,384 |
| /23 | 255.255.254.0 | 0.0.1.255 | 510 | 32,768 |
| /24 | 255.255.255.0 | 0.0.0.255 | 254 | 65,536 |
| /25 ★ | 255.255.255.128 | 0.0.0.127 | 126 | — |
| /26 ★ | 255.255.255.192 | 0.0.0.63 | 62 | — |
| /27 ★ | 255.255.255.224 | 0.0.0.31 | 30 | — |
| /28 ★ | 255.255.255.240 | 0.0.0.15 | 14 | — |
| /29 ★ | 255.255.255.248 | 0.0.0.7 | 6 | — |
| /30 ★ | 255.255.255.252 | 0.0.0.3 | 2 | — |
How to read it: usable hosts = 2^(32 − prefix) − 2 (network and broadcast addresses are reserved; /31 is the point-to-point exception with 2 usable). Wildcard = 255.255.255.255 minus the mask — it's what goes in ACLs and OSPF network statements. The ★ rows are the exam favourites: learn /26, /27 and /28 cold.
The 10-second conversions
Mask ↔ CIDR: count the 1-bits. Block size: 256 − interesting octet of the mask (e.g. /26 → 255.255.255.192 → 256−192 = 64 → subnets step by 64: .0, .64, .128, .192). Wildcard: interesting octet = block size − 1 (e.g. /26 → block size 64 → wildcard .63). Practice until it's reflex with our free subnetting drill.
Memorised the table? Prove it.
The free 25-question CCNA mock test hits subnetting hard — take it now and get your score in minutes.
Start the free mock test