Logo

MonoCalc

/

VLSM Calculator

Networking

Parent Network

/

Subnet Requirements

About This Tool

🌐 VLSM Calculator – Efficient Variable-Length Subnet Allocation

The VLSM (Variable Length Subnet Mask) Calculator is an essential tool for network engineers, system administrators, and anyone studying for CCNA or CCNP certifications. Unlike fixed-length subnetting (FLSM), which allocates the same block size to every subnet, VLSM lets you carve out subnets of precisely the right size — eliminating wasted IPv4 address space and simplifying network documentation.

What Is VLSM?

Variable Length Subnet Masking allows a single IP address block to be subdivided into multiple subnets, each carrying its own prefix length. A network with 60 workstations gets a /26 (62 usable hosts); a point-to-point WAN link with just two endpoints gets a /30 (2 usable hosts). Both fit inside the same parent network without overlap or waste.

VLSM is the foundation of modern IP routing protocols like OSPF, EIGRP, and BGP, all of which carry subnet mask information with each route advertisement — making route summarization and hierarchical addressing possible.

How the Allocation Algorithm Works

For each subnet requirement, the calculator follows three steps:

  1. Find the block size: Take the required host count, add 2 (for network and broadcast addresses), then round up to the next power of 2. For 60 hosts: 60 + 2 = 62 → next power of 2 is 64.
  2. Derive the prefix: prefix = 32 − log₂(block_size). Block size 64 → log₂(64) = 6 → prefix /26.
  3. Allocate sequentially: Each subnet starts immediately after the previous one, aligned to a boundary that is a multiple of its block size.
Hosts RequiredBlock SizePrefixUsable HostsSubnet Mask
24

/30

2

255.255.255.252

68

/29

6

255.255.255.248

1416

/28

14

255.255.255.240

3032

/27

30

255.255.255.224

6264

/26

62

255.255.255.192

126128

/25

126

255.255.255.128

254256

/24

254

255.255.255.0

Largest-First vs. Custom Order

The largest-first strategy (recommended) sorts subnets by host requirement from largest to smallest before allocation. This minimises fragmentation: large blocks consume address space from the bottom of the parent network, leaving a single contiguous free block at the top rather than many unusable gaps scattered throughout.

Custom order mode allocates subnets exactly in the sequence you enter them. This is useful when you need subnet addresses to follow a specific logical or geographic pattern regardless of block size.

Understanding the Output Fields

Network & Addressing

Network Address: First address in the block — identifies the subnet (not assignable to hosts).

Broadcast Address: Last address in the block — used to reach all hosts simultaneously (not assignable).

First / Last Usable Host: The range of addresses you can assign to devices.

Block Size: Total addresses in the subnet including network and broadcast.

Masks & Efficiency

Subnet Mask: Dotted-decimal representation used in device interface configuration.

Wildcard Mask: Bitwise inverse of the subnet mask, used in ACLs and OSPF network statements.

Wasted Addresses: Usable hosts minus required hosts — lower is better.

Utilization %: Percentage of the parent block consumed by all allocated subnets combined.

Wildcard Masks and ACLs

The wildcard mask is the bitwise NOT of the subnet mask. For a /26 network (mask 255.255.255.192), the wildcard is 0.0.0.63. In a Cisco ACL you would write:

access-list 1 permit 192.168.1.0 0.0.0.63

And in an OSPF network statement:

router ospf 1
 network 192.168.1.0 0.0.0.63 area 0

Cisco IOS Configuration Export

Enable the Cisco IOS config toggle to generate ready-to-paste interface configuration snippets for each subnet. The output format is:

interface GigabitEthernet0/0
 ip address 192.168.1.1 255.255.255.192
 description Sales_LAN
!

This assigns the first usable host of each subnet as the interface gateway address — the standard convention for router interfaces.

CCNA / CCNP Exam Tip
Practice VLSM problems by entering subnets in custom order first, then switching to largest-first and comparing the allocation maps. Understanding why fragmentation increases with custom order is a common exam question.

Binary Breakdown View

Toggle Binary breakdown to reveal the binary representation of each subnet's network address and mask. This is invaluable when learning VLSM, as it visually shows how the host and network bit boundaries shift with each different prefix length.

Example for 192.168.1.0/26:

Network: 11000000.10101000.00000001.00000000
Mask:    11111111.11111111.11111111.11000000

Practical VLSM Example

Given the parent network 192.168.1.0/24, allocate four subnets for: Sales (60 hosts), HR (28 hosts), IT (12 hosts), and a WAN link (2 hosts). With largest-first allocation:

SubnetNetworkPrefixHostsRange
Sales LAN192.168.1.0/2662192.168.1.1–.62
HR LAN192.168.1.64/2730192.168.1.65–.94
IT LAN192.168.1.96/2814192.168.1.97–.110
WAN Link192.168.1.112/302192.168.1.113–.114

Total allocated: 112 of 256 addresses (43.75% utilization), leaving 144 free addresses starting at 192.168.1.116 for future growth.

Common Use Cases

  • Enterprise network design: Allocate separate subnets for each department, floor, or building while conserving address space.
  • ISP address management: Assign customer blocks from a single provider aggregate without wasting addresses.
  • Home lab and study: Visualise VLSM concepts for CCNA, CCNP, or university networking courses.
  • Router configuration: Generate copy-paste ready IOS interface commands for each allocated subnet.
  • Documentation: Download the full allocation table as CSV for inclusion in network design documents.

Frequently Asked Questions

Is the VLSM Calculator free?

Yes, VLSM Calculator is totally free :)

Can I use the VLSM Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use VLSM Calculator?

Yes, any data related to VLSM Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is VLSM and why is it used?

VLSM (Variable Length Subnet Mask) allows a network to be divided into subnets of different sizes, each with its own prefix length. Unlike fixed-length subnetting, VLSM lets you allocate only as many IP addresses as each subnet needs, dramatically reducing address waste and making efficient use of limited IPv4 space.

How does this VLSM calculator work?

Enter your parent network (e.g. 192.168.1.0/24), add rows for each subnet with a name and required host count, then click Calculate. The tool picks the smallest /prefix that accommodates each requirement, allocates subnets sequentially from the base block, and displays the full subnet table including masks, host ranges, and address utilization.

What is the largest-first allocation strategy?

Largest-first (recommended) sorts your subnets by host count from largest to smallest before carving them out of the parent block. This prevents fragmentation: large blocks are placed at the start of the address space, leaving a single contiguous free block at the end rather than many small gaps.

How is the required prefix length calculated for each subnet?

The tool finds the smallest block size that is a power of 2 and is ≥ (required hosts + 2). The +2 accounts for the network and broadcast addresses. For example, 60 hosts need 62 usable addresses, so the block size is 64 (next power of 2), giving /26. The formula is: prefix = 32 − log₂(block_size).

What does the wildcard mask mean in VLSM output?

A wildcard mask is the bitwise inverse of the subnet mask. It is used in Cisco ACL entries and OSPF network statements to indicate which address bits to ignore. For a /26 (mask 255.255.255.192), the wildcard is 0.0.0.63.

Can I use this tool for CCNA or CCNP exam practice?

Yes. The tool shows step-by-step subnet allocation with CIDR, dotted-decimal masks, wildcard masks, host ranges, and optional binary breakdowns — exactly the information required for CCNA/CCNP subnetting questions. Toggle 'Custom Order' to practice manual allocation sequences.