CalculaIT / tools

VLSM subnet calculator

Split a network into right-sized subnets for each team.

Fields contain editable examples.

Result
#1 (100)
192.168.1.0/25 · 192.168.1.1 – 192.168.1.126 · bc 192.168.1.127
#2 (50)
192.168.1.128/26 · 192.168.1.129 – 192.168.1.190 · bc 192.168.1.191
#3 (20)
192.168.1.192/27 · 192.168.1.193 – 192.168.1.222 · bc 192.168.1.223
#4 (2)
192.168.1.224/30 · 192.168.1.225 – 192.168.1.226 · bc 192.168.1.227
Addresses allocated
228
Free addresses
28
Quick answer · example

How do I split 192.168.1.0/24 into subnets of 100, 50, 20 and 2 hosts?

Allocate largest first: 192.168.1.0/25 for 100 hosts, 192.168.1.128/26 for 50, 192.168.1.192/27 for 20 and 192.168.1.224/30 for 2. That leaves 28 free addresses starting at 192.168.1.228.

Calculation assumptions

Splits a network into subnets of different sizes, largest first, without overlaps. Each subnet reserves the network and broadcast addresses; /31 and /32 are not allocated.

View the worked example ↓

Formula and assumptions

size = next power of 2 ≥ hosts + 2; prefix = 32 − log2(size); allocated largest first

Splits a network into subnets of different sizes, largest first, without overlaps. Each subnet reserves the network and broadcast addresses; /31 and /32 are not allocated.

All amounts use the same currency of your choice. These are estimates, not measurements or offers.

How to use this calculator

Plan the addressing of an office, a lab or a networking exercise: type the starting network with its prefix and how many hosts each subnet needs. The calculator allocates the largest first so no addresses are wasted, and gives the network, usable range and broadcast of each subnet.

Worked example

  1. 100 hosts + 2 = 102 → a block of 128 addresses: /25.
  2. 50 + 2 = 52 → 64 addresses (/26); 20 + 2 = 22 → 32 (/27); 2 + 2 = 4 (/30).
  3. They are placed one after another from 192.168.1.0: .0/25, .128/26, .192/27 and .224/30.

Example result

Addresses allocated
228
Free addresses
28

Interpreting the result

Each result row shows in brackets its position in your list and the hosts requested. Leave room to grow: if a team has 50 devices today, ask for 60 or more. Free addresses at the end are available for future subnets. If everything does not fit, start from a shorter prefix, for example /23 instead of /24.

Frequently asked questions

Why are 2 addresses added?

Because every conventional subnet reserves the network and broadcast addresses, which cannot be assigned to devices.

Why are subnets allocated largest first?

That way each block starts at an address aligned with its size and no unusable gaps are left between subnets.

What should I use for a link between two routers?

A /30 with 2 usable hosts, or a /31 if your devices support it (RFC 3021), which this calculator does not allocate.

References and method

References and method