runs locally — no data sent
CIDR Cheat Sheet

Reference table of CIDR prefixes, subnet masks, wildcard masks, and host counts from /0 to /32. Filter by CIDR, mask, or host count to find the prefix you need.

CIDRSubnet MaskWildcardTotal IPsUsable HostsNotes
RFC 1918 Private Ranges

Large Private

10.0.0.0/8
10.0.0.0 – 10.255.255.255
16,777,214 usable hosts

Medium Private

172.16.0.0/12
172.16.0.0 – 172.31.255.255
1,048,574 usable hosts

Small Private

192.168.0.0/16
192.168.0.0 – 192.168.255.255
65,534 usable hosts

Loopback

127.0.0.0/8
127.0.0.1 – localhost
RFC 1122

Link-Local (APIPA)

169.254.0.0/16
Auto-assigned when no DHCP
RFC 3927

Multicast

224.0.0.0/4
224.0.0.0 – 239.255.255.255
RFC 1112
About CIDR

CIDR (Classless Inter-Domain Routing) replaced classful addressing in 1993 with RFC 1519. Before CIDR, IPv4 came in fixed sizes — Class A (/8, 16M hosts), Class B (/16, 65K hosts), Class C (/24, 256 hosts) — and you got whatever bucket the IANA decided your organization needed. The result was massive waste: a company that needed 500 addresses got a Class B with 64,500 unused, while another needing 300 got two Class Cs with awkward routing. CIDR threw out the buckets and let allocations be sized to actual need on any bit boundary.

A CIDR prefix tells you how many leading bits define the network — everything after is host space. /24 means 24 network bits, 8 host bits, so 2^8 = 256 total addresses. Subtract two for the network address (all host bits zero) and broadcast (all host bits one) and you get 254 usable. Each bit you add to the prefix halves the block; each bit you remove doubles it. /25 = 128 addresses, /23 = 512.

Two prefix lengths are special. /31 is defined by RFC 3021 for point-to-point links: with only two addresses, the standard "network and broadcast" rules don't make sense, so both addresses are usable as host addresses. This saves IP space on the WAN links between routers, where a /30 (four addresses, two usable) was the historical convention. /32 is a host route — a single address, no subnetting. Used for loopback interfaces, anycast services, and policy routing where you want to match exactly one address.

CIDR also enables summarization — combining contiguous smaller blocks into a single larger advertisement to keep routing tables small. Two adjacent /24s on a power-of-two boundary (e.g., 10.1.0.0/24 and 10.1.1.0/24) summarize to 10.1.0.0/23. Without summarization the global BGP table would already be unmanageable; with it, ISPs can carry hundreds of customers' routes in a few aggregate prefixes. The subnet calculator shows the bit math behind any prefix you punch in.

Related Tools
Subnet Calculator Wildcard Mask Calculator IPv6 Reference