🔒 Security-first IT & cloud for Central Oregon 541-508-8797  |  ✉ support@thelocalgeekshop.com

Subnet Mask Cheat Sheet

Home / Free Tools / Subnet Cheat Sheet

Printable one-page version

The whole chart on a single sheet — mask, wildcard, address and host counts, reserved ranges and a worked VLSM example. Branded, and built to survive being folded into a bag.

Download PDF

Need to work out a specific network rather than read a table? The subnet calculator takes any address with a prefix or mask, splits networks into VLSM tables, and identifies private, CGNAT and reserved space.

Every IPv4 prefix, /0 to /32

Highlighted rows are the ones that come up most — /8, /16 and /24 from classful habits, and /30, /31, /32 for links and host routes.

CIDRSubnet maskWildcard maskHex maskTotal addressesUsable hostsEquivalent
/00.0.0.0255.255.255.2550x000000004,294,967,2964,294,967,29416,777,216 × /24
/1128.0.0.0127.255.255.2550x800000002,147,483,6482,147,483,6468,388,608 × /24
/2192.0.0.063.255.255.2550xC00000001,073,741,8241,073,741,8224,194,304 × /24
/3224.0.0.031.255.255.2550xE0000000536,870,912536,870,9102,097,152 × /24
/4240.0.0.015.255.255.2550xF0000000268,435,456268,435,4541,048,576 × /24
/5248.0.0.07.255.255.2550xF8000000134,217,728134,217,726524,288 × /24
/6252.0.0.03.255.255.2550xFC00000067,108,86467,108,862262,144 × /24
/7254.0.0.01.255.255.2550xFE00000033,554,43233,554,430131,072 × /24
/8255.0.0.00.255.255.2550xFF00000016,777,21616,777,21465,536 × /24
/9255.128.0.00.127.255.2550xFF8000008,388,6088,388,60632,768 × /24
/10255.192.0.00.63.255.2550xFFC000004,194,3044,194,30216,384 × /24
/11255.224.0.00.31.255.2550xFFE000002,097,1522,097,1508,192 × /24
/12255.240.0.00.15.255.2550xFFF000001,048,5761,048,5744,096 × /24
/13255.248.0.00.7.255.2550xFFF80000524,288524,2862,048 × /24
/14255.252.0.00.3.255.2550xFFFC0000262,144262,1421,024 × /24
/15255.254.0.00.1.255.2550xFFFE0000131,072131,070512 × /24
/16255.255.0.00.0.255.2550xFFFF000065,53665,534256 × /24
/17255.255.128.00.0.127.2550xFFFF800032,76832,766128 × /24
/18255.255.192.00.0.63.2550xFFFFC00016,38416,38264 × /24
/19255.255.224.00.0.31.2550xFFFFE0008,1928,19032 × /24
/20255.255.240.00.0.15.2550xFFFFF0004,0964,09416 × /24
/21255.255.248.00.0.7.2550xFFFFF8002,0482,0468 × /24
/22255.255.252.00.0.3.2550xFFFFFC001,0241,0224 × /24
/23255.255.254.00.0.1.2550xFFFFFE005125102 × /24
/24255.255.255.00.0.0.2550xFFFFFF002562541 × /24
/25255.255.255.1280.0.0.1270xFFFFFF801281261/2 of a /24
/26255.255.255.1920.0.0.630xFFFFFFC064621/4 of a /24
/27255.255.255.2240.0.0.310xFFFFFFE032301/8 of a /24
/28255.255.255.2400.0.0.150xFFFFFFF016141/16 of a /24
/29255.255.255.2480.0.0.70xFFFFFFF8861/32 of a /24
/30255.255.255.2520.0.0.30xFFFFFFFC421/64 of a /24
/31255.255.255.2540.0.0.10xFFFFFFFE221/128 of a /24
/32255.255.255.2550.0.0.00xFFFFFFFF111/256 of a /24

