How to use Set Calculator
- Enter one item per line for A and B, or use a brace list such as {red, green, blue}. An unbraced comma stays inside one item; use lines for items that contain commas.
- Choose Case sensitive or Case insensitive. Items are trimmed and repeated compared items count once.
- Select union, intersection, a directed difference, symmetric difference or Cartesian product. A minus B differs from B minus A; Cartesian pairs keep A’s item first.
- Review the result and region counts. Non-Cartesian modes offer set-venn.svg; Cartesian mode shows two-column pairs and JSON pair lines you can copy.
Example: Set Calculator
Combine two small sets with a repeated input.
Supported inputs and limits
- Up to 500 unique items per set and 100,000 combined input characters.
- Items are trimmed literal strings; blank lines are ignored and numeric strings are not converted to numbers.
- Case-insensitive matching uses lowercase comparison, without a locale-equivalence guarantee.
- Results retain encounter order and a matching item’s first spelling.
- Cartesian output is capped at 10,000 pairs and an estimated 1,000,000 characters; separate columns and JSON pair text keep punctuation unambiguous.
More details
The Venn diagram is available for other operations and reports input-set region counts, with circle areas that do not scale to those counts.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved 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.