Handle two to six sets with flexible inputs. See union, complement, and step signs instantly. Download clean summaries for class notes and project files.
Choose the number of sets, optionally provide a universe size, then enter intersection sizes for each non-empty subset.
| Scenario | Sets | Given Intersections | Computed Union |
|---|---|---|---|
| Three sets | A1, A2, A3 | |A1|=40, |A2|=35, |A3|=30, |A1∩A2|=12, |A1∩A3|=9, |A2∩A3|=8, |A1∩A2∩A3|=4 |
40+35+30 −12−9−8 +4 = 80 |
| Two sets | A1, A2 | |A1|=120, |A2|=90, |A1∩A2|=25 | 120+90 −25 = 185 |
For n sets A1, A2, …, An, the Inclusion-Exclusion Principle gives:
|A1 ∪ A2 ∪ … ∪ An| = Σ |Ai| − Σ |Ai∩Aj| + Σ |Ai∩Aj∩Ak| − … + (−1)^{n+1}|A1∩…∩An|
Signs alternate by intersection order: odd-order terms add, even-order terms subtract.
No. Missing entries are treated as zero. For exact union size, enter all intersection sizes for every non-empty subset.
Single sets add elements, pair intersections remove double-counts, triple intersections add back over-corrections, and the pattern continues by intersection order.
Order is the number of sets in the subset. For example, {1,2,4} has order 3 and uses a plus sign because 3 is odd.
It should not. If it happens, one or more intersection values are inconsistent, or the provided universe size is too small.
You can still compute an approximate union by leaving higher-order intersections blank. Exact results require higher-order overlaps too.
The tool accepts decimals, but set sizes are usually whole counts. If decimals appear, ensure they match your modeling context.
If you enter |U|, the complement is |U| minus the computed union. This represents items not in any of the listed sets.
Mixing up subset labels, forgetting the full intersection term, or typing overlaps larger than a single set are the most frequent issues.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.