🧩 VLSM Calculator
Enter a base network and a list of required host counts (one per line, e.g. one per department). The calculator allocates the smallest fitting subnet for each, largest requirement first.
Input
Results
| Subnet | Required | Allocated | CIDR | Mask | Network | First Host | Last Host | Broadcast |
|---|
How It Works
VLSM (Variable-Length Subnet Masking) lets you carve one network into subnets of different sizes rather than one fixed size for all. The standard approach — used here — is to sort requirements from largest to smallest, then allocate each on the next available boundary aligned to its block size. This avoids wasting address space between subnets.
If a requirement doesn't fit inside the remaining space of the base network, the calculator reports this clearly rather than allocating an invalid range.
Examples & Common Use Cases
- 192.168.10.0/24 with 100, 50, 25, and 10 hosts fits comfortably, leaving room to spare.
- Try requesting more hosts than the base network can hold to see the "cannot fit" message.