Set Calculator: Union, Intersection, Complement & Venn Diagram

Free set calculator: union, intersection, difference, symmetric difference, complement, power set and Cartesian product, with a Venn diagram.

Type your sets and this free set calculator works out the union, intersection, differences, symmetric difference and complements, checks subsets, lists the power set and Cartesian product, and draws a Venn diagram for two or three sets. Great for set theory homework and discrete maths.

Separate elements with commas
Needed for complements. Tip: type 1-10 for a range.
Advertisement

Set operations explained

OperationSymbolMeaningA = {1,2,3,4,5}, B = {4,5,6,7}
UnionA ∪ Bin A or B (or both){1,2,3,4,5,6,7}
IntersectionA ∩ Bin both A and B{4,5}
DifferenceA − Bin A but not B{1,2,3}
Symmetric differenceA Δ Bin exactly one of them{1,2,3,6,7}
ComplementA′in U but not A{6,7,8,9,10} for U = 1–10
Inclusion–exclusion |A ∪ B| = |A| + |B| − |A ∩ B| |A ∪ B ∪ C| = |A| + |B| + |C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C| De Morgan’s laws: (A ∪ B)′ = A′ ∩ B′ (A ∩ B)′ = A′ ∪ B′ Power set size: |P(A)| = 2^|A| Cartesian product: |A × B| = |A| · |B|

Sets ignore order and repeats, so {3, 1, 1, 2} is the same set as {1, 2, 3}. Elements can be numbers, letters or words, and matching is case-sensitive.

Advertisement

Frequently asked questions

How do I find the union and intersection of two sets?

The union A ∪ B contains every element that is in A, in B or in both. The intersection A ∩ B contains only the elements they share. Enter both sets, separated by commas, and the calculator lists both with their sizes.

How do I find the complement of a set?

The complement A′ is every element of the universal set U that is not in A. Enter U (for example 1-10) and the calculator lists A′, B′ and the complement of their union and intersection.

What is the symmetric difference?

A Δ B is the set of elements in exactly one of the two sets, i.e. (A − B) ∪ (B − A). It is like an “exclusive or” for sets.

Can it draw a Venn diagram with three sets?

Yes. Fill in Set C and the diagram switches to three overlapping circles, with every region’s elements and counts.

What is a power set?

The power set P(A) is the set of all subsets of A, including the empty set and A itself. A set with n elements has 2ⁿ subsets, so the calculator lists them in full for sets of up to 6 elements.

Related tools

Free educational tool by HawkInc. Results are calculated in your browser and rounded for display; check critical work by hand or with a second method.