Range Union Calculator
Combine address sets.
Range Union Calculator: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related Subnet Math & Set OperationsAll Tools
Bitwise Subnet Calculator
Show address-and-mask operations.
IP Address Offset Calculator
Add or subtract address positions.
Address Distance Calculator
Count positions between two addresses.
Subnet Boundary Checker
Check alignment to a specified prefix.
IP-in-Range Checker
Test whether an address belongs.
IP-in-Subnet Checker
Test membership within a CIDR block.
How Range Union Calculator Works?
This tool works by sorting all input ranges by start address and joining any ranges that overlap or touch, producing the smallest set of disjoint ranges.
Paste the ranges
Enter ranges and CIDR blocks from 2 or more sets.
Sort by start
The calculator orders every interval by its start address.
Sweep and join
A range that starts at or before the current end + 1 extends the current interval.
Output the union
The result lists disjoint ranges with their total size and CIDR form.
Range Union Calculator Formula
The formula is A ∪ B = merge(sort(A + B)), where merge joins intervals with Start_next ≤ End_current + 1.
Join rule
S_next ≤ E_cur + 1 → E_cur = max(E_cur, E_next)Overlapping or adjacent.
New interval
S_next > E_cur + 1Starts a separate range.
Union size
|A| + |B| − |A ∩ B|Inclusion–exclusion check.
Worked example: 2 sets of ranges
Set A: 10.0.0.0/25, 10.0.1.0/24 Set B: 10.0.0.128/25, 10.0.3.0/24 Sorted: .0.0/25, .0.128/25, .1.0/24, .3.0/24 Union: 10.0.0.0 – 10.0.1.255 → 10.0.0.0/23 Union: 10.0.3.0 – 10.0.3.255 → 10.0.3.0/24
Range Union Calculator Conversion Table
The table shows the union of 6 pairs of address sets.
| Set A | Set B | Union | Union Size |
|---|---|---|---|
| 10.0.0.0/25 | 10.0.0.128/25 | 10.0.0.0/24 | 256 |
| 10.0.0.0/24 | 10.0.2.0/24 | 10.0.0.0/24, 10.0.2.0/24 | 512 |
| 192.168.1.0/24 | 192.168.1.64/26 | 192.168.1.0/24 | 256 |
| 172.16.0.0/23 | 172.16.1.0/24 | 172.16.0.0/23 | 512 |
| 203.0.113.0/26 | 203.0.113.64/27 | 203.0.113.0/26 + 203.0.113.64/27 | 96 |
| 198.51.100.0/25 | 198.51.100.192/26 | 198.51.100.0/25, 198.51.100.192/26 | 192 |
What is Range Union Calculator?
The Range Union Calculator is a tool that combines 2 or more sets of IPv4 addresses into one set with no duplicates.
Union is the "OR" of address sets. Combining 2 allow-lists, 2 threat feeds, or 2 office address sets gives every address that appears in at least one input, listed once.
The output is the shortest disjoint range list, which converts to the fewest CIDR blocks. 2 adjacent /25 blocks become a single /24.
What are the uses of Range Union Calculator?
There are 4 main uses of the Range Union Calculator, including list consolidation, policy merging, and feed aggregation.
Consolidating allow-lists
Two teams' allow-lists combine into 1 list without duplicates.
Merging policies after acquisitions
Address objects from 2 companies become one set.
Aggregating threat feeds
Multiple blocklists combine into 1 deduplicated feed.
Measuring total coverage
The union size shows the real number of addresses covered.