| Set A | Set B | Options | Union result |
|---|---|---|---|
| 1, 2, 3 | 3, 4, 5 | Trim On Dedupe On Sort None |
1, 2, 3, 4, 5 |
| Apple, apple | APPLE, pear | Case sensitive Off Normalize lower |
apple, pear |
| 9; 2; 10 | 3; 2 | Delimiter Semicolons Numeric ↑ |
2, 3, 9, 10 |
The union of two sets is: A ∪ B = { x | x ∈ A or x ∈ B }.
For counts with two sets: |A ∪ B| = |A| + |B| − |A ∩ B|.
For three sets, the size follows the inclusion–exclusion principle, adding single counts and subtracting overlaps, then adding the triple-overlap.
- Type elements for Set A and Set B (and optionally Set C).
- Choose a delimiter mode if your input is structured.
- Enable trimming to remove accidental leading/trailing spaces.
- Decide whether case should matter (Apple vs apple).
- Select a sorting mode if you need ordered output.
- Press Submit to see the union above the form.
- Use CSV or PDF buttons to export your results.
Input normalization and data integrity
Clean parsing reduces errors caused by inconsistent separators. Auto mode accepts commas, semicolons, new lines, and repeated spaces. Trimming removes stray whitespace so “3” and “ 3 ” match. When case-insensitive mode is enabled, Apple, APPLE, and apple converge to one value, lowering duplicate noise.
Union output and verification metrics
The union is the unique merge of all selected sets. This page reports |A|, |B|, optional |C|, and |Union|. For two sets, it also computes |A ∪ B| = |A| + |B| − |A ∩ B|, giving a fast cross-check that highlights unexpected overlaps or parsing mistakes.
Operational scale and performance notes
For typical classroom and analyst workloads (10–5,000 elements per set), processing remains responsive because uniqueness checks run in linear time using hash lookups. Sorting is optional; “Keep order” preserves the first appearance of each element, while numeric sorting is useful for ID lists and measurement series.
Data export for reporting workflows
CSV export provides a simple index,element structure for spreadsheets and downstream scripts. PDF export produces a paginated list with counts, suitable for attachments and audit notes. Exports reflect the final union after deduplication and optional sorting, ensuring consistency with on-screen results.
Visualization for quick interpretation
The included chart summarizes element counts across inputs and results. Bars display |A|, |B|, |C|, and |Union|, while the overlap bar (|A ∩ B|) helps explain why union size can be smaller than |A| + |B|. Visual cues speed reviews during QA and tutoring sessions.
Recommended validation practices
Start with delimiter Auto, Trim On, and Deduplicate On. Toggle Case Sensitive depending on your domain: names and codes often require strict case, while categories may not. If union size looks off, enable “Show steps” to inspect parsed, unique, and merged stages before exporting. For multi-set work, add Set C to model three cohorts such as {North, South, East}. Expect union growth to slow as overlap rises; in many real lists, 20–40% of elements repeat across sources. Use numeric sorting only when every element is numeric; mixed strings like “10a” should stay in natural order. If you must preserve original formatting, disable case normalization and trimming, then rely on the step table to spot variants before exporting for review.
1) Why is the union smaller than |A| + |B|?
Because overlapping items are counted once. The overlap is |A ∩ B|, so |A ∪ B| equals |A| + |B| minus the overlap when using two sets.
2) When should I disable “Deduplicate each set first”?
Disable it if you want to inspect repeated entries inside each set during step review. The final union is still unique, but earlier stages will preserve within-set duplicates.
3) What delimiter should I pick?
Use Auto for mixed inputs. Choose Commas or Semicolons for structured copy‑paste from documents. Use New lines for lists copied from columns or bullet points.
4) How does case sensitivity affect results?
If enabled, “A” and “a” are different elements. If disabled, values normalize to lower or upper so they match, which typically reduces duplicates in text categories.
5) Why does numeric sorting change the order?
Numeric sorting converts each element to a number for comparison, so “10” correctly follows “9”. If your list contains letters, prefer natural ordering to avoid unintended casts.
6) What do CSV and PDF exports include?
Both exports include the final union list as displayed. CSV adds an index column for spreadsheets, while PDF adds a header and paginates long outputs for sharing.