Venn diagram calculator, formula and probability

Type the totals from your question. The calculator solves every region it can, shows the probabilities and flags numbers that can’t all be true.

Loading the calculator…

Venn diagram probability

Once every region has a count, probabilities are fractions of the total:

  • P(A) = n(A) ÷ n(U)
  • P(A ∩ B) = n(A ∩ B) ÷ n(U), the chance of both
  • P(A ∪ B) = P(A) + P(B) − P(A ∩ B), the addition rule
  • P(A | B) = n(A ∩ B) ÷ n(B), the chance of A given you already know B

A and B are mutually exclusive if the circles don’t overlap (P(A ∩ B) = 0), and independent if P(A ∩ B) = P(A) × P(B).

Worked example

40 people: 22 like tea (A), 15 like coffee (B), 7 like both.

  1. Both: 7
  2. Tea only: 22 − 7 = 15
  3. Coffee only: 15 − 7 = 8
  4. Neither: 40 − (15 + 7 + 8) = 10

P(tea only) = 15/40 = 0.375. P(tea | coffee) = 7/15 ≈ 0.467.

Want more like this? Practice Venn diagram questions with worked answers.

Questions people ask

What is the Venn diagram formula for two sets?

n(A ∪ B) = n(A) + n(B) − n(A ∩ B). The overlap is subtracted once because adding n(A) and n(B) counts it twice.

What is the formula for three sets?

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(A ∩ C) − n(B ∩ C) + n(A ∩ B ∩ C). This is the inclusion–exclusion principle.

How do you find probability from a Venn diagram?

Divide the count in the region you want by the total in the universal set. For example, if 11 of 30 students are in “French only”, P(French only) = 11/30 ≈ 0.367. For conditional probability P(A | B), divide n(A ∩ B) by n(B).

How do you solve a Venn diagram word problem?

Put the number for the innermost overlap in first, then subtract outwards: each “exactly two” region is the pair total minus the centre, each “only” region is the set total minus everything else inside that circle, and “neither” is the total minus the union.

Why does the calculator say “need more info”?

Some combinations of totals don’t pin down every region. For example, n(A) and n(B) alone can’t tell you how big the overlap is. Add the overlap, the union, or the total and “neither”.