Skip to content
Calixo
CCTV & Networking

How to Read a CIDR Block: A Practical Guide to IP Subnetting

CIDR notation looks cryptic until you understand what it's actually encoding. A practical, worked-example walkthrough of subnet masks, host counts, and why network engineers write addresses as 192.168.1.0/24.

Published July 10, 2026

If you’ve configured a router, a cloud VPC, or a firewall rule, you’ve seen addresses written like 192.168.1.0/24. That slash-24 is CIDR notation — Classless Inter-Domain Routing — and once you understand what the number after the slash actually means, subnetting stops being a memorized lookup table and becomes simple arithmetic.

What the “/24” actually means

An IPv4 address is 32 bits long, conventionally written as four decimal numbers (each 0–255) separated by dots — that’s the “dotted decimal” you’re used to seeing. The number after the slash in CIDR notation tells you how many of those 32 bits are fixed as the network portion; the rest are free to vary as the host portion.

/24 means the first 24 bits are the network, leaving 32 − 24 = 8 bits for hosts. Since 8 bits can represent 2⁸ = 256 distinct values, that subnet contains 256 total addresses. This is exactly why a “/24” is the classic small-office or home-network size — it maps neatly onto the “last number is the device, first three are the network” mental model most people already have, even without knowing why.

From prefix length to host count

The general formula is:

Total addresses = 2^(32 − prefix)
Usable hosts = Total addresses − 2

That “minus 2” reserves the very first address in the range (the network address, used to identify the subnet itself) and the very last (the broadcast address, used to send a packet to every device on the subnet at once) — neither can be assigned to an individual device.

A few common examples:

PrefixHost bitsTotal addressesUsable hosts
/248256254
/257128126
/2841614
/30242
/161665,53665,534

Notice the pattern: every time the prefix number goes up by 1, the available host count is cut roughly in half. This is the single most useful mental shortcut for subnetting — going from /24 to /25 doesn’t add complexity, it just splits your 256 addresses into two blocks of 128.

Working out the network and broadcast address

Given an IP address and a prefix, you find the network address by keeping the network-portion bits and zeroing out every host bit; the broadcast address does the opposite — network bits stay, host bits all become 1. For 192.168.1.10/24:

  • The first 24 bits (192.168.1) are fixed.
  • The network address is 192.168.1.0 (host bits all zero).
  • The broadcast address is 192.168.1.255 (host bits all one, since 8 host bits of all 1s = 255).
  • Usable hosts run from 192.168.1.1 to 192.168.1.254.

This is exactly what the IPv4 Subnet Calculator on this site computes directly from any IP address and prefix, rather than requiring you to work through the binary by hand every time.

Why /31 and /32 are special cases

At a /31, the “subtract 2 for network/broadcast” rule would leave 0 usable addresses out of 2 total, which would be useless. In practice, RFC 3021 explicitly carves out an exception: /31 subnets are used for point-to-point links (like the connection between two routers) where both addresses are treated as usable hosts, since there’s no need for a broadcast address on a link with exactly two devices. A /32 is a single specific host address, often used in routing tables to refer to one exact device rather than a range.

CIDR versus the old class-based system

Before CIDR (standardized in 1993), networks were divided into rigid “classes” — Class A, B, and C — each with a fixed, non-negotiable subnet size. A Class C network was always exactly 256 addresses; if you needed 300, you had to take an entire Class B (65,536 addresses) and waste the other 65,236. CIDR’s whole point was breaking that rigidity, letting the prefix length be any value from 0 to 32, so network operators could size a subnet to actual need instead of the nearest oversized class. This is also why CIDR blocks are sometimes still casually called “Class C-sized” or similar — the old vocabulary stuck around even after the rigid class system it described was retired.

IPv6: a different scale entirely

IPv6 uses the same slash-notation concept, but addresses are 128 bits instead of 32, conventionally written as eight groups of 4 hex digits. A typical IPv6 allocation to an individual network is a /64 — leaving 64 host bits, or 2⁶⁴ possible addresses in a single subnet, a number so large that address-conservation concerns from the IPv4 era mostly don’t apply. The IPv6 Calculator on this site handles the expand/compress notation IPv6 uses (the :: shorthand for runs of zero groups) — a different but related piece of the same addressing puzzle.

Try it yourself

Rather than memorizing the table above, the CIDR Calculator lets you paste any CIDR block (like 10.0.0.0/16) and get the network address, broadcast address, and exact usable host count instantly — useful for sanity-checking a subnet plan before you commit it to a router configuration.

Related calculators