Skip to content

Inclusion-Exclusion Principle

Definition

Let AA and BB be events. The inclusion-exclusion principle for two events states that

P(A∪B)=P(A)+P(B)−P(A∩B).\mathbb{P}(A\cup B)=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\cap B).

Interpretation

The probability that AA or BB occurs is not simply P(A)+P(B)\mathbb{P}(A)+\mathbb{P}(B) when the events overlap: the outcomes in both are counted twice, so the overlap is subtracted once. Inclusion-exclusion is this correction for double counting.

Three overlapping discs A, B and C inside the sample space, with the overlap regions labelled by how often they are counted: twice where two discs meet and three times in the centre.

The labels show how many times each region is counted by P(A)+P(B)+P(C)\mathbb{P}(A)+\mathbb{P}(B)+\mathbb{P}(C). Subtracting the three pairwise intersections makes the regions labelled 2×2\times count once, but the centre lies in all three pairwise intersections and is now counted 3−3=03-3=0 times, so the triple intersection is added back. This gives

P(A∪B∪C)=P(A)+P(B)+P(C)−P(A∩B)−P(A∩C)−P(B∩C)+P(A∩B∩C).\mathbb{P}(A\cup B\cup C) =\mathbb{P}(A)+\mathbb{P}(B)+\mathbb{P}(C) -\mathbb{P}(A\cap B)-\mathbb{P}(A\cap C) -\mathbb{P}(B\cap C)+\mathbb{P}(A\cap B\cap C).
P(A∪B∪C)=P(A)+P(B)+P(C)−P(A∩B)−P(A∩C)−P(B∩C)+P(A∩B∩C).\begin{aligned} &\mathbb{P}(A\cup B\cup C)\\ &=\mathbb{P}(A)+\mathbb{P}(B)+\mathbb{P}(C)\\ &\quad-\mathbb{P}(A\cap B)-\mathbb{P}(A\cap C)\\ &\quad-\mathbb{P}(B\cap C)+\mathbb{P}(A\cap B\cap C). \end{aligned}

The two-event formula follows from additivity of the probability function on disjoint pieces: A∪BA\cup B is the disjoint union of AA and the part of BB outside AA, and P(B)\mathbb{P}(B) is the probability of that part plus P(A∩B)\mathbb{P}(A\cap B). For disjoint events the correction term is zero and the ordinary addition rule remains. In general P(A∪B)≤P(A)+P(B)\mathbb{P}(A\cup B)\le\mathbb{P}(A)+\mathbb{P}(B).

For a heart or a face card from a standard deck, 1352+1252−352=2252=1126\tfrac{13}{52}+\tfrac{12}{52}-\tfrac{3}{52}=\tfrac{22}{52}=\tfrac{11}{26}; the three heart face cards would otherwise be counted twice. The same formula counts elements of finite sets, ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A\cup B|=|A|+|B|-|A\cap B|. For more events the signs keep alternating: subtract all pairwise intersections, add all triple ones, subtract all quadruple ones, and so on. A common slip is to stop after the pairwise terms.


Key Results

  • For two events, inclusion-exclusion subtracts the overlap once.
  • For three events, the triple overlap must be added back after pairwise overlaps are subtracted.
  • The principle works for both counting and probability.

Examples

  • To count students taking mathematics or statistics, add both course counts and subtract students taking both.
  • In card problems, the probability of drawing a heart or a face card requires subtracting heart face cards once.
  • To compute the chance of at least one of several alarms sounding, inclusion-exclusion adjusts for simultaneous alarms.

Prerequisites

Sources

Aliases: principle of inclusion and exclusion, inclusion-exclusion formula, general addition rule, sieve formula Keywords: addition rule Symbols: intersection, union

Last updated: 20 October 2026 03:02