Skip to content
MyDailyTool

List Set Operations

Perform set operations on two lists: union, intersection, difference, A-only, B-only, and symmetric difference. Paste two lists and choose the operation — results update instantly.

A ∪ B (Union)
6
A ∩ B (Intersection)
2
A − B (only in A)
2
B − A (only in B)
2
A △ B (symmetric)
4

How to use the list set operations

Paste two lists, one item per line. The five common set results compute simultaneously: union, intersection, A only, B only, and symmetric difference.

Formula & explanation

Order is preserved from the first occurrence; duplicates within a list are collapsed in the output.

Examples

A: apple, banana, cherry, date. B: banana, cherry, elderberry. Intersection: banana, cherry. A−B: apple, date.

Frequently asked questions

What is the difference between intersection and union of two lists?
The intersection contains only items present in both lists; the union contains all items from either list with no duplicates.
What is symmetric difference?
Symmetric difference (A △ B) contains items that appear in either list but not both — the opposite of intersection.
Does the tool handle case-insensitive comparison?
Yes — uncheck 'Case sensitive' and 'Apple' and 'apple' will be treated as the same item.
Are duplicates within a single list removed?
Yes, each output set collapses duplicates so you get clean, unique results even if your original list had repeated entries.

Related list tools tools