TOOL

CIDR Calculator

Convert CIDR to a range, a range to the smallest set of CIDR blocks, and aggregate a list of blocks. Everything runs locally.

Processing happens locally in your browser. Nothing you type is sent to BlackhawkHub.

Three modes

  • CIDR → range: enter a block like 203.0.113.0/26 to see its first and last address, host count and mask.
  • Range → CIDR: enter start and end addresses to get the minimal set of aligned CIDR blocks covering them exactly.
  • Aggregate: paste a list of CIDR blocks to combine adjacent, aligned ones into the smallest equivalent set.

Why ranges need several blocks

CIDR blocks are always a power-of-two size aligned to their own boundary, so an arbitrary range such as 192.168.0.5–192.168.3.200 cannot be one block. The calculator returns the fewest blocks that cover it exactly, which is what firewall and routing rules need.

The CIDR notation record explains prefixes, alignment and aggregation. For single-network details use the Subnet Calculator.

Frequently asked questions

How do I convert an IP range to CIDR?

Enter the start and end addresses; the calculator returns the smallest set of aligned CIDR blocks that exactly covers the range. Arbitrary ranges rarely fit one block, so several may be returned.

What is CIDR aggregation?

Combining adjacent, aligned blocks into fewer, larger blocks. 192.168.0.0/24 and 192.168.1.0/24 aggregate to 192.168.0.0/23. The aggregate mode does this for a list you paste in.

Sources