Union and Intersection Calculator

Find the union, intersection, and differences of two sets of numbers.

Enter your values

Separate values with spaces, commas, or new lines.

Separate values with spaces, commas, or new lines.

Result

{ 1, 2, 3, 4, 5, 6 }
Result represents
Union
Intersection
{ 2, 5 }
A minus B
{ 1, 3 }
B minus A
{ 4, 6 }
Need help with your result? Ask a question about your inputs or calculation. Ask AI
0 / 2000
20 requests per day · resets at 00:00 UTC

When to use Union and Intersection Calculator

Find the union, intersection, and differences of two sets of numbers.

Check algebraic work and compare how changing coefficients or parameters changes the solution.

How to use this tool

  1. Enter the inputs listed below. Follow the field format, and select units beside each supported quantity.
  2. Results update automatically. Review the main result and its breakdown. Use Clear to enter a new scenario.
  • Elements of set A — Separate values with spaces, commas, or new lines.
  • Elements of set B — Separate values with spaces, commas, or new lines.

How it works

Enter numbers in each set or type ∅ for the empty set. The union contains all distinct elements. The intersection contains only shared elements.

Worked example

The examples below use fixed sample inputs. They explain the calculation and do not change when you edit the tool above.

Elements of set A
1 2 3 5
Elements of set B
2 4 5 6
Result
{ 1, 2, 3, 4, 5, 6 }
Result represents
Union
Intersection
{ 2, 5 }
A minus B
{ 1, 3 }
B minus A
{ 4, 6 }

Understanding the result and its limits

Respect the stated domain and input order. A formula may have no real solution, several solutions or a singular case.

Frequently asked questions

How can I check an algebraic result?

Substitute it into the original equation or expression. Retain enough digits and check any restrictions before simplifying.

Methodology and references

Use the formulas and assumptions above when interpreting the example. Any practical estimate depends on the accuracy of the inputs.