Set Calculator

Compare literal line-based sets with union, intersection, differences or a bounded Cartesian product.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Calculate set operation controls

Showing an example. Edit to see your own.

One literal item per line. Blank lines are ignored.

Processed in your browser. Your inputs stay on this device.

How to use Set Calculator

  1. Enter one set item per line on each side.
  2. Choose whether comparison is case sensitive.
  3. Select the set operation.
  4. Review the unique items or ordered pairs and export the result.

Example: Set Calculator

Combine two small sets with a repeated input.

You add
Set A: A,B,B on separate lines. Set B: B,C. Operation: union; case sensitive.
You get
The union contains A, B and C once each, in stable input order.

Supported inputs and limits

Up to 500 unique items per set and 100,000 total input characters. Items are trimmed literal strings; blank lines are not items. Case handling follows the selected policy, with no numeric coercion or locale-specific equivalence promise. Cartesian output is capped at 10,000 ordered pairs. Results retain the documented encounter order. Results are also capped at 1,000,000 characters before pair expansion. Cartesian results use separate table columns and JSON pairs so punctuation inside an item stays unambiguous.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Questions about Set Calculator

Is 001 treated as the number 1?

No. Set items are strings. 001 and 1 remain different unless you change the source yourself.

Are duplicate lines counted more than once?

No. A set contains each compared item once. The retained spelling and order follow the selected case policy and encounter order.

What is the difference between A minus B and symmetric difference?

A minus B keeps items only in A. Symmetric difference keeps items found in exactly one of the two sets.

Project manager: Tony Hines · Content updated 2 October 2026 · Report a problem