Skip to main content
Calcimator

Set Theory Calculator

Calculate union, intersection, difference, symmetric difference, and complements for two sets with similarity metrics.

Inputs

Results

Union (A ∪ B)

70

Intersection (A ∩ B)

10

Difference (A − B)40
Difference (B − A)20
Symmetric Diff (A Δ B)60
Complement of A50
Complement of B70
Jaccard Index0.1429
Overlap Coefficient0.3333
How to Use This Calculator
  1. Enter the elements of Set A and Set B as comma-separated values.
  2. Select the set operation: union, intersection, difference (A−B or B−A), or symmetric difference.
  3. Review the resulting set elements and cardinality.
  4. Check the Venn diagram representation to visualize the overlap.
  5. Use the cardinality outputs to verify set relationships in database queries or combinatorics problems.

How the result changes with Set A Size

Set A SizeUnion (A ∪ B)Intersection (A ∩ B)
10,00010,02010
35,00035,02010
65,00065,02010
90,00090,02010

What each input means

Set A Size
Number of elements in set A
Set B Size
Number of elements in set B
Overlap (A ∩ B)
Number of elements shared by both A and B
Universal Set Size
Total elements in the universal set (must be ≥ union size)

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Set A Size = 50, Set B Size = 30, Overlap (A ∩ B) = 10, Universal Set Size = 100 = 4 input(s) provided
  2. Calculate Union
    Union
    70 = 70
  3. Calculate Intersection
    Intersection
    10 = 10
  4. Calculate Difference
    Difference
    40 = 40
  5. Calculate Difference
    Difference
    20 = 20

Engine last updated . Checked against 4 independently-derived tests how we verify calculators.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.