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
How to Use This Calculator
- Enter the elements of Set A and Set B as comma-separated values.
- Select the set operation: union, intersection, difference (A−B or B−A), or symmetric difference.
- Review the resulting set elements and cardinality.
- Check the Venn diagram representation to visualize the overlap.
- Use the cardinality outputs to verify set relationships in database queries or combinatorics problems.
How the result changes with Set A Size
| Set A Size | Union (A ∪ B) | Intersection (A ∩ B) |
|---|---|---|
| 10,000 | 10,020 | 10 |
| 35,000 | 35,020 | 10 |
| 65,000 | 65,020 | 10 |
| 90,000 | 90,020 | 10 |
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
- Identify Input Parameters4 parametersSet A Size = 50, Set B Size = 30, Overlap (A ∩ B) = 10, Universal Set Size = 100 = 4 input(s) provided
- Calculate UnionUnion70 = 70
- Calculate IntersectionIntersection10 = 10
- Calculate DifferenceDifference40 = 40
- Calculate DifferenceDifference20 = 20
Engine last updated . Checked against 4 independently-derived tests — how we verify calculators.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Venn Diagram Calculator
Calculate exclusive region values for 2-set or 3-set Venn diagrams using inclusion-exclusion principle.
Logic & Formal ReasoningTruth Table Generator
Generate a complete truth table for propositional logic formulas with 2-4 variables and common logical operations.
Discrete MathematicsInclusion-Exclusion Calculator
Apply the inclusion-exclusion principle to compute union sizes and exclusive membership for up to three sets.
Logic & Formal ReasoningBoolean Algebra Simplifier
Estimate Boolean expression simplification from sum-of-products form. Calculates term and literal reduction using grouping heuristics.
More in Math & Statistics.