Design hierarchical networks with variable-length subnet masking. Click split to halve a subnet, join to merge children back.
Paste CIDR blocks (one per line) to load existing networks.
Start from a common architecture pattern.
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.
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.
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.
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.
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.
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.
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.
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.