Home/Tools/Address range

Address range

Calculate an inclusive same-family range and generate the smallest aligned CIDR set with no extra addresses.

All calculations run in this browser. Input is not uploaded.

192.168.1.1 — 192.168.1.254

IPv4
Total addresses
254
CIDRs: 14
14
Minimal exact CIDR coverNo addresses outside the range
192.168.1.1/32192.168.1.2/31192.168.1.4/30192.168.1.8/29192.168.1.16/28192.168.1.32/27192.168.1.64/26192.168.1.128/26192.168.1.192/27192.168.1.224/28192.168.1.240/29192.168.1.248/30192.168.1.252/31192.168.1.254/32

Understanding IP ranges and CIDR

Enter start and end IPs from the same address family. Calculate the inclusive count and the smallest set of CIDR blocks covering the range without adding extra addresses.

Two ranges. Two different results.IPv4
Aligned range256 addresses
IP range
192.168.1.0—192.168.1.255
CIDR coverage
192.168.1.0/24
Across a boundary16 addresses
IP range
192.168.1.8—192.168.1.23
CIDR coverage
192.168.1.8/29192.168.1.16/29

Both endpoints includedAddress count = end − start + 1.

Common questions

Why do 16 addresses need two blocks?

A CIDR must also align to a binary boundary. The second example, .8 through .23, crosses a /28 boundary. Two /29 blocks cover it exactly; a larger single block would include unwanted addresses.

Is the total also the usable address count?

No. This count includes both endpoints and does not subtract network, broadcast or cloud-reserved addresses. Usable IPv4 addresses depend on the prefix and how the subnet is used.

Can I mix IPv4 and IPv6 endpoints?

No. Both endpoints must use the same address family, and the end must not precede the start.

What if both endpoints are identical?

The range contains one address: a /32 for IPv4 or a /128 for IPv6. For example, using 192.168.1.8 for both endpoints returns 192.168.1.8/32.

Which tool accepts an existing CIDR?

This page accepts start and end IPs. If you already have a CIDR such as 192.168.1.0/24, use the CIDR calculator linked below to find its network boundaries, range and address count.

Can I use the result in firewall rules?

The blocks can be used in an allowlist or firewall rule, but first check the allow or deny action, rule order and intended authorization scope. This tool calculates address ranges; it does not determine whether those IPs are trustworthy.

IP Range to CIDR Converter & Address Count | CHA.LA