VLSM Calculator

Enter the base address, the prefix, and the host count of each subnet — the calculator allocates the space efficiently.

What VLSM is

VLSM (Variable Length Subnet Mask) is the technique of splitting a network into several subnets of different sizes, each exactly the size it needs — unlike splitting everything into equal subnets (which wastes addresses when different segments have very different needs, like a building with a 100-person department and a 5-person one).

How the calculator allocates the subnets

The calculator sorts the subnets from the largest to the smallest host count (the recommended order for efficient allocation), calculates the smallest address block that fits each count (including the 2 reserved network and broadcast addresses), and allocates sequentially from the base address — but displays the result in the original order you typed.

Example

Base network 192.168.1.0/24 with subnets of 100, 50, 25 and 10 hosts: the calculator allocates 192.168.1.0/25 (100 hosts, up to 126 usable), 192.168.1.128/26 (50 hosts, up to 62), 192.168.1.192/27 (25 hosts, up to 30) and 192.168.1.224/28 (10 hosts, up to 14) — using 240 of the 256 available addresses.

Frequently asked questions

Why does the allocation order matter?

Allocating from the largest subnet to the smallest avoids fragmenting the address space — if you allocated a small subnet in the middle of the space before a large one, the large one might no longer fit in the remaining contiguous space.

What happens if the subnets don't fit in the base network?

The calculator warns that the sum of the subnets exceeds the available space, and suggests using a larger base network (smaller prefix) or reducing the host count requested for some subnet.