Union and Intersection Calculator
Find the union (every element in either set) and the intersection (elements common to both sets) of two sets of numbers.
About the Union and Intersection Calculator
The union of two sets combines every element that appears in either set, with duplicates removed. The intersection keeps only the elements that appear in both sets. Together, union and intersection are the two most basic operations in set theory.
Formula: A ∪ B = {x : x ∈ A or x ∈ B} · A ∩ B = {x : x ∈ A and x ∈ B}
Enter the numbers in each set separated by commas or spaces — order and repeats don't matter, since a set only cares whether an element is present, not how many times or in what order it appears. If the two sets share no elements at all, the intersection is the empty set, written ∅.
Set operations like union and intersection underpin probability (combining or overlapping events), database queries (joins and filters), and formal logic — they're also the building blocks behind interval notation and inequality solution sets in algebra.