1. Home
  2. Developer tools
  3. VLSM Calculator

VLSM Calculator

Give each department the subnet it really needs. List the subnets and their host counts and the planner allocates them, largest first, inside your network.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use VLSM Calculator

  1. Enter the network to divide.
  2. List each subnet and the hosts it needs.
  3. Copy the table of subnets.

Features

  • Largest-first allocation on natural boundaries
  • Mask, host range and broadcast for each subnet
  • Shows addresses left unused
  • Clear error when the network is too small
  • Point-to-point /30 and /31 supported
  • CSV copy

Supported formats

Input

  • A network block
  • Host counts per subnet

You get

  • Subnet table
  • Unused space

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the VLSM Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Subnets are allocated largest first on power-of-two boundaries, so a different order can use space differently.
  • Each subnet reserves the network and broadcast address, except for /31 and /32 sizes.

Guide

Fitting subnets of different sizes into one address block

Splitting a network into equal parts wastes addresses when departments are different sizes. A sales floor with 100 devices and a router link with 2 should not both get a /25. Variable-length subnet masking (VLSM) gives each subnet only the size it needs. The page performs the allocation for a parent block and a list of host requirements, and shows the result as a table.

The method

First, sort the requirements from largest to smallest. For each, find the smallest block that can hold the hosts plus two reserved addresses, the network and the broadcast. Block sizes are powers of two, so 100 hosts need 102 addresses and round up to 128, a /25; 50 hosts need 52 and round up to 64, a /26. Then place the blocks one after another, each starting on a boundary that is a multiple of its own size. Largest-first order is what makes the boundaries line up without gaps; a small block put first would push the larger ones to later boundaries.

A link between two routers needs only two addresses. Normally a /30 is used (four addresses, two usable), but RFC 3021 allows a /31 on point-to-point links, using both addresses and having no broadcast. The page allocates a /31 when a requirement says two hosts, and shows the broadcast column as a dash. If your equipment does not support /31 links, plan those links by hand with a /30 and leave room for them in the parent block.

Using the page

Type the parent network, such as 192.168.1.0/24, and add a row for each subnet with a name and the number of hosts it must serve. Press Sample for a ready-made office plan. The parent must be an IPv4 network. The allocation table keeps your order and lists name, hosts needed, the subnet in CIDR notation, mask, usable host range, broadcast address and usable count, and the summary line shows how many addresses are left unused. Copy as CSV puts the table into a spreadsheet or a documentation page.

A worked example

The sample parent is 192.168.1.0/24 with five requirements. Sales needs 100 hosts and gets 192.168.1.0/25 (126 usable). Office needs 50 and gets 192.168.1.128/26 (62 usable). Guests needs 25 and gets 192.168.1.192/27 (30 usable). Lab needs 10 and gets 192.168.1.224/28 (14 usable). The router link needs 2 and gets 192.168.1.240/31. The blocks use 128 + 64 + 32 + 16 + 2 = 242 addresses, leaving 14 unused in the /24, which is the tail from 192.168.1.242 to 192.168.1.255.

Limits

The plan covers one parent block and assumes you want aligned, power-of-two subnets. It does not model growth: if a department may double, enter the future size. It does not know about your VLAN numbers, routing or DHCP scopes, and the layout is one valid solution, not the only one. For single subnet arithmetic use the Subnet Calculator.

Checked against the current version of the VLSM Calculator on .

Frequently asked questions

What happens if the subnets do not fit?

The page shows an error that names the first subnet for which there is no room left, with its size, instead of returning a partial plan. Make the parent block larger, for example a /23 instead of a /24, or trim a requirement.

Is it wrong to allocate the smallest subnet first?

It is not wrong, but it can strand space. Small blocks placed first push the next large block to the next aligned boundary and leave gaps. Starting with the largest keeps the unused space together at the end.

Why are the largest subnets allocated first?

Blocks must start on a multiple of their own size. Placing big blocks first keeps small ones from leaving gaps that a later big block cannot use.

How many host addresses does a subnet for 50 hosts need?

A /26 with 64 addresses and 62 usable hosts. A /27 has only 30 usable, which is too few.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.