Calculate network address, host range, and subnet details for IPv4 or IPv6
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (single host) |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point links) |
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /23 | 255.255.254.0 | 512 | 510 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
In an IPv4 subnet the first address is the network address and the last is the broadcast address; neither can be given to a device, which is why a /24 has 256 addresses but 254 usable hosts. The exceptions are /31 (two-address point-to-point links, RFC 3021) and /32 (a single host).
The wildcard mask is the subnet mask inverted (0.0.0.255 for a /24). Cisco access lists and OSPF use it instead of the subnet mask.
IPv6 has no broadcast address and no shortage of space: a single LAN is normally a /64, and a site usually gets a /48 or /56 from its provider to split into many /64 networks.