Visual Subnet Calculator
Start from a CIDR block, split it into halves and join them back, and see each subnet's share of the address space, its bit boundaries and its usable host range.
| Subnet | Share | Netmask | Usable range | Broadcast | Hosts | Actions |
|---|---|---|---|---|---|---|
| 192.168.0.0/2511000000101010000000000000000000 | 50% | 255.255.255.128 | 192.168.0.1 – 192.168.0.126 | 192.168.0.127 | 126 | |
| 192.168.0.128/2611000000101010000000000010000000 | 25% | 255.255.255.192 | 192.168.0.129 – 192.168.0.190 | 192.168.0.191 | 62 | |
| 192.168.0.192/2711000000101010000000000011000000 | 12.5% | 255.255.255.224 | 192.168.0.193 – 192.168.0.222 | 192.168.0.223 | 30 | |
| 192.168.0.224/2711000000101010000000000011100000 | 12.5% | 255.255.255.224 | 192.168.0.225 – 192.168.0.254 | 192.168.0.255 | 30 |
Bits under each subnet: grey inherited from the base block, accent borrowed as subnet bits, green host bits (always zero in a network address).
#x=192.168.0.0%2F24%3A25%2C26%2C27%2C27How split and join work
Every subnet is a block of 232−n addresses that starts on a multiple of its own size. Splitting a /n borrows one host bit and gives two /(n+1) blocks: the lower half with that bit 0 and the upper half with it 1. Joining is the reverse, and it is only possible for the two halves of the same parent - 192.168.0.64/26 and 192.168.0.128/26 are neighbours, but they belong to different /25s, so together they are not a CIDR block. The Join button appears on the lower half of a pair that can merge.
Because each move replaces a block by its exact halves or a pair by its exact parent, the plan always covers the starting network with no gaps and no overlaps, which is the property a VLSM design needs before it goes anywhere near a router.
Sizing subnets for hosts
| Need up to | Prefix | Addresses |
|---|---|---|
| 1 host (host route) | /32 | 1 |
| 2 hosts (point-to-point) | /31 | 2 |
| 2 hosts | /30 | 4 |
| 6 hosts | /29 | 8 |
| 14 hosts | /28 | 16 |
| 30 hosts | /27 | 32 |
| 62 hosts | /26 | 64 |
| 126 hosts | /25 | 128 |
| 254 hosts | /24 | 256 |
| 510 hosts | /23 | 512 |
| 1,022 hosts | /22 | 1,024 |
For one network in depth - wildcard mask, address class, private-range check and the full binary breakdown - use the subnet calculator. To see an address as the 32-bit integer it really is, use IP to decimal.
Code Examples
import ipaddress
net = ipaddress.ip_network("10.0.0.0/24")
lan, rest = net.subnets(prefixlen_diff=1) # two /25s
small = list(rest.subnets(new_prefix=27)) # four /27s
for s in [lan, *small]:
print(s, s.num_addresses - 2, "usable")Frequently Asked Questions
What is a visual subnet calculator?
A subnet planner that starts from one network block and lets you divide it by clicking. Each split halves a block into two subnets one prefix bit longer; each join merges two halves back. The bars show how much of the original address space each subnet takes.
How do I divide a network into subnets of different sizes (VLSM)?
Split only the blocks you need to make smaller. From 10.0.0.0/24, split once to get two /25s, keep the first /25 for a 126-host LAN, and keep splitting the second into /26, /27 and /30 blocks for smaller segments and point-to-point links. Every block stays aligned on its own size, so nothing overlaps.
Why can only some subnets be joined?
Two blocks merge only if they are the two halves of the same parent. 192.168.0.64/26 and 192.168.0.128/26 sit next to each other but belong to different /25s, so together they are not a valid CIDR block. The Join button appears only on true siblings.
How many usable hosts are in each subnet?
Addresses minus two: the network and broadcast addresses cannot be assigned. A /26 has 64 addresses and 62 usable hosts. A /31 is the exception (RFC 3021): two addresses, both usable, for point-to-point links. A /32 is a single host route.
How is this different from the subnet calculator?
The subnet calculator describes one network in depth: netmask, wildcard, class, scope and binary. This page plans many subnets inside one block, of different sizes, and exports the plan as a table.
Can I export the subnet plan?
Yes. Copy the table as CSV for a spreadsheet, JSON for scripts and infrastructure-as-code, or Markdown for documentation and tickets. The plan is also kept in the page URL so you can bookmark or share it.
Related Tools
This tool runs entirely in your browser - nothing you enter is uploaded or stored.