VLSM calculator

List the subnets you need and how many hosts each must hold. The calculator sizes each one, allocates them largest-first inside your block with no overlap, and shows the waste. Runs in your browser.

VLSM plan
SubnetNeededNetworkHost rangeBroadcastUsable
Office LAN100192.168.10.0/25
255.255.255.128
192.168.10.1
192.168.10.126
192.168.10.127126 (+26)
Wi-Fi guests50192.168.10.128/26
255.255.255.192
192.168.10.129
192.168.10.190
192.168.10.19162 (+12)
Servers20192.168.10.192/27
255.255.255.224
192.168.10.193
192.168.10.222
192.168.10.22330 (+10)
Printers10192.168.10.224/28
255.255.255.240
192.168.10.225
192.168.10.238
192.168.10.23914 (+4)
WAN link A2192.168.10.240/30
255.255.255.252
192.168.10.241
192.168.10.242
192.168.10.2432 (+0)
WAN link B2192.168.10.244/30
255.255.255.252
192.168.10.245
192.168.10.246
192.168.10.2472 (+0)

Used 248 of 256 addresses in 192.168.10.0/24; 8 free for growth.

Worked example

The default plan above splits 192.168.10.0/24. The 100-host LAN needs 7 host bits (126 usable), so it gets a /25 at .0. The 50 guests need 6 bits: /26 at .128. Servers (20) take a /27 at .192, printers (10) a /28 at .224, and each WAN link a /30 at .240 and .244. Everything is aligned, nothing overlaps, and .248–.255 is still free.

For a single subnet's details, use the subnet calculator; to split one block into equal parts, use its "split" table. The cheat sheet lists hosts per prefix.

Questions people ask

What is VLSM?
Variable Length Subnet Masking means cutting one address block into subnets of different sizes, each sized to its need, instead of equal-sized subnets. A /24 can hold a /26 for 50 users, a /27 for 25 servers and several /30 links, rather than wasting four equal /26s.
How do you calculate VLSM?
Sort the requirements from largest to smallest. For each, pick the smallest prefix whose usable hosts (232−prefix − 2) cover the need, allocate it at the next free address that is a multiple of its block size, and move on. Largest-first keeps every block aligned with no gaps.
Why allocate the largest subnet first?
Blocks must start on a multiple of their size. Placing big blocks first keeps the free space aligned for the smaller ones; going smallest-first can leave unusable gaps.
What prefix do point-to-point links need?
Two hosts fit in a /30 (2 usable). RFC 3021 also allows /31 on point-to-point links, using both addresses; this calculator uses /31 when you ask for exactly 2 hosts and tick the /31 option.