IP Range to CIDR Calculator
Turns a start and end address into CIDR notation for firewall rules and routing.
CIDR blocks needed
—
Share sends a link that reopens these numbers. Copy details pastes the full breakdown as a list.
Addresses in the range —
The blocks
Reading this —
The formula
block size = largest 2^n that starts on a multiple of 2^n and fits the range
Starting from the first address, each step takes the largest block that fits, then moves on.
What to watch out for
To go the other way, from CIDR to a range, use the IPv4 subnet calculator.
Frequently Asked Questions
How do I write 192.168.1.0 to 192.168.2.127 in CIDR?
It takes 2 blocks: 192.168.1.0/24 and 192.168.2.0/25.
What does /24 mean in CIDR notation?
The first 24 bits name the network, leaving 256 addresses in the block.