VLSM subnet planner
Split a network into subnets sized for what each team needs, see the free space that is left, and export the plan.
More in IP and subnets
What VLSM means
Variable length subnet masking means not every subnet in a network has to be the same size. A server network of 200 hosts and a point-to-point link of 2 hosts do not need the same block, and giving both a /24 wastes most of the address space. A VLSM plan gives each one the smallest block that holds it.
This planner takes a network, such as 10.20.0.0/22, and a list of needs, such as Servers: 200 or Guests: /26. It sorts them, gives each the right size, places them without gaps, and shows what is left over as free blocks you can use later.
How the sizes and the order are chosen
A subnet needs room for its hosts plus two addresses that cannot be given to a host, the network address and the broadcast address. So 200 hosts need 202 addresses, and the next power of two is 256, which is a /24. Fifty hosts need 52, which rounds up to 64, a /26.
The planner places the biggest subnets first. A block must start on an address that is a multiple of its own size, so putting small blocks first can leave a hole that no larger block can use. Largest first keeps every block aligned and the free space in as few pieces as possible.
| Hosts needed | Addresses needed | Block |
|---|---|---|
| 200 | 202, rounds to 256 | /24 |
| 120 | 122, rounds to 128 | /25 |
| 50 | 52, rounds to 64 | /26 |
| 12 | 14, rounds to 16 | /28 |
| 2 | 4 | /30 |
When the plan does not fit
A plan that is too big is not an error. The subnets that fit are placed, the ones that did not are listed with how much room they needed and how much was left in the largest free block, and the page says how large a network would hold everything. Plan the same needs in a /24 instead of a /22 and you see at once which teams do not fit.
Cloud networks and IPv6
Cloud providers keep addresses in every subnet for themselves. Amazon VPC and Azure keep five, Google Cloud keeps four. Choose the provider under More options and the planner adds those addresses to each need, so a subnet for 60 hosts becomes a /25 in AWS, not a /26. Providers also set the smallest subnet they allow, and the planner raises smaller needs to that size and tells you.
IPv6 is different. Subnets are not sized by host count, because a /64 already holds more addresses than any link will use, and features such as SLAAC need a /64. Every IPv6 subnet here gets a /64 and the plan counts subnets. The equal split can also line each subnet up on a hex digit boundary, so the addresses read cleanly.
Export and privacy
The plan can be copied as CSV, as JSON, or as Terraform aws_subnet or azurerm_subnet blocks. With JavaScript on, the plan is worked out in your browser and nothing you type is sent to us. Without JavaScript the form sends your network and needs to our server in the page address. The subnet calculator shows the details of any one block from the plan.
Questions people ask
What is the difference between VLSM and fixed-size subnetting?
Fixed-size subnetting cuts a network into equal pieces. VLSM lets each subnet have the size it needs, so less address space is wasted. This page does both: sized by need, or an equal split.
Why are the largest subnets placed first?
Blocks must start on a multiple of their own size. Placing large blocks first keeps them aligned and leaves the free space in a few large pieces. Placing small blocks first can fragment the space so that a later large block no longer fits.
How many hosts does a /24 hold?
A /24 has 256 addresses and 254 usable hosts, because the network address and the broadcast address are not given to hosts. In AWS and Azure it holds 251, and in Google Cloud 252, because the provider keeps some.
Why does every IPv6 subnet get a /64?
IPv6 hosts configure themselves on a /64, and a /64 holds about 18 quintillion addresses. Sizing IPv6 subnets by host count does not save anything, so the planner counts subnets instead.
Can I write a size as a prefix instead of a host count?
Yes. Write Guests: /26 and that subnet is exactly a /26. A line such as Servers: 200 means 200 hosts. You can mix both in one list.
How many subnets can I plan at once?
Up to 256 named needs, or an equal split into up to 4,096 subnets. A split that would make more is refused with a note to choose a bigger prefix.
Use it from AI, the API or the command line
Every LookupOwl tool is also a free API and an MCP tool, with no key and no account. This one is subnet_plan. Please be kind to the rate limits.
curl "https://lookupowl.com/api/v1/tools/subnet-plan?q=10.20.0.0%2F22&requirements=Servers%3A+200%0AOffice%3A+120%0AGuests%3A+50%0APrinters%3A+12%0AUplink%3A+2"claude mcp add --transport http lookupowl https://lookupowl.com/mcp