DigitHelm
Discrete Math

Set Theory Calculator | Union, Intersection, Complement & Venn Diagram

Define up to three sets A, B, C with any elements and compute all standard set operations: union, intersection, difference, symmetric difference, complement, Cartesian product, and power set. Displays a membership table, text Venn diagram, cardinality, and subset relationships.

Instant Results100% FreeAny DeviceNo Sign-up

What Is the Set Theory Calculator | Union, Intersection, Complement & Venn Diagram?

Set theory is the mathematical study of collections of distinct objects. The basic operations — union, intersection, difference, and symmetric difference — are the building blocks of logic, probability, database queries, and computer science. The power set of a set A contains every possible subset, including the empty set and A itself. Cartesian product A×B produces all ordered pairs (a,b) with a∈A and b∈B.

Formula

A ∪ B = {x : x ∈ A or x ∈ B}

A ∩ B = {x : x ∈ A and x ∈ B}

A − B = {x : x ∈ A and x ∉ B}

A △ B = (A − B) ∪ (B − A)

𝒫(A) = all subsets of A | |𝒫(A)| = 2^|A|

How to Use

  1. 1

    Enter elements in Set A separated by commas or spaces (e.g. 1 2 3)

  2. 2

    Enter elements in Set B (e.g. 2 3 4)

  3. 3

    Optionally enable Set C for three-set operations

  4. 4

    Or load a preset (Numbers, Letters, Colors)

  5. 5

    Click Compute to see all operations and the Venn diagram

  6. 6

    Toggle Power Set (for |A|≤6) and Cartesian Product A×B

Enter elements in Set A and Set B (comma or space separated). Enable Set C for three-set operations. Click Compute to see all operations, a Venn diagram, cardinalities, and subset relationships. Toggle Power Set and Cartesian Product for additional results.

Example Calculation

Example: A = {1,2,3,4}, B = {3,4,5,6}

A ∪ B = {1,2,3,4,5,6} | |A ∪ B| = 6

A ∩ B = {3,4} | |A ∩ B| = 2

A − B = {1,2} | B − A = {5,6}

A △ B = {1,2,5,6} | A ⊆ B? No | B ⊆ A? No

Frequently Asked Questions

What is the symmetric difference?

The symmetric difference A△B contains elements in exactly one of A or B, but not both. Equivalently, A△B = (A∪B) − (A∩B) = (A−B) ∪ (B−A). It represents what makes A and B different from each other.

What is the power set?

The power set 𝒫(A) is the set of all subsets of A, including the empty set ∅ and A itself. If |A|=n then |𝒫(A)|=2ⁿ. For A={1,2}: 𝒫(A) = {∅, {1}, {2}, {1,2}}. The calculator limits display to |A|≤6 (64 subsets) to keep the UI manageable.

What is a Cartesian product?

The Cartesian product A×B = {(a,b) : a∈A, b∈B} is the set of all ordered pairs. |A×B| = |A|·|B|. For A={1,2} and B={x,y}: A×B = {(1,x),(1,y),(2,x),(2,y)}. Cartesian products are the foundation of relational database JOIN operations.

How does the Venn diagram work?

The text Venn diagram shows three regions: only-A (elements in A but not B), A∩B (elements in both), and only-B (elements in B but not A). With three sets, there are seven regions including A∩B∩C, only A∩B, only A∩C, only B∩C, only-A, only-B, and only-C.

You Might Also Like

Explore 360+ Free Calculators

From math and science to finance and everyday life — all free, no account needed.