Usable hosts subtracts the network and broadcast address, which is why a /24 gives 254 rather than 256. Two prefixes break that rule: a /31 has two usable addresses on point-to-point links under RFC 3021, and a /32 is a single host route. Plenty of calculators still report zero for both.

Reserved and special-purpose ranges

When an address is not behaving the way you expect, check it here before assuming a fault. Recognising 100.64.0.0/10 or 169.254.0.0/16 on sight saves a lot of time.

RangePurposeRFCWorth knowing
0.0.0.0/8This networkRFC 11220.0.0.0 means "any" in a bind or default route
10.0.0.0/8PrivateRFC 191816,777,216 addresses — the big one
100.64.0.0/10Carrier-grade NATRFC 6598Your ISP may use it; looks public, is not routable
127.0.0.0/8LoopbackRFC 1122The whole /8, not just 127.0.0.1
169.254.0.0/16Link-local / APIPARFC 3927A host here failed to get DHCP
172.16.0.0/12PrivateRFC 1918172.16.0.0 – 172.31.255.255 — note it stops at .31
192.0.0.0/24IETF protocol assignmentsRFC 6890Includes DS-Lite and NAT64 discovery
192.0.2.0/24Documentation (TEST-NET-1)RFC 5737Safe for docs and examples
192.168.0.0/16PrivateRFC 1918The default on nearly every consumer router
198.18.0.0/15BenchmarkingRFC 2544Device performance testing only
198.51.100.0/24Documentation (TEST-NET-2)RFC 5737Safe for docs and examples
203.0.113.0/24Documentation (TEST-NET-3)RFC 5737Safe for docs and examples
224.0.0.0/4Multicast (class D)RFC 5771224.0.0.1 all-hosts, 224.0.0.2 all-routers
240.0.0.0/4Reserved (class E)RFC 1112Never allocated
255.255.255.255/32Limited broadcastRFC 919Never forwarded by a router

Powers of two

Subnetting is this table plus subtraction.

PowerAddressesPrefixUsable hosts
201/321
212/312
224/302
238/296
2416/2814
2532/2730
2664/2662
27128/25126
28256/24254
29512/23510
2101,024/221,022
2112,048/212,046
2124,096/204,094
2138,192/198,190
21416,384/1816,382
21532,768/1732,766
21665,536/1665,534

Choosing a VLAN size

A guide, not a rule. Reaching for /24 everywhere wastes space and makes broadcast domains bigger than they need to be — but the opposite mistake, sizing exactly to today's device count, is worse. Aim for roughly double what you need now.

PrefixUsable hostsTypically fits
/296Point-to-point links, tiny closets, DMZ pairs
/2814A small office — printers and APs on their own VLAN
/2730Typical small-business user VLAN
/2662A busy floor, or a camera VLAN at a small site
/25126Mid-size user VLAN with room to grow
/24254The default habit — often larger than needed
/23510Large flat network; consider splitting instead
/221,022Site supernet to carve into VLANs

Wildcard masks, since they trip everyone up

A wildcard mask is the bitwise inverse of a subnet mask, and it is what Cisco ACLs and OSPF network statements expect. Where a subnet mask has 1s, a wildcard has 0s.

Writing a subnet mask where a wildcard belongs produces an ACL that matches nothing and logs nothing. One of the quieter ways to lose an afternoon.

Two habits worth having

Subnet on nibble boundaries. Prefixes on /4 steps — /20, /24, /28 — line up with hex digits, which keeps the arithmetic doable in your head and the plan readable by whoever is on call at 2 a.m.

Write the plan down. The expensive addressing problems are rarely calculation errors. They are two people independently assigning 10.0.5.0/24 eighteen months apart. A one-page document beats a perfect subnet calculation.

Designing a real address plan

Calculating one subnet is arithmetic. Laying out addressing, VLANs, routing and wireless for an actual building is network design, and we do it on site across Central Oregon.

Need a hand with the thing you're troubleshooting?

We do managed IT, networking and security for businesses across Central Oregon.

Managed IT Services Call 541-508-8797