IT Pro Toolkit · Reference

Subnetting Cheat Sheet (CIDR)

The table that makes subnetting click, plus a method to do it in your head. Prefix to mask, usable hosts per subnet, and the shortcuts that get you through a CCNA question or an interview whiteboard.

Updated July 2026 · ~6 min read

Subnetting scares people because it looks like math. It's really just memorizing one short table and knowing two shortcuts. Here's the whole thing.

CIDR prefix → mask → hosts

CIDRSubnet maskUsable hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
The formula behind the table: usable hosts = 2^(32 − prefix) − 2. You subtract 2 for the network address and the broadcast address. A /30 gives 2 usable — exactly right for a point-to-point link.

The "magic number" method

To subnet in your head, work in the interesting octet — the one where the mask isn't 0 or 255:

  1. Find the mask value in that octet (e.g. /26 → 192).
  2. Subtract from 256: 256 − 192 = 64. That's your block size.
  3. Subnets start at multiples of 64: .0, .64, .128, .192.
  4. The broadcast of each is one below the next start: .63, .127, .191, .255.

That single trick answers "what subnet is this host in?" and "what's the broadcast?" without long division.

Powers of two worth memorizing

BitsValue
2^1 … 2^82, 4, 8, 16, 32, 64, 128, 256

Those eight numbers are the entire secret. Mask octets are always one of them subtracted from 256, and host counts are always a power of two minus 2.

Practice until it's automatic

The Subnetting & CIDR Cheat Sheet + Practice Problems pairs this reference with worked examples and drills — the fastest way to make subnetting reflexive before an exam or interview. Instant download.

Get the sheet + practice →