Subnet mask cheat sheet
Every IPv4 prefix length from /8 to /32 with its subnet mask, wildcard mask, number of addresses, usable hosts and how it relates to a /24. Bookmark it or print it.
| Prefix | Subnet mask | Wildcard | Addresses | Usable hosts | Fits | Typical use |
|---|---|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 256 in a /24 | Single address, loopback |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | 128 in a /24 | Point-to-point link (RFC 3021) |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 64 in a /24 | Point-to-point link |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 32 in a /24 | Small business customer |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 in a /24 | Office or larger customer |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 8 in a /24 | |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 4 in a /24 | |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 2 in a /24 | |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 1 in a /24 | One pool in IPAM Enterprise |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 2 × /24 | |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 4 × /24 | |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 8 × /24 | |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 16 × /24 | |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 32 × /24 | |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 64 × /24 | |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 128 × /24 | |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 256 × /24 | Large network |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 512 × /24 | |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 1,024 × /24 | |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 2,048 × /24 | |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 4,096 × /24 | |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 8,192 × /24 | |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 16,384 × /24 | |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 32,768 × /24 | |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 65,536 × /24 | Very large allocation |
How to use it
Three steps
- Find your prefix. Look up the prefix length, such as /29, in the first column.
- Read across. Subnet mask and wildcard mask for router configs, total addresses and usable hosts.
- Need more detail?. Use the IPv4 subnet calculator for any specific block.
Questions
Good to know
Why are usable hosts two less than addresses?
The first address names the network and the last is the broadcast address, so neither is given to a device. /31 and /32 are the exceptions.
What is a wildcard mask?
The subnet mask with every bit flipped. Cisco access lists and OSPF use it.
Can I print this page?
Yes. The table prints cleanly on one page.
More free tools
Other tools you may need
IPv4 subnet calculator
Network, broadcast, usable range and masks for any block.
Open the toolIPv6 subnet calculator
First and last address, size, /64 count and reverse zone.
Open the toolCIDR and range converter
Turn first-to-last ranges into CIDR blocks, and back.
Open the toolSupernet and summarize
Merge many blocks into the shortest list for routes and ACLs.
Open the tool/24 planner
Split a /24 into customer, link and LAN blocks on a map.
Open the toolIP spreadsheet checker
Find duplicates, overlaps and typos in an Excel or CSV list.
Open the tool
Still tracking IPs in a spreadsheet?
IPAM Enterprise keeps every /24, block, customer and circuit in one portal, and checks each assignment for overlaps before it is saved.
