Skip to main content
KalkuNet

VLSM Calculator: Subnets Sized by Host Count

Carve one IP block into subnets sized to each network's host count, with no overlaps.

Calculated in your browserNetwork
Networks and the hosts they need
#Network nameHosts needed
1
2
3
4
5
Addresses allocated
244
Addresses left
12
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

NetworkNeededSubnetSubnet maskHost rangeBroadcastHostsSpare
Staff100192.168.50.0/25255.255.255.128192.168.50.1 – 192.168.50.126192.168.50.12712626
Computer lab50192.168.50.128/26255.255.255.192192.168.50.129 – 192.168.50.190192.168.50.1916212
Guest Wi-Fi25192.168.50.192/27255.255.255.224192.168.50.193 – 192.168.50.222192.168.50.223305
Servers10192.168.50.224/28255.255.255.240192.168.50.225 – 192.168.50.238192.168.50.239144
Router link2192.168.50.240/30255.255.255.252192.168.50.241 – 192.168.50.242192.168.50.24320

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

Related tools & guide