IPv4 subnet calculator
Enter an IP address with a CIDR prefix, like 192.168.1.10/24, to see the network, broadcast address, mask and usable host range.
CIDR cheat sheet
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point, RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 (single host) |
Private address ranges
10.0.0.0/8,172.16.0.0/12and192.168.0.0/16are private (RFC 1918) and not routed on the internet.100.64.0.0/10is shared address space used by carrier-grade NAT.127.0.0.0/8is loopback;169.254.0.0/16is link-local, used when DHCP fails.
Questions
Why are two addresses not usable?
In a normal subnet, the first address identifies the network and the last is the broadcast address, so neither can be given to a device. /31 and /32 are special cases.
What is a wildcard mask?
The inverse of the subnet mask (for /24, 0.0.0.255). Cisco access lists and OSPF use it.