IPv4 Range to CIDR Calculator

Turn an inclusive IPv4 address range into the smallest exact set of CIDR blocks.

Exact CIDR coverage

Why a range may require several blocks

CIDR networks have power-of-two sizes and must start on matching boundaries. An arbitrary range therefore often needs several non-overlapping CIDR blocks to cover it exactly.

Common uses

The result can help prepare firewall allowlists, routing rules, cloud network configurations, and documentation. Confirm that the destination system interprets both endpoints inclusively.

Range versus subnet

This tool starts with two endpoints. The Subnet Calculator starts with one network and helps divide it.