VLSM Calculator

Split a network into right-sized subnets.

Parent network the block to divide

Subnets you need hosts each must hold

How this plan is worked out

The requirements below are the example loaded by Try an example: a 192.168.1.0/24 split for five groups. The calculator sorts them largest first, gives each the smallest block that holds its hosts plus the two reserved addresses, and places the blocks end to end.

Subnet Hosts Block Usable range Mask Spare
Sales 60 192.168.1.0/26 192.168.1.1 – 192.168.1.62 255.255.255.192 2
Engineering 28 192.168.1.64/27 192.168.1.65 – 192.168.1.94 255.255.255.224 2
Management 10 192.168.1.96/28 192.168.1.97 – 192.168.1.110 255.255.255.240 4
WAN A 2 192.168.1.112/30 192.168.1.113 – 192.168.1.114 255.255.255.252 0
WAN B 2 192.168.1.116/30 192.168.1.117 – 192.168.1.118 255.255.255.252 0

That uses 120 of the 256 addresses (46.9%). The remaining 136 addresses, from 192.168.1.120 to 192.168.1.255, stay free as 192.168.1.120/29 and 192.168.1.128/25, ready for the next subnet.

Frequently asked questions

What is VLSM?

Variable-length subnet masking lets you divide one network into subnets of different sizes, so each group gets a block that fits its host count instead of every subnet being the same size. It wastes far fewer addresses than fixed-size subnetting.

How do you allocate subnets with VLSM?

List the groups from largest to smallest, give each the smallest block that holds its hosts plus two reserved addresses (network and broadcast), and place the blocks one after another so each starts on a boundary that is a multiple of its own size.

Why is the largest subnet allocated first?

Large blocks need to start on large boundaries. Placing them first means every smaller block that follows is automatically aligned, and no addresses are lost to padding between blocks.

Does the VLSM calculator have an API?

Yes. Send a GET request to /api/vlsm/{parent network} with a hosts parameter such as hosts=Sales:60,Engineering:28 and it returns the same plan as JSON. No authentication is required.

Use it from code

The same plan is one request away. No API key needed:

curl "https://networkcalc.com/api/vlsm/192.168.1.0/24?hosts=Sales%3A60%2CEngineering%3A28%2CManagement%3A10%2CWAN%20A%3A2%2CWAN%20B%3A2"

See the VLSM Calculator API docs, or work out a single subnet with the subnet calculator. Need to list a range as CIDR blocks? Try the IP range to CIDR converter.

More Tools