Understanding CIDR notation (/24, /32 and beyond)

Quick answer

192.168.1.0/24. 10.0.0.0/8. 203.0.113.45/32. CIDR notation is everywhere in networking, and once it clicks it’s simple. Here’s how to read and reason about it.

What does the slash in CIDR mean?

CIDR (Classless Inter-Domain Routing) writes an address range as address/prefix. The prefix — the number after the slash — says how many leading bits are fixed as the network portion. The remaining bits are free for hosts. An IPv4 address has 32 bits, so a /24 fixes 24 and leaves 8 for hosts.

Smaller number = bigger range

This trips people up: the smaller the prefix, the larger the range. A /8 fixes only 8 bits, leaving 24 for hosts — about 16.7 million addresses. A /24 leaves 8 host bits — 256 addresses. A /32 fixes all 32 bits — a single address. Going from /24 to /23 doubles the range; to /25 halves it.

A quick reference

/32 = 1 address · /30 = 4 · /29 = 8 · /28 = 16 · /27 = 32 · /26 = 64 · /25 = 128 · /24 = 256 · /16 = 65,536 · /8 = 16,777,216. Each step of 1 in the prefix doubles or halves the count. (Usable host counts are slightly lower once you account for network and broadcast addresses in a subnet.)

Reading a real example

192.168.1.0/24 means: the first 24 bits (192.168.1) are the network, the last 8 are hosts — so it covers 192.168.1.0 through 192.168.1.255. 10.0.0.0/8 covers all of 10.x.x.x. 203.0.113.45/32 is just that one address — the /32 form you use to reference a single IP in firewall rules.

Where you’ll use it

CIDR is how you allow-list or block ranges in firewalls, define subnets, and express the address blocks an ASN announces. For working out network/broadcast addresses, host ranges, and masks for any prefix, our network’s CIDR calculator and subnet mask calculator do the arithmetic.

Related: Whitelist IP ranges with CIDR · Subnet Mask Calculator

0 IPs logged or stored
2 stacks shown (v4 & v6)
8+ diagnostic tools
lookups, always free