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.
| CIDR | Subnet Mask | Wildcard | Total IPs | Usable Hosts | Notes |
|---|
Large Private
Medium Private
Small Private
Loopback
Link-Local (APIPA)
Multicast
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.