How to calculate
The union contains every element found in either set. The intersection contains elements common to both. A set difference keeps only items unique to the selected side.
Worked example
Use Set A apple, pear · Set B pear, peach. The result is Union 3 · Intersection 1.
Input and result notes
Separate elements with commas or new lines. Duplicate values count once. Matching is case sensitive.
MIT Mathematics for Computer Science