How to use it
- Type any IPv4 address from the network, for example
10.20.30.40. You can type the prefix with it:10.20.30.40/19. - Or choose the prefix from the list. Each entry shows the matching mask, so
/24and255.255.255.0are the same choice. - Read the result. "Copy result" puts the main lines on your clipboard.
Nothing you type leaves your browser. The page does the arithmetic itself, so it also works offline once it has loaded.
What each line of the result means
| Line | Meaning |
|---|---|
| Network address | The first address of the block. It names the network and is not given to a device |
| Subnet mask | Which leading bits are the network part, written as four numbers |
| Wildcard mask | The mask inverted. Some firewall and router rules are written with it |
| First and last usable address | The range you can give to devices |
| Broadcast address | The last address of the block. Data sent to it reaches every device on the network |
| Addresses in the block | 2 to the power (32 minus the prefix) |
| Usable for devices | The block less the network and broadcast addresses |
| Kind of address | Private, public, loopback and so on, from the reserved ranges |
| Old class | Class A, B or C under the scheme used before 1993. Shown for exam questions; it does not affect the result |
A worked example
Take 192.168.1.77/26. A /26 leaves 32 − 26 = 6 bits for devices, so each block has 2^6 = 64 addresses. The blocks in the last number start at 0, 64, 128 and 192. The address .77 lies between 64 and 127, so:
- Network address:
192.168.1.64 - Usable range:
192.168.1.65to192.168.1.126(62 devices) - Broadcast address:
192.168.1.127 - Mask:
255.255.255.192
The calculator opens with this address; choose /26 to check it.
Special cases the calculator handles
- /31: two addresses and both are usable. It is meant for a link between two routers, where a broadcast address is not needed.
- /32: exactly one address. Used in routing tables and firewall rules to mean "this one device".
- Very large blocks such as /8 (16,777,216 addresses) are shown in full.
Choosing a prefix for a number of devices
Find the smallest block whose usable count covers your devices, and leave room to grow: 14 devices fit in a /28, 30 in a /27, 62 in a /26, 126 in a /25, 254 in a /24, 510 in a /23. The CIDR table lists every size from /0 to /32. For the idea behind masks, read subnet masks and CIDR explained.
Can it calculate IPv6 subnets?
Not this tool. IPv6 networks are almost always a /64. To tidy or expand an IPv6 address, use the IPv6 tool on this site.
Why are two addresses fewer usable than the block size?
The first address names the network and the last is the broadcast address. Neither can be given to a device, except in /31 and /32 blocks.
What mask does my home network use?
Almost certainly 255.255.255.0, which is /24. Your device's network details show it beside the IP address.