Starting Network
Total subnets1
Total addresses65,536
Usable hosts65,534
Reserved IPs2
Utilization0%
Bulk Import

Paste CIDR blocks (one per line) to load existing networks.

Quick Templates

Start from a common architecture pattern.

How VLSM works

Variable Length Subnet Masking lets you carve a single network into multiple subnets of different sizes — perfect when you have one team needing 1000 hosts and another needing only 10.

Split: halve a subnet (e.g. /24 → two /25s). Join: merge sibling subnets back together. Notes and color tags persist when you save or share.

What VLSM solves

Classical subnetting splits a parent block into equal-sized chunks. That wastes a lot of address space when your actual subnets need very different host counts. Variable-Length Subnet Masking lets you allocate a /24 for one tier, a /28 for another, and a /30 point-to-point link, all from the same parent — sized to demand, not to a fixed grid.

This planner takes a parent CIDR and a list of required host counts, then computes the smallest prefix that fits each one, allocated in order from the largest. The output is ready to copy into your network documentation, drop into the IaC export tool for Terraform/CloudFormation/Pulumi, or save to a workspace project.

When to use VLSM versus equal subnetting

VLSM is the right choice whenever your subnets have meaningfully different sizes. Examples:

If every subnet you need is the same size, equal subnetting via the main calculator is simpler. Use VLSM when the sizes differ. The subnetting by hosts vs subnets article explains the tradeoff in more depth.

Background reading

The VLSM explained article walks through a complete worked example. If you're using AWS, AWS VPC reserved IPs explains the 5-IP reservation that affects your usable-host counts. To go from a VLSM plan straight to deployable infrastructure code, see from subnet design to Terraform.

Related tools

Frequently asked questions

What is VLSM and when should I use it?

VLSM (Variable-Length Subnet Masking) is the practice of allocating subnets of different sizes from a parent network. Use it whenever your subnets have meaningfully different host counts. For example, a 3-tier web app might need a small public-facing subnet, a medium app-tier subnet, and a small database subnet — three different sizes from one parent VPC. If all your subnets are the same size, classical equal subnetting is simpler.

How does VLSM differ from classful subnetting?

Classful subnetting divides a parent network into equal-sized subnets, often wasting address space. VLSM allows subnets of varying sizes from the same parent. With VLSM you allocate subnets in order from largest to smallest, sizing each to demand. The result uses address space efficiently and supports modern network designs that classful addressing cannot.

How do I size a VLSM subnet for N hosts?

Find the smallest prefix that fits N hosts plus the required reserved addresses. For a standard subnet, you need N + 2 total addresses (network + broadcast reservations). Take the smallest power of 2 that is at least N + 2, then compute the prefix as 32 minus log2 of that power. For example, 50 hosts needs 52 addresses; the next power of 2 is 64, so prefix = 32 - 6 = /26. In cloud environments add the cloud's extra reservation count.

Can I export a VLSM plan to Terraform?

Yes. After designing your VLSM allocation here, the IaC Export tool converts the plan to Terraform, CloudFormation, Pulumi, CDK, Ansible, or Bicep. The exported code uses the cloud provider's reservation rules automatically.