Skip to content

VLSM Subnetting Calculator

List your subnets and host counts, choose a major network, and get a largest-first VLSM plan with network, host range, broadcast, mask, wildcard and spare addresses for each.

100% Free • No Signup • Zero Uploads (Runs Locally)

100% Local Browser Execution • Zero Server Uploads • Air-Gap Safe

100% Local Tool Execution • Tool Inputs Never Leave Your Browser Bitwise VLSM allocator

6 subnets placed248 of 256 addresses used (97%)

VLSM allocation, largest subnet first
SubnetNeededCIDRHost rangeBroadcastMaskWildcardUsable / spare
Sales LAN100192.168.10.0/25192.168.10.1 – 192.168.10.126192.168.10.127255.255.255.1280.0.0.127126 / 26
Engineering50192.168.10.128/26192.168.10.129 – 192.168.10.190192.168.10.191255.255.255.1920.0.0.6362 / 12
Voice VLAN25192.168.10.192/27192.168.10.193 – 192.168.10.222192.168.10.223255.255.255.2240.0.0.3130 / 5
Servers12192.168.10.224/28192.168.10.225 – 192.168.10.238192.168.10.239255.255.255.2400.0.0.1514 / 2
WAN link A2192.168.10.240/30192.168.10.241 – 192.168.10.242192.168.10.243255.255.255.2520.0.0.32 / 0
WAN link B2192.168.10.244/30192.168.10.245 – 192.168.10.246192.168.10.247255.255.255.2520.0.0.32 / 0

Free space left: 192.168.10.248/29

CtrlEnter to copy output

Wrong result, broken layout or an idea? Tell us about this tool.

VLSM Subnetting Calculator VLSM Subnet Allocation and Wildcard Mask & Security Architecture Banner

This VLSM calculator splits one address block into subnets of different sizes, largest first, and shows each subnet's network, host range, broadcast, mask and wildcard. The same workspace converts subnet masks to wildcard masks for Cisco ACLs and OSPF, turns any IP range into the smallest list of CIDR blocks, and includes a /8 to /32 subnet mask cheat sheet. Addressing plans reveal internal network layout, so every calculation runs in your browser.

What does a VLSM subnetting example look like?

For 192.168.10.0/24 with needs of 100, 50, 25, 12, 2 and 2 hosts, VLSM assigns a /25, /26, /27, /28 and two /30s, and leaves 192.168.10.248/29 free.

That is the sample loaded in the tool. Change any number and the plan recalculates; requests that no longer fit are listed separately instead of overlapping, and the free space is shown as clean CIDR blocks you can hand out later.

How do you solve VLSM questions in CCNA exams?

Sort the host counts descending, convert each to the smallest block (2^h with 2^h − 2 ≥ hosts), and assign blocks in order from the start of the network, each on a multiple of its own size.

Write the block sizes first (128, 64, 32, 16, 4, 4 in the example) and add them up to check they fit the parent: 248 of 256. Use the calculator to check your answer, not to replace the practice.

Also searched as: vlsm subnetting calculator, vlsm example, subnetting and vlsm.

What is VLSM?

Variable Length Subnet Masking (VLSM) lets one network be divided into subnets with different prefix lengths, so each segment gets only the addresses it needs instead of one fixed size for all.

With fixed-length subnetting, a /24 split for a 100-host LAN gives every subnet 126 hosts, even a two-host WAN link. VLSM sizes each subnet separately: the LAN gets a /25, a 25-phone voice VLAN gets a /27, and each point-to-point link gets a /30. The saved space stays available as contiguous free blocks for later growth.

VLSM requires a classless routing protocol that carries the mask with each route: OSPF, EIGRP, IS-IS, BGP or RIPv2. RIPv1 and classful designs cannot use it.

How it works: VLSM & Wildcard Calculator

