Last reviewed: May 2026
CIDR notation (pronounced "cider") is the standard way to write an IP address with its network size. You've seen it everywhere: 192.168.1.0/24, 10.0.0.0/8, 172.16.0.0/12. This guide explains exactly what the slash number means, how it relates to subnet masks, and why the entire internet depends on it.
Calculate any CIDR block instantly →An IPv4 address is 32 bits long. The slash number — the prefix length — tells you how many of those 32 bits identify the network. The remaining bits identify individual hosts within that network.
The number of host addresses is 2(32 − prefix). For a /24: 2(32−24) = 28 = 256 addresses. Two are always reserved (network + broadcast), leaving 254 usable.
CIDR prefix length and dotted-decimal subnet mask are equivalent representations. The subnet mask is formed by setting the first N bits to 1 and the rest to 0, then converting each 8-bit group to a decimal number.
| CIDR Prefix | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /32 | 255.255.255.255 | 1 | 1 (host route) |
Before 1993, IPv4 used classful networking: addresses were divided into Class A (/8), Class B (/16), and Class C (/24) based on the first octet. This was wasteful — a company needing 500 hosts had to get an entire Class B (65,534 hosts), wasting 65,000+ addresses.
| Class | First Octet Range | Prefix | Addresses | Problem |
|---|---|---|---|---|
| A | 1–126 | /8 | 16,777,214 | Massively over-sized for most orgs |
| B | 128–191 | /16 | 65,534 | Over-sized; wasted millions of IPs |
| C | 192–223 | /24 | 254 | Too small for many organisations |
With CIDR (RFC 1519, 1993), any prefix length from /0 to /32 is valid. A company needing 500 hosts gets a /23 (510 usable hosts) instead of a /16. This drastically slowed IPv4 exhaustion and enabled the modern internet's routing table to be manageable.
Take 192.168.10.0/24 as an example:
CIDR also allows you to aggregate multiple contiguous subnets into a single, shorter-prefix route — called a supernet or summary route. This is essential for keeping BGP routing tables small.
Three CIDR ranges are reserved for private use and will never appear on the public internet (defined in RFC 1918):
| Block | Range | Total Addresses | Common Use |
|---|---|---|---|
| 10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 | 16,777,216 | Large enterprises, cloud VPCs |
| 172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 | 1,048,576 | Corporate networks, Docker defaults |
| 192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 | 65,536 | Home routers, small office networks |