VLSM Calculator
Split a base network into right-sized subnets from your host requirements — largest first, aligned, with zero overlaps.
Worked example
Splitting 192.168.1.0/24 into three right-sized subnets — 50 users, 10 printers and a point-to-point uplink — allocates the largest requirement first:
| Name | CIDR | Mask | Wildcard | Usable hosts | Address range | Allocated |
|---|---|---|---|---|---|---|
| Users | 192.168.1.0/26 | 255.255.255.192 | 0.0.0.63 | 62 | 192.168.1.1 – 192.168.1.62 | 64 |
| Printers | 192.168.1.64/28 | 255.255.255.240 | 0.0.0.15 | 14 | 192.168.1.65 – 192.168.1.78 | 16 |
| Uplink | 192.168.1.80/30 | 255.255.255.252 | 0.0.0.3 | 2 | 192.168.1.81 – 192.168.1.82 | 4 |
Leftover space: 192.168.1.84 – 192.168.1.255.
Each subnet starts on a boundary matching its own size, which keeps every allocation routable and leaves one contiguous remainder instead of scattered gaps.
What VLSM is and why order matters
VLSM (Variable Length Subnet Masking) means different subnets inside the same parent block can use different prefix lengths, each sized to its actual host count instead of a single one-size-fits-all mask. It is the default way modern networks are addressed; classful subdivision wastes most of a /24 when only six addresses are needed.
The allocator sorts requirements largest-first and places each block at the next aligned offset. This ordering minimizes fragmentation: small subnets slot into the remaining space cleanly, whereas allocating small blocks first tends to strand misaligned holes that no later block can occupy. Every placement respects natural boundaries — a /26 always begins at a multiple of 64 addresses.
- A request for N hosts gets the smallest prefix where 2(32 − p) ≥ N + 2 (network and broadcast reserved). A two-endpoint uplink is therefore sized as a /30; on platforms with RFC 3021 support you can safely tighten it to a /31 by hand.
- If the requests cannot fit, the tool reports exactly which subnet overflowed.
Need the reverse operation? Convert existing ranges into clean blocks with the range-to-CIDR converter, or look up any mask on the subnet cheat sheet.