Fixed-length subnetting wastes addresses. If one department needs 100 hosts and another needs 5, giving both a /24 means burning through address space you don't have to spare. Variable Length Subnet Masking (VLSM) fixes this by letting you size each subnet to match its actual requirement, and this calculator handles the arithmetic for you.
How to use the VLSM calculator
- Enter your base network address and prefix, for example 192.168.0.0/24.
- List the number of hosts each subnet needs to support (comma or line separated).
- The calculator allocates subnets from largest to smallest and shows network, broadcast, and usable range for each.
Why VLSM is worth learning properly
VLSM is where subnetting theory becomes network design. Real networks are never made up of equally sized segments — a head office might need 500 addresses, a branch office 50, and a point-to-point WAN link only 2. This is also a heavily weighted topic on the CCNA exam because it tests the ability to sequence and allocate address space efficiently across multiple requirements.
Worked example
Say you're given 172.16.0.0/22 and need subnets for 100 hosts, 50 hosts, 20 hosts, and a point-to-point link (2 hosts). You'd allocate a /25 (126 usable) for the 100-host segment first, then a /26 (62 usable) for 50 hosts, a /27 (30 usable) for 20 hosts, and a /30 (2 usable) for the WAN link — in that order, so each block starts on a correct boundary.
Subnet requirements are calculated locally. Your network design data never leaves your browser.
