Skip to main content
IP Range CalculatorPRO
Subnet Math & Set OperationsInstant Client-Side Tool

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.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

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.

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.

  1. Paste the ranges

    Enter ranges and CIDR blocks from 2 or more sets.

  2. Sort by start

    The calculator orders every interval by its start address.

  3. Sweep and join

    A range that starts at or before the current end + 1 extends the current interval.

  4. 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 + 1

Starts 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 ASet BUnionUnion Size
10.0.0.0/2510.0.0.128/2510.0.0.0/24256
10.0.0.0/2410.0.2.0/2410.0.0.0/24, 10.0.2.0/24512
192.168.1.0/24192.168.1.64/26192.168.1.0/24256
172.16.0.0/23172.16.1.0/24172.16.0.0/23512
203.0.113.0/26203.0.113.64/27203.0.113.0/26 + 203.0.113.64/2796
198.51.100.0/25198.51.100.192/26198.51.100.0/25, 198.51.100.192/26192

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.