192.168.1.0/24, and it returns the subnet mask, the range of addresses you can assign, the broadcast address and the number of usable addresses.
How to use the subnet calculator
Decide on a candidate block, for example 192.168.10.0/26. The number after the slash is the prefix length, and a larger number means a smaller network.Type the block into the field and click Calculate. Compare Usable addresses with the number of devices you have to fit. Write down the Network and Broadcast rows. A subnet of the same size can start at the address right after the broadcast address. If the size is wrong, change the prefix and calculate again.
192.168.10.200/27, the Network row shows 192.168.10.192/27, the block that address falls in.
How to read the result
| Row | What it tells you when planning |
|---|---|
192.168.1.0/24 the result is network 192.168.1.0/24, mask 255.255.255.0, wildcard 0.0.0.255, broadcast 192.168.1.255, first usable 192.168.1.1, last usable 192.168.1.254, 256 addresses in total and 254 usable.
Choosing a prefix for a number of devices
| Prefix | Subnet mask | Total addresses | Usable addresses |
|---|---|---|---|
/24 | 255.255.255.0 | ||
/25 | 255.255.255.128 | ||
/26 | 255.255.255.192 | ||
/27 | 255.255.255.224 | ||
/28 | 255.255.255.240 | ||
/29 | 255.255.255.248 | ||
/30 | 255.255.255.252 | ||
/31 | 255.255.255.254 | ||
/32 | 255.255.255.255 |
/27 is too small. The smallest fit is a /26, which has 64 and leaves 12 spare.
/23 has 512 addresses and a /22 has 1,024.
Splitting a /24 into smaller subnets
/24 holds two /25 blocks, four /26 blocks, eight /27 blocks or sixteen /28 blocks. This is 192.168.10.0/24 cut into four equal parts.
| Subnet | Usable range | Broadcast |
|---|---|---|
192.168.10.0/26 | 192.168.10.1 to 192.168.10.62 | 192.168.10.63 |
192.168.10.64/26 | 192.168.10.65 to 192.168.10.126 | 192.168.10.127 |
192.168.10.128/26 | 192.168.10.129 to 192.168.10.190 | 192.168.10.191 |
192.168.10.192/26 | 192.168.10.193 to 192.168.10.254 | 192.168.10.255 |
| Use | Devices | Subnet | Usable addresses |
|---|---|---|---|
192.168.10.0/25 | |||
192.168.10.128/26 | |||
192.168.10.192/27 | |||
192.168.10.224/28 | |||
192.168.10.240/28 |
/26 in this block starts at 0, 64, 128 or 192, never at 100. The calculator shows this directly: enter the address you had in mind with the prefix, and the Network row shows where that block really begins.
Why two addresses are lost in every subnet
/24 into sixteen /28 blocks leaves 14 usable addresses in each, 224 in all, where the undivided /24 had 254.
/31 has only two addresses. On a link that joins exactly two routers there is nobody else to broadcast to, so both addresses are used for the two ends, and the calculator reports 2 total and 2 usable. Before this was accepted, such links used a /30, which spends four addresses to connect two devices. Check that both devices support a /31 before you rely on it.
/32 is one address with no network around it. It shows 1 total and 1 usable. You meet it in firewall rules and allow lists that name a single host, such as 203.0.113.5/32, and in routing entries for one address.
Leaving room to grow
192.168.10.128/26 and 192.168.10.192/26 combine into 192.168.10.128/25. 192.168.10.64/26 and 192.168.10.128/26 sit next to each other but cannot be merged, because no /25 starts at 64. If you expect a subnet to double, keep its other half free.
192.168.0.0/24 or 192.168.1.0/24. An office that uses the same range runs into trouble when staff connect from home over a VPN, because their computer then sees the same addresses on both sides. Picking a less common part of the private ranges avoids that.
Planning problems the calculator helps with
Two subnets may overlap. Calculate both and compare the span from Network to Broadcast. If the spans share any address, traffic for those addresses can go to the wrong place. A DHCP pool runs past the end of the subnet. Compare the last address of the pool with the Last usable row. A device with a fixed address cannot reach its gateway. Enter the device address with its prefix, then the gateway address with the same prefix. Both must show the same Network row. A firewall rule is wider than intended. Total addresses shows how many addresses a rule for that block really covers. A rule for a /16covers 65,536 of them.A provider gives you a small public block such as a /29. The result shows its 6 usable addresses, one of which is often taken by the gateway.A database or log stores ranges as numbers. Convert the Network and Broadcast addresses with IPv4 to Decimal to get the first and last value of the block.
What the subnet calculator does not do
/64 with far more addresses than devices.