VLSM Calculator — split a network into subnets by host count
A VLSM calculator (variable-length subnet mask calculator) splits one network into several differently sized subnets, each sized to just fit the number of hosts it needs, instead of forcing every subnet to the same fixed size and wasting addresses on the smaller ones.
VLSM calculator
Enter the base network and one department/host-count per line (largest allocated first).
156 addresses left unallocated.
| Department | Network/mask | Network addr. | Usable range | Broadcast | Usable hosts |
|---|---|---|---|---|---|
| Sales (60 hosts) | 192.168.0.0/26 | 192.168.0.0 | 192.168.0.1 – 192.168.0.62 | 192.168.0.63 | 62 |
| HR (25 hosts) | 192.168.0.64/27 | 192.168.0.64 | 192.168.0.65 – 192.168.0.94 | 192.168.0.95 | 30 |
| WAN (2 hosts) | 192.168.0.96/30 | 192.168.0.96 | 192.168.0.97 – 192.168.0.98 | 192.168.0.99 | 2 |
VLSM vs fixed-length subnetting
Fixed-length subnetting splits a network into equal-sized pieces — simple to plan, but wasteful when some subnets need 2 hosts and others need 200: giving every subnet the same /26, for example, wastes most of the block on a point-to-point WAN link. VLSM instead lets each subnet use only the mask it needs, which is why it’s standard practice on any network with a mix of large LANs and small links.
Worked example
Starting from 192.168.0.0/24 (254 usable addresses) with Sales needing 60 hosts, HR needing 25 and a WAN link needing 2: allocate Sales first (needs a /26, 62 usable) at 192.168.0.0/26, then HR (needs a /27, 30 usable) at the next aligned block, 192.168.0.64/27, then WAN (needs a /30, 2 usable) at 192.168.0.96/30 — leaving 192.168.0.100 through .255 free for future growth.
Frequently asked questions
Why allocate the largest subnet first?
Each subnet must start on an address boundary matching its own size. Allocating from largest to smallest keeps the blocks packed tightly; allocating small-to-large tends to leave unusable gaps between subnets.
What happens if the requests don’t fit?
The calculator stops allocating and tells you which request didn’t fit, so you can use a larger base network or reduce a host count instead of silently handing out overlapping ranges.
Why does a 2-host link still need a /30?
Every subnet still needs a network address and a broadcast address, so the smallest subnet that gives 2 usable host addresses is a /30 (4 total addresses, 2 usable). A /31 (RFC 3021) can be used for point-to-point links where both addresses are usable, but it is a special case most equipment must support explicitly.
This calculator is part of SeaMeWe4 Net Tools, an independent set of free networking calculators.
Was this page helpful?
One tap tells us which guides need more detail.
Thanks for your feedback!