VLSM Calculator
Enter a base network and how many hosts each subnet needs. The calculator allocates variable-length subnets largest first so the space packs without gaps, and gives you the network, mask, host range, and broadcast for each. Runs in your browser.
| Subnet | Network | Mask | Range | Broadcast | Usable |
|---|---|---|---|---|---|
| Sales/26 | 192.168.1.0 | 255.255.255.192 | 192.168.1.1 - 192.168.1.62 | 192.168.1.63 | 62 / 50 |
| Engineering/27 | 192.168.1.64 | 255.255.255.224 | 192.168.1.65 - 192.168.1.94 | 192.168.1.95 | 30 / 25 |
| Operations/28 | 192.168.1.96 | 255.255.255.240 | 192.168.1.97 - 192.168.1.110 | 192.168.1.111 | 14 / 10 |
| WAN link/30 | 192.168.1.112 | 255.255.255.252 | 192.168.1.113 - 192.168.1.114 | 192.168.1.115 | 2 / 2 |
Why largest first
VLSM (Variable Length Subnet Masking) means carving one block into subnets of different sizes instead of splitting it evenly. The trick is to allocate the biggest subnet first. Each subnet has to start on a boundary that matches its own size, so placing the large ones first keeps everything aligned and avoids wasting a half-empty block in the middle.
Each subnet gets rounded up to the next power of two that fits its hosts plus two (the network and broadcast addresses). Ask for 50 hosts and you get a /26 (64 addresses, 62 usable), because a /27 would only hold 30.
Working out a single subnet instead of a whole plan? The subnet calculator expands one prefix, and the subnet mask cheat sheet lists every prefix at a glance.