Skip to content
ENExplore Calculators

Inclusion Exclusion Principle Calculator

Work out inclusion exclusion principle instantly with clear inputs, formula shown and shareable results.

About Inclusion Exclusion Principle Calculator

Inclusion-exclusion corrects for double counting with alternating signs: add the singles, subtract the pairs, add the triples, and so on. Each element then contributes exactly once to the union.

Formula

Three sets

|A∪B∪C| = Σ|Aᵢ| − Σ|Aᵢ∩Aⱼ| + |A∩B∩C|

Worked example

With the default values below, Inclusion Exclusion Principle Calculator returns Size of the union of 88. Change any input above and every figure here is recalculated in your browser.

Inputs used

Sizes of the sets
50, 40, 30
Pairwise intersection sizes
15, 12, 10
Triple intersection sizeminimum 0
5

Results

Size of the union
88
Sum of the individual sizes
120
Sum of the pairwise overlaps
37
Net overcount removed
32

Step by step

  1. 1Values used
  2. 2Three sets
  3. 3Size of the union= 88
  4. 4Sum of the individual sizes= 120
  5. 5Sum of the pairwise overlaps= 37
  6. 6Net overcount removed= 32

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

With sizes 50, 40, 30, pairs 15, 12, 10 and triple 5?

120 − 37 + 5 = 88 in the union.

Why do signs alternate?

An element in exactly k sets is counted C(k,1) − C(k,2) + C(k,3) − … times, which telescopes to exactly 1.

Inclusion Exclusion Principle Calculator | Calcrivo