Report

Help us improve this tool

List Difference Calculator

Compare two lists to find unique items in list A, unique items in list B, common items, symmetric differences, and union lists.

O M T

Comparing Two Lists Online

When working with databases, email lists, spreadsheets, or code variables, you often need to compare two lists to see how they differ. Performing list comparison manually is tedious and leads to formatting issues. An online list difference calculator automatically computes the differences, intersections, and unions in real time.

Set Operations Explained

The tool processes lists using standard mathematical set operations:

  • Only in List A (Difference $A - B$): Items that exist in List A but do not exist in List B.
  • Only in List B (Difference $B - A$): Items that exist in List B but do not exist in List A.
  • In Both Lists (Intersection $A \cap B$): Common items that are present in both List A and List B.
  • Symmetric Difference ($A \Delta B$): Items that are unique to either list (present in A or B, but not both).
  • Union ($A \cup B$): All unique items combined from both lists.

How to Calculate List Differences

  1. Enter Lists: Paste your items into the List A and List B inputs.
  2. Configure Toggles: Select whether to enforce case-sensitivity, ignore trailing whitespace, or deduplicate inputs.
  3. Switch Tabs: Toggle between set views to inspect unique items, common items, or unions.
  4. Copy/Download: Use the action buttons to copy the computed subset to your clipboard or download as a text file.

Frequently Asked Questions

What is the Difference between List A and List B?

The difference contains all items from List A that are missing in List B. This is useful for identifying new items or filtering out existing records.

What does Symmetric Difference mean?

Symmetric difference compiles all items that are present in only one of the two lists. It excludes any items that are common to both lists.

Can I compare lists with mixed casing?

Yes. By default, the comparison is case-insensitive. If you need case-sensitive matching, check the "Case Sensitive" toggle.

Are duplicate values in inputs removed?

Yes. By checking the "Deduplicate Inputs" toggle, the tool automatically collapses duplicates in both input lists before executing the comparison.