Subnet Mask Cheat Sheet
A quick-reference table mapping CIDR prefix lengths to subnet masks, wildcard masks, total addresses, and usable hosts. Covers the most common subnets from /8 (Class A) down to /32 (host route).
How to Read This Table
- CIDR Notation (e.g. /24)
- The number after the slash indicates how many bits of the 32-bit IPv4 address are used for the network portion. A /24 means the first 24 bits identify the network, leaving 8 bits for host addresses.
- Subnet Mask
- The dotted-decimal representation of the network bits. Each network bit is set to 1. For /24, the first 24 bits are all 1s, giving 255.255.255.0.
- Wildcard Mask
- The bitwise inverse of the subnet mask. Used in access control lists (ACLs) on Cisco routers and OSPF network statements. For /24, the wildcard mask is 0.0.0.255.
- Relationship
- Total addresses = 2(32 - prefix length). Usable hosts = total addresses - 2 (one address reserved for the network ID, one for the broadcast). The exceptions are /31 (RFC 3021 point-to-point links with 2 usable addresses) and /32 (a single host route).
Private IP Ranges (RFC 1918)
Three address blocks are reserved for private networks and are not routable on the public internet.
- 10.0.0.0/8Mask 255.0.0.0 — 16,777,216 addresses. Used for large enterprise networks.
- 172.16.0.0/12Mask 255.240.0.0 — 1,048,576 addresses. Covers 172.16.0.0 through 172.31.255.255.
- 192.168.0.0/16Mask 255.255.0.0 — 65,536 addresses. The most common home and small office range.
Need to Calculate a Specific Subnet?
Enter any IP address and prefix length to see the network address, broadcast address, host range, and more.
Calculate any subnet