Set Operations Calculator

Enter two sets and choose an operation to see the result and a Venn diagram.

Numbers or words separated by commas. Repeats are counted once.

Numbers or words separated by commas. Repeats are counted once.

Only needed for a complement: everything under consideration.

Operation

A complement uses set A and the universal set.

Try

Result

You enteredA={1, 2, 3, 4}, B={3, 4, 5}A = \{1,\ 2,\ 3,\ 4\},\ B = \{3,\ 4,\ 5\}

A△B={1, 2, 5}\displaystyle A \triangle B = \{1,\ 2,\ 5\}

Number of elements

3\displaystyle 3
Show the work
  1. Symmetric difference

    The symmetric difference holds the elements that are in exactly one of the two sets: those only in AA together with those only in BB.

    Using (A∖B)∪(B∖A)(A \setminus B) \cup (B \setminus A)

    (A∖B)∪(B∖A)={1, 2}∪{5}={1, 2, 5}(A \setminus B) \cup (B \setminus A) = \{1,\ 2\} \cup \{5\} = \{1,\ 2,\ 5\}
  2. Result

    So A△B={1, 2, 5}A \triangle B = \{1,\ 2,\ 5\}, a set of 3 elements.

Worked examples