VLSM Subnet Calculator
Carve a base network into right-sized subnets. Enter how many hosts each subnet needs and get an efficient, non-overlapping allocation with networks, masks, ranges and usable counts. Runs entirely in your browser.
Sales 50.
What a VLSM calculator does
Classic "fixed-length" subnetting splits a network into equal pieces, which wastes addresses when your subnets vary wildly in size โ a link with two hosts does not need the same block as a floor with 200 users. Variable Length Subnet Masking (VLSM) fixes that by letting each subnet use its own prefix length, sized to its real host count.
This tool takes a base block such as 192.168.1.0/24 and a list of host requirements. It sorts the requirements from largest to smallest, and for each one it picks the smallest subnet whose usable capacity โ 2(32โprefix) โ 2 โ is at least what you asked for. It then hands out blocks sequentially from the start of the base network, each aligned on its natural boundary so nothing overlaps.
Base 192.168.1.0/24 with needs of 50, 20 and 10 hosts yields 192.168.1.0/26 (62 usable), 192.168.1.64/27 (30 usable) and 192.168.1.96/28 (14 usable). The three blocks sit back to back with no gaps and no overlap, using just 112 of the 256 addresses.
Why sort largest first?
Placing the biggest subnet at the start guarantees each following block lands on an address that is already a multiple of its own size. That alignment is what keeps VLSM tidy โ allocate small blocks first and you can strand address space you can no longer use for a big subnet. If your combined requirements ever exceed the base block, the calculator stops and names the subnet that would not fit.
Want the fundamentals behind the numbers? Read what is a subnet mask, and if you are weighing address space, IPv4 vs IPv6 puts the scarcity in context. For simpler jobs, the Subnet Calculator handles a single block and the Hosts per Subnet tool answers "how many hosts fit in a /26?" at a glance. Everything is computed locally โ no address plan you enter is ever uploaded.
Frequently asked questions
What is VLSM?
VLSM stands for Variable Length Subnet Mask. Instead of splitting a network into equal-sized subnets, it lets you use different prefix lengths so each subnet is sized to the hosts it actually needs, wasting far fewer addresses.
How does the calculator choose each subnet size?
For each requirement it picks the smallest subnet whose usable host count is at least the number requested. Usable hosts equal 2(32โprefix) โ 2, so it finds the prefix where that value first meets your need.
Why are the requirements sorted largest first?
Allocating the biggest subnets first keeps every block aligned on its natural boundary and prevents fragmentation, so the address space is used efficiently with no overlap.
What happens if the subnets do not fit?
If the combined requirements exceed the base network, the calculator stops and tells you which subnet no longer fits, so you can pick a larger base block or reduce the host counts.
Want the theory? Read the guides โ ยท Visit the zoo โ