Subnet Sizes Cheat Sheet: /16 to /30
Mask, usable hosts, and what each size is actually used for — not just the numbers.
| Prefix | Mask | Total | Usable hosts | Typically used for |
|---|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 | A whole cloud VPC/VCN, or every office in a company allocated from one supernet. |
| /22 | 255.255.252.0 | 1,024 | 1,022 | A large site or campus allocation, often split further into /24s per floor or team. |
| /23 | 255.255.254.0 | 512 | 510 | Two /24s' worth of hosts kept as one block — a mid-size office or a growing /24 that outgrew itself. |
| /24 | 255.255.255.0 | 256 | 254 | The default LAN size — most home routers, small offices, and a single cloud subnet. |
| /25 | 255.255.255.128 | 128 | 126 | Half a /24, used to split a LAN into two VLANs (e.g. wired vs Wi-Fi) without wasting the whole block. |
| /26 | 255.255.255.192 | 64 | 62 | A single VLAN for one team or floor — big enough for workstations plus printers and APs. |
| /27 | 255.255.255.224 | 32 | 30 | A small department segment, or a dedicated subnet for a cluster of servers. |
| /28 | 255.255.255.240 | 16 | 14 | A small DMZ, a management/out-of-band network, or a site-to-site VPN pool. |
| /29 | 255.255.255.248 | 8 | 6 | A tiny isolated segment — a handful of appliances, or a small branch router's LAN side. |
| /30 | 255.255.255.252 | 4 | 2 | The 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:
| Provider | Usable in a /24 | Reserved |
|---|---|---|
| AWS | 251 | 5 addresses |
| Azure | 251 | 5 addresses |
| Google Cloud | 252 | 4 addresses |
| Oracle Cloud | 253 | 3 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.