VLSM Calculator: Subnets Sized by Host Count
Carve one IP block into subnets sized to each network's host count, with no overlaps.
- Subnets allocated
- 5
- Parent block used
- 95.3%
- Spare hosts inside the subnets
- 47
- Next free address
- 192.168.50.244
Allocation from 192.168.50.0/24
| Network | Needed | Subnet | Subnet mask | Host range | Broadcast | Hosts | Spare |
|---|---|---|---|---|---|---|---|
| Staff | 100 | 192.168.50.0/25 | 255.255.255.128 | 192.168.50.1 – 192.168.50.126 | 192.168.50.127 | 126 | 26 |
| Computer lab | 50 | 192.168.50.128/26 | 255.255.255.192 | 192.168.50.129 – 192.168.50.190 | 192.168.50.191 | 62 | 12 |
| Guest Wi-Fi | 25 | 192.168.50.192/27 | 255.255.255.224 | 192.168.50.193 – 192.168.50.222 | 192.168.50.223 | 30 | 5 |
| Servers | 10 | 192.168.50.224/28 | 255.255.255.240 | 192.168.50.225 – 192.168.50.238 | 192.168.50.239 | 14 | 4 |
| Router link | 2 | 192.168.50.240/30 | 255.255.255.252 | 192.168.50.241 – 192.168.50.242 | 192.168.50.243 | 2 | 0 |
Formula and sources
Each network's prefix = 32 − ⌈log₂(hosts + 2)⌉ (2 addresses for network and broadcast); /31 for 2-host links when chosen Sort by need, largest first, then allocate one after another from the start of the parent block: every subnet lands on a multiple of its size Spare = usable hosts − hosts needed
When to use the VLSM
Subnets sized to the need
VLSM gives each network the prefix it needs: 100 hosts get a /25, 50 hosts a /26, 25 hosts a /27 and a router link a /30. Compared with cutting everything into /24s, far fewer addresses are wasted.
Largest first
Needs are sorted from the largest and allocated one after another from the start of the parent block. Every subnet then lands on a valid boundary and nothing overlaps, exactly as the manual method in networking courses.
What is left and what is spare
The result shows the addresses used, the addresses left in the parent block and the next free address for a future network. The spare column shows the empty hosts inside each subnet.
/30 or /31 links
Point-to-point links between routers usually take a /30 with 2 hosts. Modern routers also support /31 under RFC 3021, which saves half the addresses; choose what your devices support.
Frequently asked questions
How is VLSM different from ordinary subnetting?
Ordinary subnetting cuts a block into equal subnets. VLSM uses a different size for each network. For equal splits, use the IPv4 subnet calculator.
Why is the table in a different order?
Allocation always starts with the largest network so every block stays aligned to its boundary. Each row still carries its network name.
What if the parent block is too small?
The calculator names the network that no longer fits. Use a shorter parent prefix, such as a /23 instead of a /24, or reduce the host counts.
Related calculators
- IPv4 SubnetNetwork, broadcast, host range and count, masks and binary from an IP/prefix, plus equal subnet splits.Example: Network address192.168.10.64/26Calculate →
- IPv6 SubnetPrefix, first and last address, short and full forms, /64 count, ip6.arpa and /48 to /64 splits.Example: Prefix (compressed)2001:db8:abcd::/48Calculate →
- Data Transfer TimeHow long a file or backup takes at a link speed, or the speed needed to finish in time.Example: Transfer time01:14:04Calculate →