Set Theory Calculator

Calculate union, intersection, difference, and symmetric difference of sets

The set theory calculator performs union, intersection, difference, and symmetric difference on two sets. Enter comma-separated elements (numbers or text) and see all standard set operations with cardinality and Venn diagram region breakdown.

Set Theory Calculator

Comma-separated values

Comma-separated values

How to Use the Set Theory Calculator

Set theory provides the mathematical language for talking about collections. Every set is a well-defined group of distinct objects called elements. The set theory calculator performs all standard set operations in one click.

Entering Sets

Enter comma-separated values for Set A and Set B. Elements can be numbers (1, 2, 3) or words (apple, banana, cherry). Duplicate values are automatically removed — sets by definition contain only unique elements.

Operations Explained

Union A ∪ B: all elements in A or B (or both). Intersection A ∩ B: only elements in both A and B. A − B: elements in A that are not in B. Symmetric difference A △ B: elements in exactly one of the two sets (union minus intersection).

Example

A = {1,2,3,4} and B = {3,4,5,6}. Union = {1,2,3,4,5,6}. Intersection = {3,4}. A−B = {1,2}. B−A = {5,6}. Symmetric difference = {1,2,5,6}. The Venn diagram shows A only region {1,2}, shared region {3,4}, and B only region {5,6}.

Frequently Asked Questions

What is set theory?

Set theory is the branch of mathematics studying collections (sets) of objects. Two key operations are: Union (A ∪ B) — all elements in A or B or both; Intersection (A ∩ B) — only elements in both A and B.

What is the difference between union and intersection?

Union A ∪ B = {x : x ∈ A or x ∈ B}. Intersection A ∩ B = {x : x ∈ A and x ∈ B}. Example: A = {1,2,3,4}, B = {3,4,5,6}. Union = {1,2,3,4,5,6}, Intersection = {3,4}.

What is symmetric difference?

Symmetric difference A △ B = (A ∪ B) − (A ∩ B) = elements in A or B but not both. Using the example: A △ B = {1,2,5,6}. It's equivalent to (A−B) ∪ (B−A).

Is this calculator free?

Yes, completely free with no signup required. All calculations run in your browser.

What is the power set?

The power set of A is the set of all subsets of A, including the empty set and A itself. If |A| = n, then |P(A)| = 2ⁿ. For A = {1,2,3}, P(A) = {∅, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}} — 8 subsets.