Sets and Venn Diagram Calculator
Find unions, intersections, differences and complements of sets with a Venn diagram, or count with n(A ∪ B) = n(A) + n(B) − n(A ∩ B).
About the Sets and Venn Diagram Calculator
The union A ∪ B holds everything in either set; the intersection A ∩ B only what's in both; A − B what's in A but not B; and the complement A′ everything in the universal set U that isn't in A.
When you only know counts, inclusion–exclusion gives the size of a union: add the sets, subtract the overlaps, and (for three sets) add back the part in all three.
The formula
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
- Three sets
- n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(A ∩ C) + n(A ∩ B ∩ C)
- Power set
- a set with n elements has 2ⁿ subsets
Worked example
In a class of 70, 40 like cricket, 30 like football, 10 like both
- n(C ∪ F) = 40 + 30 − 10 = 60
- 70 − 60 = 10 like neither
Questions people ask
Is the empty set a subset of every set?
Yes: ∅ ⊆ A for any set A, which is why a set with n elements has 2ⁿ subsets, including ∅ and itself.
What's the difference between A − B and A Δ B?
A − B is in A but not B; A Δ B (the symmetric difference) is in exactly one of the two.