How it works
- Enter an address with a prefix or mask.
- Read the network details.
- Use the tabs to split, plan, convert ranges or test membership.
Why use it
- IPv4 and IPv6 with big number support.
- VLSM planning and even splits.
- Range to CIDR and network aggregation.
- Address type, class and reverse DNS.
Subnets and CIDR: calculating, splitting and checking ranges
Reading CIDR notation
An address such as 192.168.1.10/24 has two parts. The number after the slash says how many of the 32 bits, counted from the left, identify the network; the rest number the hosts inside it. A /24 leaves 8 bits for hosts, so 256 addresses, of which 254 can be given to devices: the first is the network itself and the last is the broadcast address. Each step down in the prefix doubles the size of the network.
| Prefix | Netmask | Addresses | Usable hosts |
|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /26 | 255.255.255.192 | 64 | 62 |
| /24 | 255.255.255.0 | 256 | 254 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
The calculator shows all of these for any address you type, plus the wildcard mask that firewalls and Cisco access lists use, the reverse DNS name, the address as a number and in hexadecimal, whether it is private, public, loopback or another special range, and the address in binary with the network bits in bold.
Splitting a network
- Equal parts divides a block into subnets of one size: a /24 into four /26 networks of 62 hosts each, for example.
- By host count (VLSM) fits subnets of different sizes into one block. Type how many hosts each needs, such as 100 for an office floor, 50 for Wi-Fi and 2 for a router link, and the planner assigns the smallest block that fits each, largest first, without overlaps.
Ranges and merging
Range to CIDR turns a start and end address, as many allow lists and firewall exports write them, into the smallest set of CIDR blocks that covers exactly that range. Aggregate networks does the reverse cleanup: paste a list of networks and adjacent or overlapping ones are merged into the fewest blocks, which keeps routing tables and firewall rules short. Contains checks whether an address falls inside a network, the quick way to answer "is this IP in our range?".
IPv6
IPv6 works the same way with 128 bits, written in hexadecimal groups. Networks are much larger: the standard subnet for a home or office LAN is a /64, with 18 quintillion addresses, and providers usually hand out a /48 or /56. The calculator shows both the compressed form, 2001:db8::1, and the full expanded form, and IPv6 has no broadcast address.
If something goes wrong
- It asks for a prefix. Add
/24or a netmask such as255.255.255.0after the address. - The network address differs from what you typed. You typed a host address; the network address is where its block starts.
192.168.1.10/24belongs to192.168.1.0/24. - A VLSM plan does not fit. The requested hosts need more space than the block has. Use a larger block or fewer hosts.
Questions and answers
How many hosts are in a /24?
A /24 has 256 addresses and 254 usable hosts, because the network and broadcast addresses are reserved.
What is a wildcard mask?
It is the inverse of the subnet mask and is used in some router access lists.
Does it work for IPv6?
Yes, including compression and expansion of addresses.