Skip to content

Subnet Mask Cheat Sheet (/8 to /32)

Every prefix from /8 to /32 with its dotted subnet mask, wildcard mask, total addresses and usable hosts, next to a VLSM calculator for when the table is not enough.

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

Subnet mask cheat sheet from /8 to /32
CIDRSubnet maskWildcardAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

CtrlEnter to copy output

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

Subnet Mask Cheat Sheet (/8 to /32) 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.

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

Subnet Mask Cheat Sheet (/8 to /32) 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

255.255.255.0, with wildcard 0.0.0.255, 256 addresses and 254 usable hosts.

Related Engineering Guides