Subnet Cheat Sheet

The complete IPv4 subnet reference table — every CIDR prefix from /0 to /32 with subnet mask, wildcard mask, total addresses, usable hosts, and block size. Filter by CIDR, mask, or host count to find exactly what you need.

CIDRSubnet MaskWildcard MaskTotal AddressesUsable HostsBlock SizeClass
Subnet Cheat Sheet
Figure 1 — Subnet Cheat Sheet

What Is a Subnet Cheat Sheet?

A subnet cheat sheet is a quick-reference table that maps every possible IPv4 CIDR prefix to its corresponding subnet mask, wildcard mask, and host capacity. Network engineers, system administrators, and students use it daily for IP address planning, firewall rules, and exam preparation. This interactive version lets you search, filter, and highlight the subnets you need most.

For detailed subnet calculations on specific IP addresses, use our Subnet Calculator. To convert between CIDR notation and subnet masks, see the CIDR Converter. If you need to understand how subnet masks work at the bit level, the IP to Binary Converter shows the binary representation.

Most Common Subnets

While all 33 CIDR prefixes are valid, a handful appear in nearly every network configuration. These are the ones you should memorize:

CIDRSubnet MaskUsable HostsCommon Use
/8255.0.0.016,777,214Class A networks (10.0.0.0/8 for private)
/16255.255.0.065,534Class B networks (172.16.0.0/16 for private)
/24255.255.255.0254Most common LAN, home networks
/25255.255.255.128126Small office split
/26255.255.255.6462Department segments
/27255.255.255.22430Small team, VLAN segment
/28255.255.255.24014Small subnet, DMZ
/30255.255.255.2522Point-to-point links between routers
/32255.255.255.2551Host route, loopback

Pro Tip: For the CCNA exam and daily networking work, memorize the /24 through /30 range cold. The block sizes follow powers of 2: /24 = 256 addresses, /25 = 128, /26 = 64, /27 = 32, /28 = 16, /29 = 8, /30 = 4. Each step up in CIDR halves the addresses. Practice with our Subnet Calculator until it becomes automatic.

Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask as a single compact string: 192.168.1.0/24. The number after the slash indicates how many bits of the 32-bit address are the network portion.

  • /24 means the first 24 bits are the network, leaving 8 bits for hosts (2^8 = 256 addresses, 254 usable).
  • /16 means 16 network bits and 16 host bits (65,536 addresses, 65,534 usable).
  • /32 means all 32 bits are network — a single host address.
  • /0 means no network bits — matches all addresses (used in default routes).

CIDR replaced the old classful system (Class A/B/C) in 1993, allowing more flexible allocation. For deeper understanding, read our guide on what is a subnet mask and convert specific addresses with the CIDR Converter.

Subnet Mask vs Wildcard Mask

The subnet mask and wildcard mask are bitwise inverses of each other, but they are used in different contexts:

PropertySubnet MaskWildcard Mask
PurposeDefines network/host boundaryDefines match/ignore bits in ACLs
1 bits meanNetwork portionIgnore this bit (don't care)
0 bits meanHost portionMust match this bit
Used inInterface config, routing tablesCisco ACLs, OSPF area config
Example (/24)255.255.255.00.0.0.255
Example (/27)255.255.255.2240.0.0.31
RelationshipWildcard = 255.255.255.255 - Subnet Mask

Wildcard masks are primarily a Cisco convention. Juniper, Fortinet, and most modern platforms use CIDR or standard subnet masks. For ACL configuration on Cisco equipment, you need the wildcard mask from this cheat sheet.

Private IP Address Ranges

RFC 1918 defines three private IP ranges that are not routable on the public internet. These are the networks you'll configure on your home router (typically at your router's IP) and internal infrastructure:

RangeCIDRSubnet MaskTotal AddressesCommon Usage
10.0.0.0 – 10.255.255.25510.0.0.0/8255.0.0.016,777,216Enterprise, cloud VPCs, VPNs
172.16.0.0 – 172.31.255.255172.16.0.0/12255.240.0.01,048,576Medium business, Docker default
192.168.0.0 – 192.168.255.255192.168.0.0/16255.255.0.065,536Home networks, small office

Most home routers use a /24 subnet within 192.168.0.0/16 or 10.0.0.0/8. Check your current IP assignment with What Is My IP to see both your public and private addresses.

