All articles
NetworkingDeveloperJul 22, 2026 · 6 min read

CIDR & Subnet Cheat Sheet: /24, /29, /30 Explained

CIDR (Classless Inter-Domain Routing) notation is the modern way to describe an IP range. You write an address, a slash, and a number — like 192.168.1.0/24. That number is the prefix length: how many leading bits are fixed as the network portion. The rest are free for hosts. This guide breaks it down and gives you a cheat sheet you can bookmark.

How to read a prefix

An IPv4 address has 32 bits. The prefix says how many are "locked" to the network. A /24 locks 24 bits, leaving 8 bits (2⁸ = 256 addresses) for hosts. A /30 locks 30 bits, leaving just 2 bits (4 addresses). The higher the number, the smaller the network.

Two addresses in every normal subnet are reserved: the first is the network address and the last is the broadcast address. That's why a /24 holds 256 addresses but only 254 usable hosts.

CIDR cheat sheet

CIDRSubnet maskUsable hostsTotal addresses
/24255.255.255.0254256
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/29255.255.255.24868
/30255.255.255.25224
/31255.255.255.2542*2
/32255.255.255.25511

* A /31 has no network/broadcast reservation and is used for point-to-point links (RFC 3021), so both addresses are usable.

Worked example: /29

Say you're given 10.0.0.0/29. The mask is 255.255.255.248, the block size is 8 addresses, so this subnet covers 10.0.0.010.0.0.7:

  • Network address: 10.0.0.0
  • Usable hosts: 10.0.0.110.0.0.6 (6 hosts)
  • Broadcast address: 10.0.0.7

The next subnet starts at 10.0.0.8/29, and so on in steps of 8.

The fast way to do this

You don't have to work out the mask and range by hand. Paste any address and prefix into our free CIDR / subnet calculator and it instantly shows the network, broadcast, usable host range, mask, wildcard, and host counts.

Want to understand the bit math behind it? The number base converter is handy for seeing how a subnet mask looks in binary.

Quick reference: block size trick

To find where subnets start, compute the block size as 256 − (last mask octet). For /26 the mask ends in 192, so 256 − 192 = 64 — subnets begin at .0, .64, .128, .192. This trick works for any prefix once you know the mask.