By ToolzHive · Updated
Total addresses equal 2^(32−prefix). The host column uses conventional broadcast-subnet counting, with explicit /31 and /32 exceptions.
Reference table
| Prefix | Mask | Total addresses | Conventional hosts / exception |
|---|---|---|---|
| /0 | 0.0.0.0 | 4294967296 | 4294967294 |
| /1 | 128.0.0.0 | 2147483648 | 2147483646 |
| /2 | 192.0.0.0 | 1073741824 | 1073741822 |
| /3 | 224.0.0.0 | 536870912 | 536870910 |
| /4 | 240.0.0.0 | 268435456 | 268435454 |
| /5 | 248.0.0.0 | 134217728 | 134217726 |
| /6 | 252.0.0.0 | 67108864 | 67108862 |
| /7 | 254.0.0.0 | 33554432 | 33554430 |
| /8 | 255.0.0.0 | 16777216 | 16777214 |
| /9 | 255.128.0.0 | 8388608 | 8388606 |
| /10 | 255.192.0.0 | 4194304 | 4194302 |
| /11 | 255.224.0.0 | 2097152 | 2097150 |
| /12 | 255.240.0.0 | 1048576 | 1048574 |
| /13 | 255.248.0.0 | 524288 | 524286 |
| /14 | 255.252.0.0 | 262144 | 262142 |
| /15 | 255.254.0.0 | 131072 | 131070 |
| /16 | 255.255.0.0 | 65536 | 65534 |
| /17 | 255.255.128.0 | 32768 | 32766 |
| /18 | 255.255.192.0 | 16384 | 16382 |
| /19 | 255.255.224.0 | 8192 | 8190 |
| /20 | 255.255.240.0 | 4096 | 4094 |
| /21 | 255.255.248.0 | 2048 | 2046 |
| /22 | 255.255.252.0 | 1024 | 1022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /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 on point-to-point links |
| /32 | 255.255.255.255 | 1 | 1 address / host route |
Example
A /24 has 256 addresses and conventionally 254 hosts after reserving network and broadcast addresses.
IPv6
IPv6 uses 128 bits and no IPv4-style broadcast subtraction. This table covers IPv4; use the IPv6 tool for IPv6 ranges.
Try the related tools
- IPv4 Subnet Calculator — Calculate network, broadcast, host range and mask for any IPv4 subnet, and split it.
- IPv6 Subnet Calculator — Calculate IPv6 prefixes, address ranges and subnets, and expand or compress addresses.