IP Range to CIDR Calculator

Count the addresses between two IPv4 addresses and turn the range into the smallest CIDR list.

Runs in your browser Free

From range to CIDR blocks

Firewalls, cloud security groups, CDN allow lists and WAF rules often require CIDR blocks rather than ranges, and converting a range like 192.168.1.10 – 192.168.1.75 to CIDR by hand is hard. The IP Range Calculator does it for you.

What's calculated

  • The total number of addresses between the start and end
  • The minimal list of CIDR blocks that covers the range exactly

Why several blocks?

A CIDR block must start on a boundary matching its size. Ranges that don't line up are split into blocks of different sizes; the tool covers the range with as few blocks as possible and no extra addresses.

How to use IP Range to CIDR Calculator

  1. Enter the start IP address.
  2. Enter the end IP address.
  3. Review the address count and CIDR list.
  4. Copy the blocks into your rules.

Why use this tool?

Write security rules with exact precision, neither too broad nor missing addresses.

FAQ

Why does one range produce several CIDR blocks?

A CIDR block must start on a boundary matching its size. Unaligned ranges are split into several blocks.

Is IPv6 supported?

The tool is designed for IPv4 addresses.

Can a range be a single block?

Yes, if it aligns exactly to a block boundary (e.g. .0 – .255).

Related tools