Note: When planning subnets, always account for the network address (first) and broadcast address (last) in each subnet — these cannot be assigned to hosts. A /24 has 256 total addresses but only 254 usable hosts. The exception is /31, which RFC 3021 defines as a 2-host point-to-point link with no network/broadcast addresses. Use our Subnet Calculator to see exact network and broadcast addresses for any subnet.

Subnetting Quick Math

For fast mental math when subnetting, use these relationships:

  • Block size = 256 - last non-zero octet of the subnet mask. For 255.255.255.224, block size = 256 - 224 = 32.
  • Usable hosts = block size - 2. Block size 32 gives 30 usable hosts.
  • Network addresses are multiples of the block size. For /27 (block 32): .0, .32, .64, .96, .128, .160, .192, .224.
  • Broadcast address = next network address - 1. Network .32 has broadcast .63.
  • First usable host = network + 1. Last usable = broadcast - 1.

Practice these calculations with the Subnet Calculator to verify your answers. For converting IP addresses to their binary form, use the IP to Binary Converter.

VLSM: Variable Length Subnet Masking

VLSM allows you to use different subnet sizes within the same major network, optimizing address utilization. Instead of giving every segment a /24, you match the subnet size to actual need:

  • Server VLAN with 50 hosts → /26 (62 usable)
  • User VLAN with 200 hosts → /24 (254 usable)
  • Management VLAN with 10 hosts → /28 (14 usable)
  • Router-to-router links → /30 (2 usable)

Always start with the largest subnet and work down. This prevents overlapping and wasted address space. For large-scale planning, the CIDR Converter helps aggregate and summarize routes. Understanding subnet masks is essential for VLSM design. Test your network connectivity after changes with the Ping Test and verify throughput with the Speed Test.

Key Takeaways
  • Memorize /24 through /30 — these cover 90% of real-world subnetting needs.
  • Block size = 256 minus the last non-zero octet of the mask. Usable hosts = block size - 2.
  • Wildcard mask = 255.255.255.255 minus the subnet mask (used in Cisco ACLs and OSPF).
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
  • Use VLSM to match subnet sizes to actual host requirements.
  • Verify calculations with the Subnet Calculator and CIDR Converter.

Video: Subnetting Made Easy

Related Tools and Guides

Frequently Asked Questions

What is the most commonly used subnet mask?

255.255.255.0 (/24) is by far the most common subnet mask. It provides 254 usable host addresses, which is sufficient for most home networks and small office LANs. It's also the default subnet mask for Class C addresses and the one most consumer routers use out of the box.

What is the difference between /30 and /31 subnets?

A /30 subnet has 4 total addresses (2 usable hosts) and is the traditional choice for point-to-point router links. A /31 subnet (RFC 3021) has only 2 addresses with no network or broadcast address, and both are usable. /31 saves one IP per link and is increasingly used in modern networks, especially in data centers.

How many subnets can I create from a /24 network?

From a /24, you can create: 2 x /25 subnets (126 hosts each), 4 x /26 (62 hosts each), 8 x /27 (30 hosts each), 16 x /28 (14 hosts each), 32 x /29 (6 hosts each), or 64 x /30 (2 hosts each). The number doubles as the CIDR prefix increases by 1.

Why do I lose 2 addresses from every subnet?

The first address in every subnet is the network address (identifies the subnet itself), and the last address is the broadcast address (sends to all hosts in the subnet). Neither can be assigned to a device. For example, in 192.168.1.0/24, .0 is the network address and .255 is the broadcast. The exception is /31 (RFC 3021) and /32 (host route).

What is a wildcard mask and when do I need it?

A wildcard mask is the bitwise inverse of a subnet mask. It's used in Cisco IOS access control lists (ACLs) and OSPF area definitions to specify which bits of an address to match and which to ignore. For /24, the wildcard is 0.0.0.255. You can calculate wildcard masks by subtracting each octet from 255.

Should I use classful or classless subnetting?

Always use classless (CIDR) subnetting. Classful addressing (Class A/B/C) was deprecated in 1993. CIDR allows any prefix length from /0 to /32, giving you precise control over network size. All modern routers and operating systems support CIDR natively.

How do I choose the right subnet size for my network?

Count the number of devices that need IP addresses, add 20-30% for growth, then pick the smallest CIDR prefix that covers that number. For example, if you have 45 devices plus 30% growth = 59 needed. The smallest subnet is /26 (62 usable hosts). Use our Subnet Calculator to verify the exact capacity and address range.

About Tommy N.

Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.

Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.

Once done, hit any button as below