VLSM Subnetting Calculator VLSM Subnet Allocation and Wildcard Mask & Security Architecture Diagram. VLSM allocation of 192.168.10.0/24: requirements sorted largest first become a /25 for 100 hosts, a /26 for 50, a /27 for 25, a /28 for 12 and two /30 WAN links, placed on aligned boundaries with 192.168.10.248/29 left free, alongside the subnet mask to wildcard mask conversion 255.255.255.192 to 0.0.0.63.
VLSM allocation of 192.168.10.0/24: requirements sorted largest first become a /25 for 100 hosts, a /26 for 50, a /27 for 25, a /28 for 12 and two /30 WAN links, placed on aligned boundaries with 192.168.10.248/29 left free, alongside the subnet mask to wildcard mask conversion 255.255.255.192 to 0.0.0.63.

How do you subnet with VLSM step by step?

Sort the requirements from largest to smallest, pick the smallest prefix whose usable hosts (2^h − 2) cover each one, and place each subnet on the next boundary that is a multiple of its size.

Example in 192.168.10.0/24: Sales needs 100 hosts, so it gets a /25 (126 usable) at 192.168.10.0. Engineering needs 50, a /26 (62 usable) at .128. Voice needs 25, a /27 at .192. Servers need 12, a /28 at .224. Each WAN link needs 2, a /30 at .240 and .244. Free space left: 192.168.10.248/29. The calculator does exactly this and lists the spare addresses in every subnet.

  • Hosts needed → host bits h: smallest h where 2^h − 2 ≥ hosts.
  • Prefix = 32 − h; block size = 2^h; networks start on multiples of the block size.
  • Allocating largest first avoids gaps that would break alignment for the big subnets.

How do you calculate a wildcard mask?

Subtract the subnet mask from 255.255.255.255, octet by octet: 255.255.255.192 becomes 0.0.0.63. A 0 bit means "must match" and a 1 bit means "any value".

Cisco IOS uses wildcard masks (inverse masks) in access lists and OSPF network statements: access-list 10 permit 192.168.10.64 0.0.0.63 matches .64 to .127. For a /30 the wildcard is 0.0.0.3, for a /26 it is 0.0.0.63 and for a /24 it is 0.0.0.255. Paste either form into the Wildcard tab: it detects whether you entered a subnet mask or a wildcard mask and prints both, plus ready-to-paste ACL and OSPF lines.

How do you convert an IP range to CIDR?

Start at the first address, take the largest aligned block that does not pass the end address, and repeat from the next address; the result is the minimal CIDR list.

Firewall vendors, cloud security groups and threat feeds often need CIDR, while humans and reports use ranges. 10.20.0.5 to 10.20.0.70 becomes 10.20.0.5/32, .6/31, .8/29, .16/28, .32/27, .64/30, .68/31 and .70/32. Only ranges that start and end on block boundaries collapse into a single prefix.

Subnet mask and wildcard mask cheat sheet

Prefix, subnet mask, wildcard mask and usable hosts for common subnets
CIDRSubnet maskWildcard maskUsable hosts
/22255.255.252.00.0.3.2551,022
/23255.255.254.00.0.1.255510
/24255.255.255.00.0.0.255254
/25255.255.255.1280.0.0.127126
/26255.255.255.1920.0.0.6362
/27255.255.255.2240.0.0.3130
/28255.255.255.2400.0.0.1514
/29255.255.255.2480.0.0.76
/30255.255.255.2520.0.0.32

Prefix, subnet mask, wildcard mask and usable hosts for common subnets

Command-line examples

Cisco ACL with a wildcard mask

access-list 10 permit 192.168.10.64 0.0.0.63

OSPF network statement

router ospf 1
 network 192.168.10.0 0.0.0.255 area 0

Python: range to CIDR

python3 -c "import ipaddress as i; print(list(i.summarize_address_range(i.ip_address('10.20.0.5'), i.ip_address('10.20.0.70'))))"

Frequently asked questions

Large blocks need large aligned boundaries. Placing them first means smaller subnets fill the remaining gaps without breaking alignment or wasting space.

Related Engineering Guides