CIDR Notation Explained: How IP Ranges and Subnets Work
CIDR notation writes an IP range as a prefix length. What /24 and /16 actually mean, how they map to subnet masks, and how to count the addresses in a block.
ProfitTool Team
Security & Dev
What CIDR Stands For
CIDR — Classless Inter-Domain Routing — is a method for representing a block of IP addresses using a base address and a prefix length. It replaced the older classful addressing system (Class A/B/C) in 1993, enabling much more efficient IP address allocation.
The Notation
192.168.1.0/24The number after the slash is the prefix length — how many bits of the 32-bit IPv4 address are fixed (the network portion). The remaining bits identify individual hosts.
| CIDR | Hosts | Subnet Mask | Example Range |
|---|---|---|---|
| /32 | 1 (single host) | 255.255.255.255 | 192.168.1.100 only |
| /31 | 2 (point-to-point) | 255.255.255.254 | 192.168.1.0–1 |
| /30 | 4 (2 usable) | 255.255.255.252 | 192.168.1.0–3 |
| /29 | 8 (6 usable) | 255.255.255.248 | 192.168.1.0–7 |
| /28 | 16 (14 usable) | 255.255.255.240 | 192.168.1.0–15 |
| /24 | 256 (254 usable) | 255.255.255.0 | 192.168.1.0–255 |
| /16 | 65,536 (65,534 usable) | 255.255.0.0 | 192.168.0.0–255.255 |
| /8 | 16,777,216 | 255.0.0.0 | 10.0.0.0–10.255.255.255 |
Usable Hosts
In a standard subnet, two addresses are reserved:
- Network address: the first address (all host bits 0) — e.g. 192.168.1.0
- Broadcast address: the last address (all host bits 1) — e.g. 192.168.1.255
So a /24 has 256 total addresses but only 254 usable host addresses.
Private Ranges (RFC 1918)
These ranges are reserved for private networks and are not routable on the public internet:
10.0.0.0/8— Class A private172.16.0.0/12— Class B private192.168.0.0/16— Class C private
Aggregating Routes (Supernetting)
CIDR allows multiple contiguous networks to be expressed as a single, larger block. For example:
192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24Can be aggregated as: 192.168.0.0/22
Use our CIDR / Subnet Calculator to compute network ranges, host counts and subnet masks instantly.
ProfitTool Team
Security & DevWritten and maintained by the ProfitTool team. Where an article references a ProfitTool utility, the behaviour described is the behaviour of the tool on this site — you can open it and check the output yourself.
More from the Knowledge Hub
Subnet Masks Explained: What Is 255.255.255.0?
A subnet mask splits an IP address into network and host bits. What 255.255.255.0 means, how it maps to /24, and how to work out the usable host range.
Developer ToolsPrivate IP Address Ranges Explained: 10.x, 172.16.x and 192.168.x
Private IP addresses are ranges reserved for internal networks that are not routable on the public internet. This guide covers RFC 1918, why these ranges exist, and how NAT works with them.
Developer ToolsHow DNS Lookup Works: A and AAAA Records Explained
When you type a domain into a browser, DNS translates it to an IP address. This guide explains how DNS resolution works and the difference between A and AAAA records.