CIDR Subnet Calculator
Calculate IPv4 network ranges, broadcast addresses, usable hosts, and binary masks.
IPv4 Subnet Mask & Prefix Cheatsheet
| Prefix | Subnet Mask | Total IPs | Usable Hosts | Common Usage |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 | Single host route |
| /30 | 255.255.255.252 | 4 | 2 | Legacy point-to-point link |
| /29 | 255.255.255.248 | 8 | 6 | Small public server cluster |
| /28 | 255.255.255.240 | 16 | 14 | Branch office subnet |
| /27 | 255.255.255.224 | 32 | 30 | Medium workgroup VLAN |
| /26 | 255.255.255.192 | 64 | 62 | Departmental subnet |
| /25 | 255.255.255.128 | 128 | 126 | Half Class C |
| /24 | 255.255.255.0 | 256 | 254 | Standard Class C / Minimum BGP route |
| /23 | 255.255.254.0 | 512 | 510 | Supernetting / Two Class C blocks |
| /22 | 255.255.252.0 | 1024 | 1022 | Regional enterprise allocation |
| /20 | 255.255.240.0 | 4096 | 4094 | Datacenter pod |
| /16 | 255.255.0.0 | 65536 | 65534 | Standard Class B network |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A enterprise block |
Frequently Asked Questions
What is CIDR notation?▼
Classless Inter-Domain Routing (CIDR) notation expresses an IP address and its subnet mask as an IP followed by a forward slash and a prefix number (e.g. 192.168.1.0/24). The number represents how many leading bits are static network identifiers.
Why do usable hosts equal total addresses minus 2?▼
In traditional IPv4 subnets, the first address is reserved as the Network Identifier, and the last address is reserved as the Subnet Broadcast address. Thus, a /24 has 256 total addresses, but 254 usable host addresses.
What is an RFC 3021 /31 subnet?▼
RFC 3021 defines /31 subnets for point-to-point links between routers. Because broadcast and network addresses are unnecessary on isolated point-to-point connections, both addresses (2 hosts) are usable.
What is a wildcard mask?▼
A wildcard mask is the exact inverse of a subnet mask (255.255.255.255 minus the subnet mask). For example, a /24 subnet mask of 255.255.255.0 has a wildcard mask of 0.0.0.255. Cisco routers and access control lists (ACLs) use wildcard masks.