Updated on April 15th, 2026

VLSM Calculator

Created By Jehan Wadia

Base Network Input

Enter network in format: x.x.x.x/prefix
Network Address
192.168.1.0
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Broadcast Address
192.168.1.255
Total Addresses
256
Usable Hosts
254

Define Subnet Requirements

Add your subnet requirements below. Subnets will be allocated from largest to smallest (VLSM best practice). Specify the number of needed hosts per subnet.

Subnet requirement entries

Introduction

Variable Length Subnet Masking (VLSM) lets you split a network into subnets of different sizes. Instead of giving every subnet the same number of IP addresses, VLSM lets you assign only what each subnet actually needs. This saves IP addresses and makes your network more efficient.

Our VLSM Calculator does the math for you. Just enter your network address, subnet mask, and the number of hosts each subnet needs. The calculator will figure out the best way to divide your network. It gives you the subnet address, broadcast address, usable host range, and subnet mask for each subnet. This tool is helpful for students learning subnetting, network engineers planning new networks, and anyone studying for IT certifications like the CCNA. For standard equal-sized subnetting, you may also want to try our Subnet Calculator, and for broader CIDR block analysis, check out our CIDR Calculator.

How to use our VLSM Calculator

Enter your network address, subnet mask, and the number of hosts needed for each subnet. The calculator will divide your network into smaller subnets using Variable Length Subnet Masking (VLSM), giving you the most efficient use of IP addresses.

Network Address: Type in the starting IP address of your network. This is the base address you want to split into subnets. For example, 192.168.1.0.

Subnet Mask (CIDR): Enter the prefix length or subnet mask for your main network. This tells the calculator how big your total address space is. For example, /24 gives you 256 total addresses. If you need help determining the right CIDR block size for your network, our CIDR Calculator can assist.

Number of Subnets: Enter how many subnets you need to create from your network. Each subnet will be sized based on the number of hosts you assign to it.

Hosts per Subnet: For each subnet, enter the number of usable host addresses you need. List them in order. The calculator will sort them from largest to smallest and assign the right subnet size to each one automatically.

Once you click calculate, the tool will output each subnet's network address, broadcast address, usable host range, subnet mask, and CIDR notation. It will also show you how many addresses are wasted so you can see how efficient your design is.

What Is VLSM?

VLSM stands for Variable Length Subnet Masking. It is a method used in networking to divide a single network into smaller sub-networks (called subnets) of different sizes. Unlike fixed-length subnetting, where every subnet gets the same number of addresses, VLSM lets you assign exactly the right amount of address space each subnet needs. This means you waste fewer IP addresses and use your network more efficiently.

Why VLSM Matters

Every network has a limited number of IP addresses. If you use fixed subnetting, a department with 10 computers gets the same size subnet as one with 200 computers. That wastes a lot of addresses. With VLSM, you give the large department a big subnet and the small department a small one. This is especially important for organizations that need to manage their IPv4 address space carefully, since available IPv4 addresses are scarce. For a quick look at how fixed-length subnetting compares, try our Subnet Calculator.

How VLSM Works

VLSM follows a simple process:

  1. Start with a base network. This is your full block of IP addresses, written in CIDR notation (for example, 192.168.1.0/24, which gives you 256 total addresses). You can verify your base network details using our CIDR Calculator.
  2. List your subnets by size. Sort them from the one needing the most hosts down to the one needing the fewest. This is a best practice because larger blocks need to be aligned on specific address boundaries.
  3. Assign address blocks one at a time. For each subnet, pick the smallest possible prefix length (subnet mask) that can hold the required number of hosts. A subnet with 50 hosts, for example, needs a /26 block (64 total addresses, 62 usable). A subnet with 10 hosts needs a /28 block (16 total addresses, 14 usable).
  4. Move to the next available address and repeat until all subnets are allocated.

Key Terms to Know

A Quick Example

Say you have the network 192.168.1.0/24 (256 addresses) and four departments:

