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, 3, 4, 5}\displaystyle A \cup B = \{1,\ 2,\ 3,\ 4,\ 5\}

Number of elements

5\displaystyle 5
Show the work
  1. Union

    The union holds every element that is in AA, in BB, or in both, each one written once.

    Using A∪BA \cup B

    A∪B={1, 2, 3, 4}∪{3, 4, 5}={1, 2, 3, 4, 5}A \cup B = \{1,\ 2,\ 3,\ 4\} \cup \{3,\ 4,\ 5\} = \{1,\ 2,\ 3,\ 4,\ 5\}
  2. Result

    So A∪B={1, 2, 3, 4, 5}A \cup B = \{1,\ 2,\ 3,\ 4,\ 5\}, a set of 5 elements.

Worked examples