CIDR Calculator
Classless Inter-Domain Routing (CIDR) notation expresses an IP address and its routing prefix together. Enter a CIDR block (e.g. 10.0.0.0/8) to compute all related network parameters.
CIDR Notation Explained
CIDR (Classless Inter-Domain Routing) replaced the old class-based IP addressing system in 1993, enabling more efficient allocation of IPv4 address space. The prefix length - The number after the slash - Indicates how many leading bits identify the network portion. The remaining bits identify individual hosts within that network. New to the format? Start with our guide on what CIDR notation is.
Subnetting vs Supernetting
Subnetting splits a larger network into smaller subnetworks by extending the prefix length (e.g. dividing a /24 into two /25s). Supernetting (route aggregation) does the opposite - It combines multiple smaller networks into a larger summary route with a shorter prefix, reducing the number of entries in routing tables. Both use the same CIDR math. For a step-by-step walkthrough of the math, see our FAQ on how to calculate a subnet.
Complete CIDR Reference Table
| Prefix | Subnet Mask | Total Addresses | Usable Hosts | Subnets of /24 |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | 65,536 |
| /9 | 255.128.0.0 | 8,388,608 | 8,388,606 | 32,768 |
| /10 | 255.192.0.0 | 4,194,304 | 4,194,302 | 16,384 |
| /11 | 255.224.0.0 | 2,097,152 | 2,097,150 | 8,192 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 | 4,096 |
| /13 | 255.248.0.0 | 524,288 | 524,286 | 2,048 |
| /14 | 255.252.0.0 | 262,144 | 262,142 | 1,024 |
| /15 | 255.254.0.0 | 131,072 | 131,070 | 512 |
| /16 | 255.255.0.0 | 65,536 | 65,534 | 256 |
| /17 | 255.255.128.0 | 32,768 | 32,766 | 128 |
| /18 | 255.255.192.0 | 16,384 | 16,382 | 64 |
| /19 | 255.255.224.0 | 8,192 | 8,190 | 32 |
| /20 | 255.255.240.0 | 4,096 | 4,094 | 16 |
| /21 | 255.255.248.0 | 2,048 | 2,046 | 8 |
| /22 | 255.255.252.0 | 1,024 | 1,022 | 4 |
| /23 | 255.255.254.0 | 512 | 510 | 2 |
| /24 | 255.255.255.0 | 256 | 254 | 1 |
| /25 | 255.255.255.128 | 128 | 126 | - |
| /26 | 255.255.255.192 | 64 | 62 | - |
| /27 | 255.255.255.224 | 32 | 30 | - |
| /28 | 255.255.255.240 | 16 | 14 | - |
| /29 | 255.255.255.248 | 8 | 6 | - |
| /30 | 255.255.255.252 | 4 | 2 | - |
| /31 | 255.255.255.254 | 2 | 2 | - |
| /32 | 255.255.255.255 | 1 | 1 | - |
Address Space by Prefix Length
Relative address space size (logarithmic scale)
Frequently Asked Questions
The formula is: hosts = 2^(32 - prefix_length) - 2. For a /24: 2^(32-24) - 2 = 256 - 2 = 254. The -2 accounts for the network address and broadcast address. For /31 and /32 the standard rules do not apply - /31 is used for point-to-point links (RFC 3021) and /32 represents a single host.
Classful addressing divided IPv4 space into fixed classes: Class A (/8), Class B (/16), Class C (/24). This was wasteful - A company needing 300 IPs had to receive a full /16 (65K addresses). CIDR allows any prefix length, so that company can receive a /23 (512 addresses) instead, preserving scarce IPv4 space.
Route aggregation (supernetting) combines multiple consecutive CIDR blocks into a single shorter-prefix route. For example, four /24 networks can be summarized as one /22. This reduces the size of global routing tables, which directly improves router performance and stability on the internet.