Networking
IP Range Calculator
Calculate span and total quantity of addresses between start and end IPv4 addresses.
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
- Parses IPs into 32-bit integers and calculates inclusive span delta.
Worked Network Example
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.
Related Networking
IPv4 Subnet Calculator
Bitwise IPv4 subnetting calculations with full network, broadcast, wildcard, and binary breakdowns.
IPv4 Address Converter
Transform IPv4 addresses into raw 32-bit decimal, binary octets, and hex notation.
CIDR to Subnet Mask Calculator
Bidirectional converter between CIDR prefix notation (/24) and dotted-decimal subnet masks.