Math

Instant, private, and free

Union and Intersection Calculator.

Calculate union and intersection of two finite comma-separated sets.

On-device calculationNo signup
01

Set your values

Results update as you type.

Union: 1, 2, 3, 4

Union

1, 2, 3, 4
Intersection: 2, 3

Intersection

2, 3
Union count: 4

Union count

0.000000
Intersection count: 2

Intersection count

0.000000

Results update automatically as you type.

Use Cases

Math homework and set theory practice

Quickly verify your manual calculations for union and intersection of sets, helping you learn and check your work.

Example: Check that A={1,2,3} and B={3,4} gives union {1,2,3,4} and intersection {3}.

Data comparison and deduplication

Use the union to combine lists without duplicates, and the intersection to find common items between two datasets.

Example: Find common tags between two blog posts: Set A={math, science}, Set B={science, history} → intersection {science}.

Frequently Asked Questions

How does the Union and Intersection Calculator work?
You enter two sets (Set A and Set B) as comma-separated values. The calculator uses deterministic formulas to compute the union (all unique elements from both sets) and the intersection (elements common to both sets). Results are shown instantly.
What is the difference between union and intersection?
The union of two sets contains every element that appears in either set, without duplicates. The intersection contains only the elements that appear in both sets. For example, if A={1,2} and B={2,3}, union={1,2,3} and intersection={2}.
Can I use sets with different types of elements?
Yes, you can enter numbers, words, or symbols as long as they are separated by commas. The calculator treats each unique entry as an element. For example, Set A could be {apple, banana} and Set B could be {banana, cherry}.

Tips & Common Mistakes

Tips

  • Enter elements separated by commas (e.g., 1, 2, 3). Spaces are ignored, so '1,2' and '1, 2' work the same.
  • Ensure elements are spelled consistently to get accurate intersection results; 'apple' and 'Apple' are treated as different.
  • Use the union result to merge two lists without duplicates, which is handy for creating unique lists.
  • For large sets, double-check that you haven't missed any commas, as a missing comma can merge two elements into one.

Common Mistakes to Avoid

  • Forgetting to separate elements with commas, causing the calculator to treat multiple items as a single element.
  • Using inconsistent formatting (e.g., extra spaces or different capitalization) which can lead to missing intersection matches.
  • Assuming the calculator handles duplicate entries within a set; it treats each set as a set, so duplicates are ignored.

Last updated: August 13, 2026