Free tech learning for everyone, from basics to pro

Photo: Taylor Vick on Unsplash

Study tips

Subnetting cheat sheet: every prefix from /8 to /32 (masks, wildcards and hosts)

One table with every IPv4 prefix from /8 to /32: subnet mask, wildcard mask, total addresses, usable hosts and block size. Plus the private ranges and four shortcuts that make subnetting fast.

Bookmark this page. It puts the numbers you need for subnetting, ACLs and OSPF in one place: every IPv4 prefix from /8 to /32 with its subnet mask, wildcard mask, number of addresses, usable hosts and block size. Below the table are the private address ranges and four shortcuts that make subnetting quick, whether you are studying for the CCNA or configuring a real network.

The full subnetting table

"Block size" is how far apart the subnets are, counted in the octet where the mask changes. For example, /26 subnets start every 64 addresses in the fourth octet: .0, .64, .128 and .192.

PrefixSubnet maskWildcard maskAddressesUsable hostsBlock size
/8255.0.0.00.255.255.25516,777,21616,777,2141 in octet 1
/9255.128.0.00.127.255.2558,388,6088,388,606128 in octet 2
/10255.192.0.00.63.255.2554,194,3044,194,30264 in octet 2
/11255.224.0.00.31.255.2552,097,1522,097,15032 in octet 2
/12255.240.0.00.15.255.2551,048,5761,048,57416 in octet 2
/13255.248.0.00.7.255.255524,288524,2868 in octet 2
/14255.252.0.00.3.255.255262,144262,1424 in octet 2
/15255.254.0.00.1.255.255131,072131,0702 in octet 2
/16255.255.0.00.0.255.25565,53665,5341 in octet 2
/17255.255.128.00.0.127.25532,76832,766128 in octet 3
/18255.255.192.00.0.63.25516,38416,38264 in octet 3
/19255.255.224.00.0.31.2558,1928,19032 in octet 3
/20255.255.240.00.0.15.2554,0964,09416 in octet 3
/21255.255.248.00.0.7.2552,0482,0468 in octet 3
/22255.255.252.00.0.3.2551,0241,0224 in octet 3
/23255.255.254.00.0.1.2555125102 in octet 3
/24255.255.255.00.0.0.2552562541 in octet 3
/25255.255.255.1280.0.0.127128126128 in octet 4
/26255.255.255.1920.0.0.63646264 in octet 4
/27255.255.255.2240.0.0.31323032 in octet 4
/28255.255.255.2400.0.0.15161416 in octet 4
/29255.255.255.2480.0.0.7868 in octet 4
/30255.255.255.2520.0.0.3424 in octet 4
/31255.255.255.2540.0.0.122 (point-to-point link)2 in octet 4
/32255.255.255.2550.0.0.011 (host route)1 in octet 4

The most used prefixes

  • /24 (255.255.255.0): 254 hosts. The classic office or home LAN.
  • /23 (255.255.254.0): 510 hosts. A larger user VLAN.
  • /26 to /28: 62, 30 and 14 hosts. Small VLANs for printers, cameras, servers or management.
  • /30 (255.255.255.252): 2 hosts. Traditional router-to-router links.
  • /31: 2 addresses, both usable, on point-to-point links (RFC 3021). Saves addresses on many links.
  • /32: a single address, used for loopbacks and host routes.

Private IPv4 ranges (RFC 1918)

RangePrefixTypical use
10.0.0.0 to 10.255.255.25510.0.0.0/8Large enterprises and cloud networks
172.16.0.0 to 172.31.255.255172.16.0.0/12Medium networks, some cloud and container defaults
192.168.0.0 to 192.168.255.255192.168.0.0/16Home and small office networks

Also worth knowing: 127.0.0.0/8 is loopback, 169.254.0.0/16 is link-local (the address a device gives itself when DHCP fails) and 100.64.0.0/10 is shared address space used by internet providers for carrier-grade NAT.

Four shortcuts that make subnetting fast

1. Block size = 256 minus the interesting octet

For 255.255.255.224, the interesting octet is 224, so the block size is 256 − 224 = 32. Subnets start at 0, 32, 64, 96 and so on.

2. Hosts = 2 to the power of host bits, minus 2

A /27 has 5 host bits: 25 = 32 addresses, minus the network and broadcast addresses = 30 usable hosts.

3. Broadcast = next network minus 1

For 192.168.1.70/26, the subnets are .0, .64, .128 and .192. The address sits in .64, the next network is .128, so the broadcast is 192.168.1.127 and usable hosts run from .65 to .126.

4. Wildcard = 255 minus each mask octet

255.255.255.240 becomes 0.0.0.15. Cisco ACLs and OSPF network statements use wildcard masks, so this one comes up constantly.

Practise until it is automatic

Check your answers with the subnet calculator and the wildcard mask calculator, then work through subnetting step by step and the subnetting in your head method. Before the exam, read 7 subnetting mistakes that cost marks in the CCNA.

Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. Share the link freely; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: