VLSM Calculator
Divide one address block into subnets of different sizes: list how many hosts each one needs and get an efficient allocation instantly.
- Hosts per subnet
- Largest first
- Masks & ranges
- Space left
Subnets and hosts needed
Allocation (largest first)
| Subnet | Needed | Network | Mask | Usable range | Broadcast |
|---|---|---|---|---|---|
| Office | 100 / 126 | 192.168.10.0/25 | 255.255.255.128 | 192.168.10.1 – 192.168.10.126 | 192.168.10.127 |
| Wi-Fi | 50 / 62 | 192.168.10.128/26 | 255.255.255.192 | 192.168.10.129 – 192.168.10.190 | 192.168.10.191 |
| Servers | 20 / 30 | 192.168.10.192/27 | 255.255.255.224 | 192.168.10.193 – 192.168.10.222 | 192.168.10.223 |
| Link to ISP | 2 / 2 | 192.168.10.224/30 | 255.255.255.252 | 192.168.10.225 – 192.168.10.226 | 192.168.10.227 |
228 addresses allocated, 28 left in the block.
What is VLSM?
Variable Length Subnet Masking (VLSM) gives each subnet just the size it needs instead of splitting a network into equal pieces. A 100-host office gets a /25, a 50-host Wi-Fi network a /26 and a point-to-point link a /30, all carved from one /24 without overlaps. This calculator sorts your requirements from largest to smallest, rounds each up to the next power of two (including network and broadcast addresses) and allocates them in order, showing every network, mask, host range and broadcast, plus the space left over.
How to subnet with VLSM
- Enter the address block to divide, such as 192.168.10.0/24.
- List each subnet with the number of hosts it needs.
- Read the allocation table, sorted largest first.
- Copy networks and masks into your router or documentation.
Subnetting essentials
- Usable hosts = 2^(32 − prefix) − 2; the network and broadcast addresses are reserved.
- /31 links have 2 usable addresses (RFC 3021) and /32 is a single host.
- Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918).
- Wildcard mask = 255.255.255.255 − subnet mask, used in Cisco ACLs and OSPF.
Why use this vlsm calculator
- Instant and exactResults update as you type, with copy buttons on every value.
- Learn as you goBinary view highlights the network and host bits so subnetting makes sense.
- Splitting built inDivide any network into equal smaller subnets and list each range.
- Nothing leaves your browserNetwork plans and internal addressing are calculated on your device, never logged by a server.
Common uses
- Office networks. Departments of different sizes in one block.
- WAN links. /30 point-to-point links without wasting space.
- Exams and labs. Check CCNA VLSM exercises.
- IP address management. Document a growing network.
More network tools: convert addresses with the binary to decimal and hex to decimal converters, or test endpoints with the API tester. Browse all developer tools.
Example: three departments and a WAN link
Block 192.168.10.0/24 with IT 100, Sales 50 and WAN 2 hosts → IT 192.168.10.0/25, Sales 192.168.10.128/26, WAN 192.168.10.192/30, leaving 60 addresses free.
What to expect from the result
Subnets are allocated largest first, in address order, using the classic rule that each subnet reserves network and broadcast addresses (so 2 hosts need a /30). It does not reserve growth space automatically; add spare hosts to each requirement if you expect growth.
VLSM Calculator questions
How does VLSM work?
Sort subnets from largest to smallest, give each the smallest block that fits its hosts plus network and broadcast, and allocate blocks back to back.
Why allocate the largest subnet first?
Large blocks need large alignment boundaries. Allocating them first avoids gaps that waste address space.
What prefix do I need for 50 hosts?
A /26, which has 62 usable hosts. A /27 has only 30.
Can I use /31 for point-to-point links?
Yes on most modern routers (RFC 3021), saving two addresses per link. This planner uses the traditional /30.
What if my requirements do not fit?
The calculator tells you which subnet ran out of space. Use a larger block or reduce host counts.