Skip to content
Fresh IPv4 news just dropped — 🎉 see what you’re missing

CIDR Chart: Prefix, Mask and Host Counts

Reviewed by Marek Dvořák, Network engineer

An IPv4 prefix /n contains 2^(32 − n) addresses. The chart maps every prefix from /0 to /32 to its subnet mask, wildcard mask, total addresses and usable-host count. Usable-host counts depend on the subnet type and deployment; the notes below explain the exceptions.

Full chart, /0 to /32

PrefixSubnet maskWildcard maskTotal addressesUsable hostsEquivalent
/00.0.0.0255.255.255.2554,294,967,2964,294,967,294entire IPv4 space
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646128 /8s
/2192.0.0.063.255.255.2551,073,741,8241,073,741,82264 /8s
/3224.0.0.031.255.255.255536,870,912536,870,91032 /8s
/4240.0.0.015.255.255.255268,435,456268,435,45416 /8s
/5248.0.0.07.255.255.255134,217,728134,217,7268 /8s
/6252.0.0.03.255.255.25567,108,86467,108,8624 /8s
/7254.0.0.01.255.255.25533,554,43233,554,4302 /8s
/8255.0.0.00.255.255.25516,777,21616,777,2141 /8
/9255.128.0.00.127.255.2558,388,6088,388,606128 /16s
/10255.192.0.00.63.255.2554,194,3044,194,30264 /16s
/11255.224.0.00.31.255.2552,097,1522,097,15032 /16s
/12255.240.0.00.15.255.2551,048,5761,048,57416 /16s
/13255.248.0.00.7.255.255524,288524,2868 /16s
/14255.252.0.00.3.255.255262,144262,1424 /16s
/15255.254.0.00.1.255.255131,072131,0702 /16s
/16255.255.0.00.0.255.25565,53665,534256 /24s
/17255.255.128.00.0.127.25532,76832,766128 /24s
/18255.255.192.00.0.63.25516,38416,38264 /24s
/19255.255.224.00.0.31.2558,1928,19032 /24s
/20255.255.240.00.0.15.2554,0964,09416 /24s
/21255.255.248.00.0.7.2552,0482,0468 /24s
/22255.255.252.00.0.3.2551,0241,0224 /24s
/23255.255.254.00.0.1.2555125102 /24s
/24255.255.255.00.0.0.2552562541 /24
/25255.255.255.1280.0.0.127128126half a /24
/26255.255.255.1920.0.0.636462quarter of a /24
/27255.255.255.2240.0.0.3132308 /30s
/28255.255.255.2400.0.0.1516144 /30s
/29255.255.255.2480.0.0.7862 /30s
/30255.255.255.2520.0.0.342point-to-point link
/31255.255.255.2540.0.0.122point-to-point, RFC 3021
/32255.255.255.2550.0.0.011single host route

Need a specific block rather than a row? The subnet calculator returns network, broadcast, and usable range for any input and can split a block into equal subnets.

How to read the numbers

Usable hosts is total minus two for every prefix from /0 to /30, because the first address identifies the network and the last is the broadcast address. Neither is assignable to an interface.

The two exceptions are /31 and /32. RFC 3021 defines /31 for point-to-point links where no network or broadcast address is reserved, so both addresses are usable — this is why /31 rather than /30 is the current default for router-to-router links. A /32 is a single host route, used for loopbacks and anycast service addresses.

Each additional bit halves the block. A /23 is two /24s, a /22 is four, a /21 is eight. The pattern is the fastest way to answer allocation questions without a calculator.

Host counts depend on the deployment. The table’s usable-host column describes conventional broadcast subnets, with the stated /31 and /32 exceptions. An advertised /24 is a routing block; it does not require all 256 addresses to share one broadcast subnet. Provider reservations also vary. For example, AWS documents different reservation rules for ordinary VPC subnets and BYOIP ranges. Confirm the applicable model before turning a block size into a customer-capacity figure.

Prefix lengths that matter operationally

/24 is the practical floor for global routing. Most networks filter IPv4 announcements longer than /24, so a /24 is the smallest block that propagates reliably on the public internet. Anything longer is usable internally but will not be seen by most of the default-free zone.

/24 is also the smallest transferable unit at most registries. RIR policy and market practice both settle at /24, which is why block sizes in transfers are quoted as /24, /22, /21, /20 and so on.

/29 and /28 are examples of small customer assignments. In conventional broadcast subnets they provide six and fourteen usable addresses respectively; account for the gateway and any provider reservations when planning capacity.

A /22 or /21 can illustrate a growing operator’s address plan. A /22 contains four /24s and a /21 contains eight, allowing allocations per site or service under one aggregate. Choose a size from your demand and growth plan. See address plan design for how to divide the space.

Related

Acquiring space rather than planning it? See IPv4 services for buying, leasing, and renting options.

Last updated on