We’ve put together a quick-reference subnet cheat sheet for IPv4 and IPv6 designed for fast lookups.
If you already work with CIDR notation and just need to quickly check a subnet mask, usable hosts, wildcard mask, or block size, this page is meant to give you the information cleanly and directly.
There’s no subnetting theory in the main sections. Just clean tables you can scan, copy, and use when you’re in the middle of a task.
If you want a bit of context or a refresher, optional explanations are included after the tables.
Key takeaways
- Use the IPv4 tables to quickly find CIDR prefixes, subnet masks, wildcard masks, usable hosts, and block sizes.
- A /24 subnet is common, but /26 and /30 show up frequently in real-world networks.
- Usable hosts are usually total IPs minus two, with /31 and /32 as exceptions.
- IPv6 subnetting focuses on standard prefixes, not host exhaustion or broadcast addresses.
- Wildcard masks are mainly used in ACLs, firewall rules, and legacy configurations.
- Cheat sheets work best for fast reference; calculators are better for validation and complex planning.
Tip: If you’re working across mixed environments, it helps to understand when IPv4 and IPv6 behave differently, especially around addressing, subnetting conventions, and compatibility.
For a quick, practical breakdown, see IPv4 vs IPv6: What’s the difference and when does it matter? and Subnet Explained.
IPv4 subnet cheat sheet table
| CIDR prefix | Subnet mask | Wildcard mask | Total IP addresses | Usable hosts | Block size |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 1 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | 2 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 4 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 8 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 32 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 64 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 128 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 256 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 512 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 1,024 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 2,048 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 4,096 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 8,192 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 16,384 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 32,768 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 65,536 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 131,072 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 262,144 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 524,288 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 1,048,576 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 2,097,152 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 4,194,304 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 8,388,608 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 16,777,216 |
How to read this table
- Each row represents one subnet size.
- Total IP addresses includes network and broadcast addresses.
- Usable hosts is the number of assignable IPs in most real networks.
- Block size shows how much the subnet increments when calculating ranges.
Notes
- Most IPv4 subnets subtract two IPs for network and broadcast.
- /31 and /32 are special cases and do not follow the usual usable-host rule.
- Commonly used subnets like /24, /26, and /30 are highlighted visually in practice to make scanning easier.
IPv4 subnet mask to CIDR conversion table
This table is for reverse lookups when you’re given a subnet mask and need the CIDR prefix fast.
| Subnet mask | CIDR prefix | Wildcard mask |
| 255.255.255.255 | /32 | 0.0.0.0 |
| 255.255.255.254 | /31 | 0.0.0.1 |
| 255.255.255.252 | /30 | 0.0.0.3 |
| 255.255.255.248 | /29 | 0.0.0.7 |
| 255.255.255.240 | /28 | 0.0.0.15 |
| 255.255.255.224 | /27 | 0.0.0.31 |
| 255.255.255.192 | /26 | 0.0.0.63 |
| 255.255.255.128 | /25 | 0.0.0.127 |
| 255.255.255.0 | /24 | 0.0.0.255 |
| 255.255.254.0 | /23 | 0.0.1.255 |
| 255.255.252.0 | /22 | 0.0.3.255 |
| 255.255.248.0 | /21 | 0.0.7.255 |
| 255.255.240.0 | /20 | 0.0.15.255 |
| 255.255.224.0 | /19 | 0.0.31.255 |
| 255.255.192.0 | /18 | 0.0.63.255 |
| 255.255.128.0 | /17 | 0.0.127.255 |
| 255.255.0.0 | /16 | 0.0.255.255 |
| 255.254.0.0 | /15 | 0.1.255.255 |
| 255.252.0.0 | /14 | 0.3.255.255 |
| 255.248.0.0 | /13 | 0.7.255.255 |
| 255.240.0.0 | /12 | 0.15.255.255 |
| 255.224.0.0 | /11 | 0.31.255.255 |
| 255.192.0.0 | /10 | 0.63.255.255 |
| 255.128.0.0 | /9 | 0.127.255.255 |
| 255.0.0.0 | /8 | 0.255.255.255 |
When to use this table
- When reviewing legacy configurations that list subnet masks instead of CIDR.
- When working with ACLs or firewall rules that rely on wildcard masks.
- When documenting or auditing networks that mix notation styles.
IPv6 subnet cheat sheet table
| IPv6 prefix | Total addresses | Typical use case |
| /128 | 1 | Single interface or loopback |
| /64 | 18 quintillion | Standard LAN or subnet |
| /56 | 2⁷² addresses | ISP customer allocation |
| /48 | 2⁸⁰ addresses | Site or organization allocation |
| /32 | 2⁹⁶ addresses | Large provider allocation |
How to use this table
- IPv6 does not use broadcast addresses.
- Host exhaustion is not a practical concern in IPv6 subnetting.
- Most IPv6 networks use /64 for individual subnets, regardless of size.
- Planning is based on standard prefixes and conventions, not address counts.
Wildcard mask cheat Sheet
Wildcard masks are most commonly used in ACLs, firewall rules, and routing filters. This table shows the relationship between CIDR, subnet masks, and their wildcard equivalents.
| CIDR prefix | Subnet mask | Wildcard mask | Common usage |
| /32 | 255.255.255.255 | 0.0.0.0 | Single host match |
| /31 | 255.255.255.254 | 0.0.0.1 | Point-to-point links |
| /30 | 255.255.255.252 | 0.0.0.3 | Small routed networks |
| /29 | 255.255.255.248 | 0.0.0.7 | Device groups |
| /28 | 255.255.255.240 | 0.0.0.15 | Small subnets |
| /27 | 255.255.255.224 | 0.0.0.31 | Department networks |
| /26 | 255.255.255.192 | 0.0.0.63 | Medium subnets |
| /25 | 255.255.255.128 | 0.0.0.127 | Large subnets |
| /24 | 255.255.255.0 | 0.0.0.255 | Common LAN networks |
| /16 | 255.255.0.0 | 0.0.255.255 | Broad network ranges |
How to use this table
- Wildcard masks are the inverse of subnet masks.
- They define which bits must match and which bits can vary.
- This is useful when writing or reviewing ACLs and firewall rules.
- Vendor-specific syntax varies, but the wildcard logic stays the same.
Binary subnet mask reference table
This table shows where the network boundary sits by breaking subnet masks into binary. It’s mainly useful for manual subnetting and exams.
| CIDR prefix | Subnet mask (decimal) | Subnet mask (binary) |
| /32 | 255.255.255.255 | 11111111.11111111.11111111.11111111 |
| /30 | 255.255.255.252 | 11111111.11111111.11111111.11111100 |
| /29 | 255.255.255.248 | 11111111.11111111.11111111.11111000 |
| /28 | 255.255.255.240 | 11111111.11111111.11111111.11110000 |
| /27 | 255.255.255.224 | 11111111.11111111.11111111.11100000 |
| /26 | 255.255.255.192 | 11111111.11111111.11111111.11000000 |
| /25 | 255.255.255.128 | 11111111.11111111.11111111.10000000 |
| /24 | 255.255.255.0 | 11111111.11111111.11111111.00000000 |
| /23 | 255.255.254.0 | 11111111.11111111.11111110.00000000 |
| /22 | 255.255.252.0 | 11111111.11111111.11111100.00000000 |
| /21 | 255.255.248.0 | 11111111.11111111.11111000.00000000 |
| /20 | 255.255.240.0 | 11111111.11111111.11110000.00000000 |
| /16 | 255.255.0.0 | 11111111.11111111.00000000.00000000 |
How to use this table
- The 1 bits represent the network portion.
- The 0 bits represent the host portion.
- The transition point shows where subnets split.
- This is especially useful for manual calculations and certification exams.
The tables above cover everything you need for day-to-day subnetting reference.
If you’re just here to look something up, you can stop there. The sections below are optional and focus on using the cheat sheet correctly and avoiding common mistakes.
How to use a subnet cheat sheet correctly
- Start with the number of hosts you actually need.
- Pick the smallest subnet that comfortably fits that number, not the closest round number. This avoids wasting address space and makes future changes easier.
- Use the block size to find subnet boundaries.
- The block size tells you how much the network increments. For example, a /26 subnet increments by 64, so valid networks start at .0, .64, .128, and .192.
- Identify the network and broadcast addresses early.
- The first IP in a subnet is the network address. The last IP is the broadcast address. Everything in between is usable in most cases.
- When in doubt, validate your result.
Cheat sheets are great for speed, but if you’re configuring production systems, double-check with a subnet calculator or test environment.
Understanding usable hosts vs total IP addresses
Most IPv4 subnets reserve two addresses.
One address is used for the network, and one is used for broadcast. That’s why a subnet with 256 total IPs, like a /24, ends up with 254 usable hosts.
This rule applies to most common subnets.
It does not apply to /31 and /32.
- /31 is typically used for point-to-point links, where both IPs are usable.
- /32 represents a single host, often used for loopbacks or host routes.
In real networks, this distinction matters.
If you size a subnet based on total IPs instead of usable hosts, you can easily end up short on addresses. That usually shows up later, when devices fail to connect or monitoring targets can’t be added.
IPv4 vs. IPv6 subnetting differences
IPv4 subnetting is constrained by address scarcity.
You spend time calculating usable hosts, avoiding waste, and splitting networks carefully to make everything fit.
IPv6 flips that model. The address space is vast, so subnetting is based on standard prefixes, not host counts. You don’t size an IPv6 subnet based on how many devices you have.
There is no broadcast address in IPv6. That simplifies network behavior and removes the need to reserve addresses the way IPv4 does.
The /64 prefix is standard for most IPv6 subnets.
Even if a network only needs a handful of addresses, /64 is still used. This keeps addressing consistent and compatible with IPv6 features like SLAAC.
IPv6 planning is simpler, but more rigid.
You gain flexibility from the large address space, but you’re expected to follow conventions more closely than in IPv4.
Common subnetting mistakes to avoid
These are issues that show up again and again in real networks, especially when subnetting is done quickly or under pressure.
Miscounting usable hosts
This is the most common problem. Planning around total IP addresses instead of usable hosts often leads to subnets that look correct but run out of space once devices are added.
Using the wrong wildcard mask
Wildcard masks are easy to get backwards, especially when switching between subnet masks and ACL rules. One incorrect bit can dramatically change what traffic is allowed or blocked.
Mixing CIDR and classful assumptions
CIDR is classless, but classful thinking still sneaks in. Assuming boundaries based on old class A, B, or C rules causes confusion when working with prefixes like /21 or /27.
Over-subnetting without VLSM planning
Equal-sized subnets are easy to design, but they often waste address space or make future expansion harder if VLSM isn’t considered.
Skipping validation
Even experienced engineers make quick subnetting mistakes. A fast check with a calculator or test environment can prevent unnecessary troubleshooting later.
When to use a subnet calculator instead
Subnet cheat sheets are best for speed.
They’re ideal when you already know what you’re looking for and just need to confirm a prefix, mask, block size, or usable host count.
Subnet calculators are better for validation and planning.
Use a calculator when:
- You need to confirm network and broadcast addresses.
- You’re working with unfamiliar or irregular subnet sizes.
- You’re planning multiple subnets and want to avoid overlap.
- You’re documenting or automating configurations.
In practice, both tools are useful. Cheat sheets help you move quickly, and calculators help you double-check your work before changes go live.
If you need to validate your work quickly, Uptime Robot offers a free IPv4 subnet calculator and a free IPv6 subnet calculator that lets you check CIDR ranges, usable hosts, and subnet details in seconds.
FAQ's
-
The /24 subnet is still the most common in IPv4 networks. It provides 254 usable hosts and is easy to recognize, document, and troubleshoot.
-
A /24 subnet has 256 total IP addresses. Two are reserved: one for the network address and one for the broadcast address. That leaves 254 usable hosts.
-
No practical limits. IPv6 subnets are not sized based on host counts, and address exhaustion is not a concern. Subnetting focuses on standard prefixes instead.
-
Wildcard masks are mainly used in ACLs, firewall rules, and routing filters. They specify which bits must match and which bits can vary when matching IP addresses.
-
Yes. CIDR is the standard way IP networks are designed, documented, and routed. It applies to both IPv4 and IPv6 and replaces classful addressing entirely.