Last reviewed: May 2026
Give it a start and end address and it returns the smallest set of CIDR blocks that covers the range exactly — no extra addresses included, none missed. This is the conversion you need when a vendor, ticket, or allow-list gives you a range but your firewall, ACL, or security group only accepts CIDR.
Open the full subnet calculator →A CIDR block has two hard constraints: it must contain a power-of-two number of addresses, and it must start on an address that is a multiple of that size. A range handed to you by a person respects neither.
Take 10.0.0.5 – 10.0.3.200. It starts five addresses into a /24 and stops partway through another, so no single block can describe it. The converter walks the range greedily — at each step taking the largest block that both starts on a valid boundary and stays inside the range — which is provably the minimal set.
| Range | CIDR blocks | Notes |
|---|---|---|
| 192.168.1.0 – 192.168.1.255 | 192.168.1.0/24 | Clean single block |
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | RFC 1918 class A |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | RFC 1918 middle block |
| 192.168.1.1 – 192.168.1.254 | /32 + /31 + … + /32 | Excluding network and broadcast fragments it heavily |
| 10.0.0.0 – 10.0.0.1 | 10.0.0.0/31 | Point-to-point link (RFC 3021) |
That fourth row is worth internalising: trimming a single address off each end of a clean /24 turns one block into more than a dozen. If a range looks like it should be simple but produces many blocks, check whether it has been trimmed at the edges.
Start at the first address and repeatedly take the largest CIDR block that is aligned to that address and does not extend past the end address. Move to the address after that block and repeat until the end is reached. Most ranges cannot be expressed as a single CIDR, so the result is usually a set of blocks.
A CIDR block must start on an address that is a multiple of its own size and must contain a power-of-two number of addresses. A range like 10.0.0.5 to 10.0.3.200 starts and ends off those boundaries, so it can only be covered exactly by combining several differently sized blocks.
That range is exactly 192.168.1.0/24. It starts on a 256-address boundary and contains exactly 256 addresses, so it maps to a single CIDR block with no remainder.