CIDR Calculator
e.g. 10.0.0.0/22, 10.0.0.0 - 10.0.5.255 or one block per line to summarize
CIDR block → IP range
| First IP | 10.0.0.0 | |
|---|---|---|
| Last IP | 10.0.3.255 | |
| Total addresses | 1,024 | |
| Subnet mask | 255.255.252.0 | |
| Wildcard mask | 0.0.3.255 | |
| Prefix length | /22 | |
| CIDR block | 10.0.0.0/22 |
Runs entirely in your browser. Nothing you enter is sent to a server.
How to use the CIDR calculator
Enter a CIDR block such as 10.0.0.0/22 to see the first and last address and how many addresses it holds. Enter a range such as 10.0.0.0 - 10.0.5.255 to get the smallest set of CIDR blocks that covers it exactly. Paste several blocks, one per line, to summarize them into the fewest possible routes. Everything runs in your browser.
Example: converting a range to CIDR
The range 10.0.0.0 – 10.0.5.255 holds 1,536 addresses. That is not a power of two, so no single block fits. The exact cover is two blocks: 10.0.0.0/22 (10.0.0.0 – 10.0.3.255, 1,024 addresses) and10.0.4.0/23 (10.0.4.0 – 10.0.5.255, 512 addresses).
Route summarization example
The networks 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24 share their first 22 bits, so they summarize to a single route: 192.168.0.0/22 (192.168.0.0 – 192.168.3.255).
Common CIDR blocks
| CIDR block | Range | Addresses |
|---|---|---|
| 10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 | 16,777,216 |
| 172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 | 1,048,576 |
| 192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 | 65,536 |
| 100.64.0.0/10 | 100.64.0.0 – 100.127.255.255 | 4,194,304 |
| 192.168.1.0/24 | 192.168.1.0 – 192.168.1.255 | 256 |
Frequently asked questions
What does the number after the slash mean?
It is the prefix length: how many leading bits of the address are fixed as the network. /22 fixes 22 bits and leaves 10 for hosts, so the block has 2¹⁰ = 1,024 addresses.
How do I convert an IP range to CIDR?
Start at the first address, take the largest block that begins there and does not pass the last address, then repeat from the next address. The calculator does this automatically.
How many IP addresses are in a /22?
1,024 addresses, or 1,022 usable hosts in a normal subnet.
Is 10.0.0.5 in 10.0.0.0/22?
Yes. 10.0.0.0/22 covers 10.0.0.0 to 10.0.3.255.
What is the difference between CIDR and a subnet mask?
They express the same thing. /24 and 255.255.255.0 both mean the first 24 bits are the network; CIDR is just shorter.