You will look up the same handful of numbers over and over when you work with networks: how many hosts in a /27, what mask goes with /22, is a /29 big enough. This page is the answer sheet. Bookmark it, or use our subnet calculator when you need the exact range for a specific address.
How to read a prefix in ten seconds
An IPv4 address has 32 bits. The number after the slash says how many of those bits belong to the network. The rest belong to the hosts on it.
- Bigger number, smaller network. A /30 is tiny, a /8 is enormous.
- Each step doubles or halves the size. A /23 is two /24s. A /25 is half a /24.
- Usable hosts are total minus two for every prefix up to /30, because the first address names the network and the last is the broadcast address.
That is genuinely all there is to it. For the slower, plain English walk through, see subnet mask explained.
The full table: /0 to /32
| Prefix | Subnet mask | Wildcard mask | Total addresses | Usable hosts |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (point to point) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (single host) |
The rows you will actually use day to day are /16 to /30. Two shortcuts make them easy to remember: a /24 is 256 addresses, and every step away from /24 doubles or halves it. So a /26 is 64, a /27 is 32, a /28 is 16, and a /22 is 1,024.
Quick picks: which size for which job
| You need room for | Use | Usable hosts |
|---|---|---|
| A link between two routers | /31 or /30 | 2 |
| A handful of servers or a small VLAN | /29 | 6 |
| A small office | /27 | 30 |
| A typical home or floor of an office | /24 | 254 |
| A large office or campus building | /22 | 1,022 |
| A whole cloud VPC with room to grow | /16 | 65,534 |
In the cloud, subtract the provider's reserved addresses too. A /28 in AWS has 16 addresses, minus 5 reserved, which leaves 11 for your instances.
Cloud subnet rules
| Provider | Smallest subnet | Largest VPC or VNet range | Reserved per subnet |
|---|---|---|---|
| AWS | /28 | /16 | 5 (first four and last one) |
| Azure | /29 | No fixed limit, set per VNet | 5 (first four and last one) |
| Google Cloud | /29 | Set per subnet range | 4 (network, gateway, second to last, broadcast) |
AWS's default VPC in every region uses 172.31.0.0/16. If you plan to connect cloud networks to your office over a VPN, pick ranges that do not overlap with your office network or with each other. Overlapping private ranges are the single most common reason site to site VPNs refuse to route.
Ranges that are reserved for something
| Range | Size | What it is for |
|---|---|---|
| 10.0.0.0/8 | 16,777,216 | Private networks (RFC 1918) |
| 172.16.0.0/12 | 1,048,576 | Private networks (RFC 1918). Docker's default bridge is 172.17.0.0/16 inside it |
| 192.168.0.0/16 | 65,536 | Private networks (RFC 1918). Most home routers use 192.168.0.0/24 or 192.168.1.0/24 |
| 100.64.0.0/10 | 4,194,304 | Carrier grade NAT shared space (RFC 6598). If your router's WAN address starts with 100.64 to 100.127, your ISP is sharing one public IP between many customers |
| 127.0.0.0/8 | 16,777,216 | Loopback. 127.0.0.1 is your own machine |
| 169.254.0.0/16 | 65,536 | Link local. A device gives itself one of these when it cannot reach a DHCP server |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | 256 each | Documentation and examples only |
| 224.0.0.0/4 | 268,435,456 | Multicast |
| 240.0.0.0/4 | 268,435,456 | Reserved for future use |
If you see one of the private ranges as your address on a device, that is your local address, not the one the internet sees. Our home page shows your public one.
What sizes do registries actually hand out?
We counted every allocated or assigned block in the files that the five regional internet registries (AFRINIC, APNIC, ARIN, LACNIC and RIPE NCC) publish, dated 22 and 23 October 2026.
| IPv4 block size | Entries | Share of all IPv4 entries |
|---|---|---|
| /24 | 79,837 | 30.4% |
| /22 | 71,307 | 27.2% |
| /23 | 34,843 | 13.3% |
| /21 | 17,951 | 6.8% |
| /20 | 17,040 | 6.5% |
| /19 | 12,895 | 4.9% |
| /16 | 12,424 | 4.7% |
There are 262,321 IPv4 entries in total. The /22 is so common because that was the size RIPE NCC and APNIC handed out from their final pools as IPv4 ran out. The /24 matters for another reason: it is the smallest block most networks will accept in internet routing, so anything smaller than a /24 cannot be announced on its own.
On the IPv6 side, out of 70,981 entries, 46.2% are a /32, 23.2% a /29 and 21.5% a /48. A /32 is the standard first allocation for an ISP, and a /48 is the usual size for a single organisation or site.
IPv6 prefixes in one table
| Prefix | Typical use | Number of /64 networks inside |
|---|---|---|
| /32 | Standard ISP allocation from a registry | 4,294,967,296 |
| /48 | One organisation or site | 65,536 |
| /56 | A home connection from many ISPs | 256 |
| /64 | A single network (LAN or VLAN) | 1 |
| /128 | A single address | Not applicable |
The rule that trips people up: always give a LAN a full /64, even if it only has three devices. IPv6 address autoconfiguration (SLAAC) expects 64 bits for the host part and breaks on anything smaller. Want to see whether you even have IPv6 right now? Run our IPv6 test, and see how your country compares in our IPv6 adoption by country data.
The bottom line
A /24 is 256 addresses and 254 hosts, and every step away from it doubles or halves that. Keep the full table above for everything else. Add the cloud rule (AWS and Azure take 5 addresses per subnet, Google Cloud takes 4), keep private ranges from overlapping, and give every IPv6 LAN a /64. For a specific address, our subnet calculator gives you the network, broadcast and host range instantly.
