Every prefix from /8 to /32 in one place. Subnet mask, block size, total address count, usable hosts, and wildcard mask. Save the image, bookmark the page, or use the HTML table below to copy and paste.
The block size is the number you count by when finding subnet boundaries — it equals 256 minus the last non-255 octet of the subnet mask. For /27 (mask 255.255.255.224): block = 256 − 224 = 32. Subnets start at .0, .32, .64, .96 and so on in the fourth octet. If that concept is new, the full explanation is here.
★ CHEAT SHEET — SAVE OR BOOKMARK
Right-click the image to save. The SVG scales cleanly at any size.
★ HTML TABLE — COPY-PASTE FRIENDLY
| PREFIX | SUBNET MASK | BLOCK SIZE | TOTAL ADDRESSES | USABLE HOSTS | WILDCARD MASK |
|---|---|---|---|---|---|
| CLASS A REFERENCE | |||||
| /8 | 255.0.0.0 | 16,777,216 | 16,777,216 | 16,777,214 | 0.255.255.255 |
| THIRD OCTET INTERESTING — /16 THROUGH /23 | |||||
| /16 | 255.255.0.0 | 256 | 65,536 | 65,534 | 0.0.255.255 |
| /17 | 255.255.128.0 | 128 | 32,768 | 32,766 | 0.0.127.255 |
| /18 | 255.255.192.0 | 64 | 16,384 | 16,382 | 0.0.63.255 |
| /19 | 255.255.224.0 | 32 | 8,192 | 8,190 | 0.0.31.255 |
| /20 | 255.255.240.0 | 16 | 4,096 | 4,094 | 0.0.15.255 |
| /21 | 255.255.248.0 | 8 | 2,048 | 2,046 | 0.0.7.255 |
| /22 | 255.255.252.0 | 4 | 1,024 | 1,022 | 0.0.3.255 |
| /23 | 255.255.254.0 | 2 | 512 | 510 | 0.0.1.255 |
| FOURTH OCTET INTERESTING — /24 THROUGH /32 | |||||
| /24 | 255.255.255.0 | 256 | 256 | 254 | 0.0.0.255 |
| /25 | 255.255.255.128 | 128 | 128 | 126 | 0.0.0.127 |
| /26 | 255.255.255.192 | 64 | 64 | 62 | 0.0.0.63 |
| /27 | 255.255.255.224 | 32 | 32 | 30 | 0.0.0.31 |
| /28 | 255.255.255.240 | 16 | 16 | 14 | 0.0.0.15 |
| /29 | 255.255.255.248 | 8 | 8 | 6 | 0.0.0.7 |
| /30 | 255.255.255.252 | 4 | 4 | 2 | 0.0.0.3 |
| /31 | 255.255.255.254 | 2 | 2 | p2p * | 0.0.0.1 |
| /32 | 255.255.255.255 | 1 | 1 | host route | 0.0.0.0 |
[ * /31 EXCEPTION — RFC 3021 ]
Normal subnets reserve the network address (first) and broadcast address (last), leaving the rest as usable hosts. /31 breaks this rule. RFC 3021 allows both addresses to be used as host endpoints on a point-to-point link — no network address, no broadcast. Only applies between two devices (router-to-router, etc). Don't apply normal host math here.
[ ★ PUT IT TO WORK ]
Use the interactive practice tool to drill these numbers until they're automatic. Random CIDR questions, per-field answer checking, no login required.
SUBNET PRACTICE ▶