Set operations calculator

Perform union (A∪B), intersection (A∩B), and difference (A−B) on any two sets.

Set A Set B Operation

Set operations

Union (A ∪ B): All elements in A or B or both. {1,2,3} ∪ {3,4,5} = {1,2,3,4,5}.

Intersection (A ∩ B): Only elements in both A and B. {1,2,3} ∩ {3,4,5} = {3}.

Difference (A − B): Elements in A but not in B. {1,2,3} − {3,4,5} = {1,2}.

Properties

Union and intersection are commutative: A∪B = B∪A. Difference is NOT: A−B ≠ B−A.

De Morgan's laws: (A∪B)' = A'∩B' and (A∩B)' = A'∪B'.

Popular set problems
Related calculators