VLSM Calculator
Split one IPv4 network into subnets of different sizes, largest first, each sized for the hosts you need, with no overlap.
VLSM Calculator
An IPv4 network with its prefix, such as 192.168.1.0/24
| Subnet | Hosts needed | Hosts available | Network | Mask | Usable range | Broadcast |
|---|---|---|---|---|---|---|
| Engineering | 100 | 126 | 192.168.1.0/25 | 255.255.255.128 | 192.168.1.1 – 192.168.1.126 | 192.168.1.127 |
| Office | 50 | 62 | 192.168.1.128/26 | 255.255.255.192 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 |
| Sales | 20 | 30 | 192.168.1.192/27 | 255.255.255.224 | 192.168.1.193 – 192.168.1.222 | 192.168.1.223 |
| Link | 2 | 2 | 192.168.1.224/30 | 255.255.255.252 | 192.168.1.225 – 192.168.1.226 | 192.168.1.227 |
28 addresses of 192.168.1.0/24 are still free, from 192.168.1.228.
Quick facts
- Price
- Free
- Sign-up
- Not required
- Where it runs
- On your device
- Files uploaded
- No
- Limits
- Up to 9.8 KB per input
- Updated
VLSM Calculator splits one IPv4 network into subnets of different sizes, each just large enough for the hosts it needs. Variable length subnet masking avoids wasting a /24 on a two-host link; it is a staple of network design courses and of planning addressing for an office, a lab or a cloud network.
How to use
- Type the network you have been given, with its prefix, such as
192.168.1.0/24. - List the subnets you need, one per line: a name and the number of hosts, such as
Office 50. A line with only a number gets a name like Subnet 3. - The plan updates as you type. The subnets are placed largest first from the start of the network, and the table shows each one’s network and prefix, mask, usable range and broadcast address. A line under the table says how much of the network is still free.
Examples
192.168.1.0/24 with Engineering 100, Office 50, Sales 20 and Link 2 gives 192.168.1.0/25 for Engineering (126 hosts), 192.168.1.128/26 for Office (62), 192.168.1.192/27 for Sales (30) and 192.168.1.224/30 for Link (2). That leaves 28 addresses free from 192.168.1.228. Notice that each subnet starts on a multiple of its own size.
Limits
Each subnet keeps a network and a broadcast address, so the smallest one it makes is a /30, and it does not use /31 or /32. It works with IPv4 only, refuses leading zeros such as 010.0.0.0, and plans up to 256 subnets. It always places the largest first and does not let you choose where a subnet goes.
FAQ
Why are the largest subnets placed first?
A subnet must start on a multiple of its own size. Placing the biggest blocks first means every smaller one that follows lands on a boundary it can use, so no addresses are skipped between subnets and none overlap.
Why did my subnet of 60 hosts get room for 62?
Subnet sizes are powers of two. Sixty hosts plus the network and broadcast addresses need 62 addresses, and the next power of two is 64, a /26, which leaves 62 usable host addresses.