IP Range Calculator

Convert between IP address ranges and CIDR notation. Find the minimum set of CIDR blocks that covers any given IP range.

IP Range vs CIDR

An IP range (e.g., 10.0.0.1 – 10.0.0.100) is human-readable but not directly usable in routing tables. CIDR notation (e.g., 10.0.0.0/24) is the standard for configuring firewalls, security groups, and routing.

Note: An arbitrary IP range rarely maps to a single CIDR block. This calculator finds the minimum number of CIDR blocks needed to exactly cover the requested range.

Frequently Asked Questions

Why are there multiple CIDR blocks for my range?

CIDR blocks must be power-of-2 aligned. If your range doesn't align to a single power-of-2 boundary, multiple blocks are needed. For example, 10.0.0.1 – 10.0.0.255 needs 8 CIDR blocks because it doesn't start at a block boundary.

What is /8, /16, /24?

The number after the slash is the prefix length. A /24 has 256 addresses, a /16 has 65,536, and a /8 has 16,777,216. Each decrease in prefix length doubles the number of addresses.