List Difference (A − B)

Calculate the set difference between two lists. Find items in List A that don't appear in List B. Free online tool, client-side processing.

Everything runs in your browser — your data is never sent to any server.

Why Use the List Difference Tool?

Set difference is essential for identifying missing items, tracking changes, or finding elements present in one dataset but absent from another. Our List Difference Tool computes A minus B — all items in List A that are not in List B — instantly and accurately.

Key Features

  • Compute set difference A − B with deduplicated results
  • Clear labeling of source and subtraction lists
  • Item count statistics for both input lists
  • One-click copy of difference results

How to Use

  1. Enter items in List A (the source list)
  2. Enter items in List B (items to subtract)
  3. View items that exist in A but not in B

Technical Details

The set difference A − B is computed using JavaScript Set for O(1) lookup of List B items. Each item from List A is checked against the Set of List B items. Only items not found in B are included in the result, with duplicates automatically removed. Time complexity is O(n+m).

FAQ

What is the difference between this and the Intersection tool?

The Intersection tool finds items common to both lists. The Difference tool finds items in A that are NOT in B. They are complementary operations.

Does order matter? What if I swap A and B?

Yes, order matters. A − B gives different results than B − A. If you need items in B but not A, simply swap the lists.

Related tools