Skip to content

Networking

IP Range Calculator

Calculate span and total quantity of addresses between start and end IPv4 addresses.

Total IP Addresses: 254

When a Range Spans Multiple Subnets

A range like 10.0.0.5 – 10.0.0.130 crosses the /25 boundary at 10.0.0.128, so no single CIDR prefix describes it. The minimal cover is the shortest list of standard prefixes whose union is exactly the range — smaller blocks where the range starts or ends, larger aligned blocks in the middle.

This is the math behind firewall rules and routing tables: an ACL accepts a prefix list, not an arbitrary interval, and the minimal cover keeps both the rule count and the audit surface small.

Turning a Start and End Address Into a Count

Each IPv4 address is a 32-bit number, so the size of a range is the end value minus the start value plus one. From 192.168.1.10 to 192.168.1.20 that is 11 addresses. Ranges that cross an octet boundary work in the same way.

A range is not necessarily a single CIDR block. A block must start at a multiple of its own size, so an arbitrary range often needs several CIDR blocks to describe it exactly. This matters when writing firewall rules, where one rule per block is required.

How the Network Math Works

  1. Parses IPs into 32-bit integers and calculates inclusive span delta.
Formula & Technical Standard
Address Count = (End IP as UInt32) - (Start IP as UInt32) + 1

Worked Network Example

Scope Span
Input: 10.0.0.1 to 10.0.0.254
Output: 254 addresses
Inclusive host count.

Common Questions

Can any range be one CIDR block?

No. Single CIDR blocks must align on power-of-two boundaries.

How can I split a range into CIDR blocks?

The standard approach recursively finds the largest power-of-two block that fits inside the remaining range, splits the remainder, and repeats until the entire span is covered with valid CIDR blocks.