IPv4 Subnet Cheat Sheet
A complete reference table for IPv4 CIDR notation, subnet masks, wildcard masks, and host capacities. Click any prefix or mask to open it in the interactive calculator.
How to use this subnet cheat sheet
This reference table provides an instant mapping between the three common ways network engineers represent IP subnets:
- CIDR Prefix (/X): Used in modern routing tables, AWS/Azure VPC configurations, and Linux networking.
- Subnet Mask: The traditional dotted-decimal format required by Windows networking and legacy firewalls.
- Wildcard Mask: The inverse of the subnet mask, heavily used in Cisco IOS Access Control Lists (ACLs) and OSPF routing configurations.
Usable vs Total Hosts
In standard IPv4 subnets (from /1 to /30), two IP addresses are reserved and cannot be assigned to hosts. The first IP address is the Network Address (used to identify the subnet itself), and the last IP address is the Broadcast Address. This is why a /24 network has 256 total IPs but only 254 usable hosts.
The notable exceptions are /31 networks (used for point-to-point links per RFC 3021, providing exactly 2 usable IPs) and /32 networks (which represent a single host or loopback interface).