Subnet Sizes Cheat Sheet: /16 to /30

Mask, usable hosts, and what each size is actually used for — not just the numbers.

PrefixMaskTotalUsable hostsTypically used for
/16255.255.0.065,53665,534A whole cloud VPC/VCN, or every office in a company allocated from one supernet.
/22255.255.252.01,0241,022A large site or campus allocation, often split further into /24s per floor or team.
/23255.255.254.0512510Two /24s' worth of hosts kept as one block — a mid-size office or a growing /24 that outgrew itself.
/24255.255.255.0256254The default LAN size — most home routers, small offices, and a single cloud subnet.
/25255.255.255.128128126Half a /24, used to split a LAN into two VLANs (e.g. wired vs Wi-Fi) without wasting the whole block.
/26255.255.255.1926462A single VLAN for one team or floor — big enough for workstations plus printers and APs.
/27255.255.255.2243230A small department segment, or a dedicated subnet for a cluster of servers.
/28255.255.255.2401614A small DMZ, a management/out-of-band network, or a site-to-site VPN pool.
/29255.255.255.24886A tiny isolated segment — a handful of appliances, or a small branch router's LAN side.
/30255.255.255.25242The classic point-to-point WAN link between two routers — exactly enough for both ends, no more.

No prefix matches that filter.

How to work one out by hand

A /24 leaves 32 − 24 = 8 host bits, so there are 28 = 256 addresses. Subtract the network and broadcast addresses and you get 254 usable hosts. The same logic scales both directions: a /16 leaves 16 host bits (65,536 addresses), a /30 leaves 2 (4 addresses, 2 usable). The usable-host count is always the total minus 2, except at /31 and /32 where there's no separate broadcast address to reserve.

Usable addresses in cloud subnets

Cloud providers reserve extra addresses in every subnet beyond the standard network/broadcast pair, so a cloud /24 has fewer usable addresses than a plain one:

ProviderUsable in a /24Reserved
AWS2515 addresses
Azure2515 addresses
Google Cloud2524 addresses
Oracle Cloud2533 addresses

These are commonly documented values; check your provider's current documentation before you plan capacity around them.

Splitting and merging

Every size here divides cleanly into two of the next size down, or merges with its pair into the next size up — a /24 splits into two /25s, four /26s, and so on down to sixty-four /30s. Work this out for any specific block with the subnet splitter or the CIDR to IP range calculator.

Related: Private IP ranges (RFC 1918), Does a CIDR contain an IP?, IP range to CIDR.

FAQ

What's the fastest way to go from prefix length to host count?

Subtract the prefix from 32 to get the host bits, then 2 raised to that power is the total address count. Subtract 2 for the usable host count (network + broadcast), except at /31 and /32.

Why do cloud providers reserve more than 2 addresses per subnet?

Beyond the network and broadcast addresses, cloud platforms reserve a few more for internal routing and DNS services inside the subnet — the exact count varies by provider.

Is a /24 the same as a Class C network?

In classful terms, yes. A Class C network has 24 network bits and 254 usable hosts, the same size as a /24.

© PacketUtils. Tools run in your browser. Review every command before using it in production.HomeAboutContactPrivacy PolicyGitHub