NETOPSIYON IP
IP Subnet Calculator
Calculate a network block, gateway choice and device address pool from an IP address and a CIDR prefix or subnet mask.
How to interpret the results
CIDR, subnet masks and remaining addresses
/29 corresponds to 255.255.255.248; /30 corresponds to 255.255.255.252. A /30 has four addresses: two hosts remain after network and broadcast addresses are excluded, and one device address remains if a host is reserved for the gateway. /32 represents one address; the gateway cannot be inferred from its prefix.
IPv4 CIDR ↔ subnet mask table (/0–/32)
| CIDR | Subnet mask | Total addresses | Host addresses | Devices after reserving 1 gateway |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 4294967296 | 4294967294 | 4294967293 |
| /1 | 128.0.0.0 | 2147483648 | 2147483646 | 2147483645 |
| /2 | 192.0.0.0 | 1073741824 | 1073741822 | 1073741821 |
| /3 | 224.0.0.0 | 536870912 | 536870910 | 536870909 |
| /4 | 240.0.0.0 | 268435456 | 268435454 | 268435453 |
| /5 | 248.0.0.0 | 134217728 | 134217726 | 134217725 |
| /6 | 252.0.0.0 | 67108864 | 67108862 | 67108861 |
| /7 | 254.0.0.0 | 33554432 | 33554430 | 33554429 |
| /8 | 255.0.0.0 | 16777216 | 16777214 | 16777213 |
| /9 | 255.128.0.0 | 8388608 | 8388606 | 8388605 |
| /10 | 255.192.0.0 | 4194304 | 4194302 | 4194301 |
| /11 | 255.224.0.0 | 2097152 | 2097150 | 2097149 |
| /12 | 255.240.0.0 | 1048576 | 1048574 | 1048573 |
| /13 | 255.248.0.0 | 524288 | 524286 | 524285 |
| /14 | 255.252.0.0 | 262144 | 262142 | 262141 |
| /15 | 255.254.0.0 | 131072 | 131070 | 131069 |
| /16 | 255.255.0.0 | 65536 | 65534 | 65533 |
| /17 | 255.255.128.0 | 32768 | 32766 | 32765 |
| /18 | 255.255.192.0 | 16384 | 16382 | 16381 |
| /19 | 255.255.224.0 | 8192 | 8190 | 8189 |
| /20 | 255.255.240.0 | 4096 | 4094 | 4093 |
| /21 | 255.255.248.0 | 2048 | 2046 | 2045 |
| /22 | 255.255.252.0 | 1024 | 1022 | 1021 |
| /23 | 255.255.254.0 | 512 | 510 | 509 |
| /24 | 255.255.255.0 | 256 | 254 | 253 |
| /25 | 255.255.255.128 | 128 | 126 | 125 |
| /26 | 255.255.255.192 | 64 | 62 | 61 |
| /27 | 255.255.255.224 | 32 | 30 | 29 |
| /28 | 255.255.255.240 | 16 | 14 | 13 |
| /29 | 255.255.255.248 | 8 | 6 | 5 |
| /30 | 255.255.255.252 | 4 | 2 | 1 |
| /31 | 255.255.255.254 | 2 | 2 | Depends on the P2P plan |
| /32 | 255.255.255.255 | 1 | 1 | Single address; routing comes from the provider |
This table uses the conventional IPv4 subnet model. A /31 point-to-point link can use both addresses. Any additional addresses reserved by the provider are not included.
Gateway and device addresses in a /29
For 203.0.113.10/29, the network is 203.0.113.8, broadcast is 203.0.113.15, and hosts run from .9 to .14. Reserving .9 for the gateway leaves five device addresses, .10–.14. If your provider supplied a different gateway, enter that address instead.
A gateway in the middle of the block splits the device pool into two ranges. An off-block gateway does not consume an address from the block; the result explains any routed-block or special-route considerations. Blocks of up to 256 addresses list every address and its role.
The number after the slash in CIDR notation is the network prefix length. For example, 192.168.1.10/24 belongs to 192.168.1.0–192.168.1.255. A conventional IPv4 /24 leaves 254 host addresses after excluding the network and broadcast addresses.
A /31 point-to-point link can use both addresses; /32 represents one address. IPv6 has no broadcast. The calculation describes the numeric range, without assessing special assignment rules. No external data service is used for this calculation.