Create a free account
Free tool · no sign-up

VLSM calculator

Right-sized subnets from one network, largest-first.

SubnetNeededNetworkMaskUsable rangeBroadcastHosts
Sales50192.168.1.0/26255.255.255.192192.168.1.1 – 192.168.1.62192.168.1.6362
Engineering25192.168.1.64/27255.255.255.224192.168.1.65 – 192.168.1.94192.168.1.9530
Management10192.168.1.96/28255.255.255.240192.168.1.97 – 192.168.1.110192.168.1.11114
WAN link2192.168.1.112/30255.255.255.252192.168.1.113 – 192.168.1.114192.168.1.1152

Allocated largest-first from 192.168.1.0/24. Used 116 of 256 addresses · 140 left.

How it works

The VLSM method in four steps

  • List your requirements — how many usable hosts each subnet needs (a 50-host LAN, a 2-host WAN link, and so on).
  • Sort biggest first — always allocate the largest subnet before the smaller ones so every block lands on a valid boundary.
  • Pick the smallest mask that fits — for each requirement, use the smallest block whose usable count (2^host-bits − 2) covers it.
  • Hand out the next block — start the next subnet where the last one ended, and repeat until every requirement is placed.

VLSM calculator FAQ

What is VLSM?

VLSM (Variable Length Subnet Masking) means using different subnet masks inside the same network so each subnet is sized to what it actually needs. Instead of wasting a /24 on a link that needs two addresses, you give a 50-host LAN a /26 and a point-to-point WAN link a /30. It conserves address space and is a core CCNA skill.

How does this calculator allocate the subnets?

It sorts your requirements largest-first, then for each one picks the smallest block whose usable host count (2^host-bits − 2) covers the requirement, and hands out the next available aligned block. Allocating largest-first from an aligned base is the standard VLSM method — it guarantees the blocks line up on their boundaries and never overlap.

Why must I subnet the biggest requirement first?

Because each subnet must start on a boundary that is a multiple of its own block size. If you allocate the largest blocks first from an aligned starting point, every later (smaller) block automatically lands on a valid boundary. Do it out of order and you can strand address space or create overlaps.

What if my subnets don't fit?

The calculator flags any subnet that runs past the end of the base block and tells you how many addresses are left. Fix it by choosing a larger base block (a smaller prefix, e.g. /23 instead of /24) or by trimming the host requirements.

Free — no account needed

More tools

A VLSM plan is only right once it forwards traffic

Build the plan on real Cisco IOS and grade your config against the answer key. See the subnetting labs or read Subnetting explained.