
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.
How do you read a subnet mask cheat sheet?
Find the prefix in the CIDR column; the row gives its dotted mask, wildcard, block size and usable hosts. Usable hosts are 2^(32 − prefix) − 2, because the network and broadcast addresses cannot be assigned.
Memorise the last-octet values and the rest follows: 128, 192, 224, 240, 248, 252, 254, 255 for /25 to /32 (and the same sequence in the third octet for /17 to /24). Block sizes halve with every extra bit: a /24 holds 256 addresses, a /25 holds 128, a /26 holds 64.
Which prefixes have special rules?
/31 has no network or broadcast address and is used for point-to-point links (RFC 3021), and /32 is a single host route; the table shows their usable counts as 2 and 1.
Cloud providers reserve more than two addresses: AWS and Azure keep five per subnet, so a /28 gives 11 usable addresses there, not 14. Plan cloud subnets one size larger than the on-premises table suggests.
Also searched as: subnetting cheat sheet, cidr cheat sheet, subnet mask table.
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
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
| CIDR | Subnet mask | Wildcard mask | Usable hosts |
|---|---|---|---|
| /22 | 255.255.252.0 | 0.0.3.255 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 2 |
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.63OSPF network statement
router ospf 1
network 192.168.10.0 0.0.0.255 area 0Python: 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
255.255.255.0, with wildcard 0.0.0.255, 256 addresses and 254 usable hosts.
Related tools
- CIDR Subnet SplitterNetwork, broadcast, host range and wildcard for any IPv4 block, with one-click split and merge.
- MAC Address LookupFind the vendor behind any MAC address from a bundled IEEE OUI map, with bulk paste and format conversion.
- KQL & SPL Query BuilderBuild Sentinel KQL and Splunk SPL from visual filters, with 25 SOC hunting presets.