Set Calculator
Compute the union, intersection, difference or symmetric difference of two sets. Enter values as a comma-separated list; the result is shown as a set and shaded on a Venn diagram.
Check whether every element of Set A is also in Set B.
What is a set?
A set is a collection of distinct objects called elements or members. Sets are unordered and contain no duplicates, so {1, 2, 3} and {3, 1, 2, 1} describe the same set. We write x ∈ A when x is an element of A, and x ∉ A when it isn't.
Set operations, piece by piece
Each card explains one thing this tool computes from your two sets A and B — what it keeps, what it drops, and how the Venn regions map to the result.
Union — A ∪ B
Everything in A, in B, or in both. Duplicates collapse to a single element in the output.
Intersection — A ∩ B
Only the elements that appear in both A and B. Empty when the two sets are disjoint.
Difference — A − B (and B − A)
A − B keeps the elements of A that are not in B. Order matters: A − B and B − A are usually different sets.
Symmetric difference — A △ B
Everything that belongs to exactly one of the two sets — the union with the overlap removed.
Features of this calculator
- Accepts numbers, words, or any comma-separated values
- Automatically removes duplicates and treats sets as unordered
- Supports union, intersection, both directions of difference, and symmetric difference
- Renders a Venn diagram with the selected region shaded
- Includes a separate subset checker tool
Frequently asked questions
+What does the empty set look like on a Venn diagram?
The empty set corresponds to any region with nothing shaded and no elements listed inside it. Two disjoint sets have an empty intersection — the overlap region contains no elements.
+When are two sets equal?
When they contain exactly the same elements. Because order and repetition don't matter, {a, b, c} and {c, a, b, a} are equal.
+Do the elements have to be numbers?
No. Elements can be anything — numbers, words, symbols, or even other sets. This calculator treats each comma-separated token as an element and compares them exactly.
+How is symmetric difference related to XOR?
They match exactly. An element is in A △ B when it's in A XOR B — in one set but not both — which is the same truth table as the XOR logical operator.
Related calculators
Probability Calculator and Permutation & Combination Calculator are coming soon — they will link here once published.