Total allocated: 152 addresses out of 256. That leaves 104 addresses free for future growth. Without VLSM, using a single fixed subnet size large enough for 50 hosts would waste far more space on the smaller departments.

When to Use VLSM

VLSM is used in almost all modern networks. It is supported by routing protocols like OSPF, EIGRP, and BGP, which are called classless routing protocols because they carry subnet mask information in their updates. Older classful protocols like RIPv1 do not support VLSM. If you are designing a network, planning IP addresses, or studying for certifications like CCNA or CompTIA Network+, understanding VLSM is essential.


Frequently Asked Questions

What is the difference between VLSM and fixed-length subnetting?

Fixed-length subnetting gives every subnet the same size. VLSM lets you make each subnet a different size based on how many hosts it needs. VLSM wastes fewer IP addresses because small subnets get small blocks and large subnets get large blocks.

What does the Needed Hosts field mean?

The Needed Hosts field is where you type the number of devices (like computers, printers, or phones) that need an IP address on that subnet. The calculator then picks the smallest block size that fits that many hosts.

Why does the calculator sort subnets from largest to smallest?

Larger subnets must start on specific address boundaries. Allocating the biggest subnets first avoids gaps and alignment problems. This is a standard VLSM best practice that uses your address space most efficiently.

What is the difference between CIDR Notation mode and Detailed Entry mode?

CIDR Notation mode lets you type the network and prefix together, like 192.168.1.0/24. Detailed Entry mode lets you pick the IP address, prefix length, subnet mask, and max addresses from separate fields. Both give the same result.

Why are 2 addresses subtracted from the total to get usable hosts?

Every subnet reserves two addresses. The first address is the network address, which identifies the subnet. The last address is the broadcast address, which sends data to all devices on that subnet. Neither can be assigned to a device.

What does the Wasted Addresses number mean?

Wasted addresses are usable host addresses in a subnet block that you don't actually need. For example, if you need 50 hosts but the smallest block that fits is 62 usable addresses, 12 addresses are wasted.

What happens if my subnets need more addresses than the base network has?

The calculator will show an error telling you there is not enough address space. You will need to either use a larger base network (a smaller prefix number like /22 or /16) or reduce the number of hosts in your subnets.

Can I use this calculator for a /16 or /8 network?

Yes. You can enter any valid network with a prefix from /1 to /32. A /16 network gives you 65,536 addresses and a /8 network gives you over 16 million addresses. Just type it into the CIDR field like 10.0.0.0/16.

What is the Address Space Map at the top of the results?

The Address Space Map is a colored bar that shows how your base network is divided. Each color represents a different subnet. The gray section labeled "Free" is unallocated space you can use later.

What is a wildcard mask and when is it used?

A wildcard mask is the opposite of a subnet mask. Where the subnet mask has a 1, the wildcard has a 0, and vice versa. It is used in router access control lists (ACLs) and routing protocols like OSPF to match ranges of IP addresses.

How do I know which prefix length to use for a certain number of hosts?

The calculator picks it for you automatically. It finds the smallest power of 2 that is large enough to cover your hosts plus the 2 reserved addresses. For example, 50 hosts need at least 64 addresses, which is a /26 prefix.

Can I add more than 4 subnets?

Yes. Click the Add Subnet button to add as many subnets as you need. There is no fixed limit, but all subnets combined must fit within your base network's total address space.

What does the Utilization percentage mean?

Utilization shows what percentage of your total address space is actually needed by hosts. A higher percentage means you are using your addresses efficiently with less waste.

Does the calculator support IPv6?

No. This VLSM calculator works with IPv4 addresses only. IPv6 uses a different addressing system with a much larger address space, and VLSM is mainly an IPv4 concept.

What is the Subnet Binary row in the detailed results?

The Subnet Binary row shows the network address written in binary (ones and zeros). This helps you see exactly which bits belong to the network part and which belong to the host part, which is useful for learning and troubleshooting.


Related Calculators

Subnet Calculator

Visit Subnet Calculator

CIDR Calculator

Visit CIDR Calculator

Bandwidth Calculator

Visit Bandwidth Calculator