Free Online VLSM Calculator
Plan subnets of different sizes from one IPv4 network. Enter the hosts each department or link needs and get the subnets, masks and host ranges, largest first.
Network
The block to divide, with its prefix
An IPv4 network, such as 10.0.0.0/16 or 192.168.0.0 255.255.255.0.
Adds this much to every subnet's host count before sizing it, so each has room to grow.
Subnets needed
A name and the number of hosts for each
Hosts means devices that need an address. The network and broadcast addresses are added for you.
Address space
192.168.0.0/24
| Name | Subnet | Host range |
|---|---|---|
Guests 100 needed, 126 usable | 192.168.0.0/25 255.255.255.128 | 192.168.0.1 - 192.168.0.126 Broadcast 192.168.0.127 |
Sales 50 needed, 62 usable | 192.168.0.128/26 255.255.255.192 | 192.168.0.129 - 192.168.0.190 Broadcast 192.168.0.191 |
IT 20 needed, 30 usable | 192.168.0.192/27 255.255.255.224 | 192.168.0.193 - 192.168.0.222 Broadcast 192.168.0.223 |
Router link 2 needed, 2 usable | 192.168.0.224/30 255.255.255.252 | 192.168.0.225 - 192.168.0.226 Broadcast 192.168.0.227 |
Still free
Room for more subnets
- 192.168.0.240/28 (16)
- 192.168.0.232/29 (8)
- 192.168.0.228/30 (4)
How to use
Enter the network you want to divide, with its prefix, such as 192.168.0.0/24 or 10.0.0.0/16.
Add a subnet for each group of devices, with a name and the number of hosts it needs.
Read the subnet, mask, host range and broadcast address of each one, and the free blocks left over.
Copy the plan as text or download it, and turn on Use /31 for links if your point-to-point links use /31, and choose a Growth room to leave space for more devices.
Why use this tool
Right-sized subnets
Each subnet is the smallest block that holds the hosts you asked for, plus its network and broadcast addresses.
Largest first, aligned
Subnets are placed from the largest down, so every block starts on its own boundary and the free space stays in one run.
See the space
A bar shows how the network is shared out, with the used percentage and the free blocks listed.
Clear when it does not fit
If the subnets need more addresses than the network has, the tool says how many, and the smallest network that would do.
/31 links
Switch on /31 to give links of one or two hosts a /31 (RFC 3021) instead of a /30.
Growth room
Add 10% to 50% to every host count before the subnets are sized, so each one has room to grow.
Copy or download
Copy the plan as tab-separated text, ready for a spreadsheet, or download it as a text file.
About this tool
A VLSM calculator divides one IPv4 network into subnets of different sizes, so each department, floor or link gets the room it needs and little is wasted. VLSM stands for variable length subnet masking. Enter the network you have, such as 192.168.0.0/24, then add a name and the number of hosts for each subnet. The tool gives each one the smallest subnet that fits, with its network address, mask, host range and broadcast address.
Subnets are placed largest first. That is the standard way to plan VLSM, because every block then starts on its own size boundary and the free space is left in one piece at the end. A bar shows how the address space is shared out, and a list shows the blocks that are still free for later. If the subnets do not fit, the tool says how many addresses they need and how large a network would hold them.
It is useful for planning an office or campus network, working through a networking course exercise, or checking an address plan before you configure routers and VLANs. To look at a single subnet in detail, use the IP Subnet Calculator.
Frequently asked questions
Variable length subnet masking means splitting one network into subnets of different sizes, so a large department gets a large subnet and a two-device link gets a very small one. Without it, every subnet would be the same size and a lot of addresses would go unused.
A subnet must start on an address that is a multiple of its own size. Placing the largest first means every later, smaller subnet lands on a valid boundary with no gaps, and whatever is left over stays together at the end.
A subnet of 2 to the power of n addresses holds that number minus two hosts, because the network address and the broadcast address cannot be given to a device. For 50 hosts the tool uses a /26, which has 64 addresses and 62 usable.
A /31 has two addresses and, on a point-to-point link, both can be used (RFC 3021). Switch on Use /31 for links if your routers support it. Otherwise a two-host link needs a /30, which has four addresses.
The tool shows how many addresses the subnets need and how many the network has, and names the smallest prefix that would hold them. Choose a larger network, such as a /23 instead of a /24, or reduce the host counts.
By default each subnet is the smallest size that fits. Choose a Growth room under Network, from 10% to 50%, and every host count is raised by that much before the subnet is sized. The free blocks are the room left for new subnets.
No. This tool plans IPv4 networks. IPv6 subnets are usually all the same size, a /64, so VLSM is rarely needed there.