[ TL;DR ]

Complete IPv4 subnetting reference from /8 to /32. Each prefix shows its subnet mask, total addresses (2^(32 − prefix)), usable hosts (total − 2), block size (the step between subnets), and wildcard mask (inverse of the subnet mask). /24 → 256 addresses, 254 hosts, block 256, wildcard 0.0.0.255. Save it, print it, drill it.

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.

IPv4 subnetting cheat sheet showing CIDR prefixes /8 through /32 with subnet mask, block size, total addresses, usable hosts, and wildcard mask

★ HTML TABLE — COPY-PASTE FRIENDLY

PREFIX SUBNET MASK BLOCK SIZE TOTAL ADDRESSES USABLE HOSTS WILDCARD MASK
CLASS A REFERENCE
/8255.0.0.016,777,21616,777,21616,777,2140.255.255.255
THIRD OCTET INTERESTING — /16 THROUGH /23
/16255.255.0.025665,53665,5340.0.255.255
/17255.255.128.012832,76832,7660.0.127.255
/18255.255.192.06416,38416,3820.0.63.255
/19255.255.224.0328,1928,1900.0.31.255
/20255.255.240.0164,0964,0940.0.15.255
/21255.255.248.082,0482,0460.0.7.255
/22255.255.252.041,0241,0220.0.3.255
/23255.255.254.025125100.0.1.255
FOURTH OCTET INTERESTING — /24 THROUGH /32
/24255.255.255.02562562540.0.0.255
/25255.255.255.1281281281260.0.0.127
/26255.255.255.1926464620.0.0.63
/27255.255.255.2243232300.0.0.31
/28255.255.255.2401616140.0.0.15
/29255.255.255.2488860.0.0.7
/30255.255.255.2524420.0.0.3
/31255.255.255.25422p2p *0.0.0.1
/32255.255.255.25511host route0.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.
INTERACTIVE SUBNETTING DRILL ▶
[ ★ STUDY RESOURCES ]

Wendell Odom's OCG Library covers IPv4 subnetting + CIDR notation in Vol 1 chapters 11-13. Amazon affiliate.