Boneyard Tools

Set Operations Calculator

Enter two sets and get every common operation at once: union, intersection, difference, and symmetric difference, plus subset, superset, and disjoint checks. Elements can be separated by commas, spaces, or new lines, and results update as you type.

How to calculate set operations

  1. Type the elements of Set A, separated by commas, spaces, or new lines.
  2. Type the elements of Set B the same way.
  3. Read each result panel and copy the union, intersection, or difference you need.

Examples

Two number sets

A = 1, 2, 3 and B = 2, 3, 4
Union {1, 2, 3, 4}, Intersection {2, 3}, A minus B {1}

Word sets

A = apple, banana and B = banana, cherry
Union {apple, banana, cherry}, Intersection {banana}

Frequently asked questions

What is the difference between union and intersection?

The union is every element that appears in either set, with duplicates removed. The intersection is only the elements that appear in both sets at the same time.

What does the difference (A minus B) mean?

The difference A minus B keeps the elements that are in Set A but not in Set B. It is not symmetric, so A minus B and B minus A usually give different results.

What is the symmetric difference?

The symmetric difference is everything that is in exactly one of the two sets. It equals the union with the shared (intersection) elements removed.

How do subset, superset, and disjoint work here?

Set A is a subset of B when every element of A is also in B, and a superset when every element of B is in A. Two sets are disjoint when they share no elements. The empty set is a subset of, and disjoint from, every set.

How are elements ordered and deduplicated?

Repeated elements are collapsed to one, since a set holds each value only once. Results sort numerically when every element is a number, so 10 comes after 2, and sort alphabetically otherwise.

Are my sets private?

Yes. Every calculation runs in your browser. Nothing you type is uploaded to a server or stored.

Related tools