VLSM (Variable Length Subnet Mask) Calculator
Enter a base network and a list of required host counts to get VLSM subnets sized to fit each host count, allocated largest first, with the leftover space listed.
VLSM (variable length subnet masking) splits one network into subnets of different sizes.
Use the VLSM (Variable Length Subnet Mask) Calculator
VLSM Configuration
Must use the network address, not a host address.
Enter the number of usable hosts needed per subnet.
Configure the base network and subnet requirements, then click Calculate.
Allocation Summary
Base Network
Total Addresses
Remaining Free
Unallocated Address Space
Quick answer
VLSM (variable length subnet masking) splits one network into subnets of different sizes. Sort the host counts from largest to smallest, give each the smallest block that holds its hosts plus 2 (network and broadcast), and allocate the blocks in order. For 192.168.10.0/24 with 50, 30, 14 and 2 hosts you get a /26, /27, /28 and /30, using 116 of 256 addresses.
Examples
| Hosts needed | Subnet | Usable |
|---|---|---|
| 50 | 192.168.10.0/26 | 62 |
| 30 | 192.168.10.64/27 | 30 |
| 14 | 192.168.10.96/28 | 14 |
| 2 | 192.168.10.112/30 | 2 |
| Left over | .116 to .255 | 140 addresses |
Enter a base network, then click Calculate Subnets.
Summary
This VLSM calculator allocates multiple subnets of different sizes from a single base network block. You specify how many hosts each subnet needs, and the tool assigns the smallest possible subnet prefix to each requirement — sorted largest first to avoid fragmentation. It shows the network address, subnet mask, broadcast address, usable host range, and CIDR notation for every subnet, plus how many addresses remain unused.
How it works
- Enter the base network in CIDR notation (e.g. 192.168.10.0/24).
- Add one or more subnet requirements, each with a label and the number of hosts needed.
- Click "Calculate Subnets" to run the VLSM algorithm.
- The tool sorts requirements largest-first to minimize wasted space.
- Each subnet gets the smallest prefix that satisfies the host count (accounting for network and broadcast addresses).
- Results show the network address, mask, broadcast, first/last usable host, and remaining address space.
Use cases
- Design enterprise network layouts with departments of different sizes.
- Allocate cloud VPC subnets for dev, staging, and production environments.
- Prepare CCNA and network engineering exam practice problems.
- Split a /24 block into web, app, database, and management subnets.
- Minimize address waste when allocating ISP-assigned blocks.
- Document and verify existing VLSM network designs.
- Plan point-to-point WAN links as /30 subnets alongside larger LAN blocks.
- Audit IP address utilization efficiency across a multi-site organization.