Statistics

Venn Diagram Calculator

Fill in a two-set Venn diagram from the numbers in each set or from lists of elements. The calculator finds every region, the intersection, union and complements, and the probabilities, with the working explained.

ξAB75108

Probabilities

P(A)

2/5

P(B)

1/2

P(A ∩ B)

1/6

P(A ∪ B)

11/15

P(A')

3/5

P(A | B)

1/3

How it works

  1. Start in the middle

    Write 5 in the overlap — these are in both A and B.

    Result:A ∩ B = 5
  2. Only A and only B

    Only A = 12 − 5 = 7. Only B = 15 − 5 = 10.

  3. Outside both circles

    Neither = 30 − (7 + 5 + 10) = 8.

    Result:Neither = 8
  4. Probabilities

    Divide each count by the total 30. P(A ∪ B) = 22/30 = 11/15. For P(A | B), only look inside B: 5/15 = 1/3.

Set notation

n(A∪B)=n(A)+n(B)−n(A∩B)P(A∣B)=n(A∩B)n(B)n(A \cup B) = n(A) + n(B) - n(A \cap B) \qquad P(A \mid B) = \frac{n(A \cap B)}{n(B)}
A ∩ BIntersection — in both A and B
A ∪ BUnion — in A or B or both
A′A'Complement — not in A
ξThe universal set — everything

Example substitution

n(A)=12,  n(B)=15,  n(A∩B)=5⇒n(A∪B)=22n(A) = 12, \; n(B) = 15, \; n(A \cap B) = 5 \Rightarrow n(A \cup B) = 22

Subtract the overlap so it is not counted twice.

Worked examples

30 students: 12 play football, 15 play tennis, 5 play both. Find P(plays at least one).

  1. 1
    Both: 5
  2. 2
    Only football / only tennis: 12 − 5 = 7, 15 − 5 = 10
  3. 3
    Neither: 30 − 22 = 8
  4. 4
    At least one: 7 + 5 + 10 = 22
Answer: 22/30 = 11/15

ξ = {1, …, 10}, A = even numbers, B = multiples of 3. Find A ∩ B and A ∪ B.

  1. 1
    A: {2, 4, 6, 8, 10}
  2. 2
    B: {3, 6, 9}
  3. 3
    In both: {6}
Answer: A ∩ B = {6}, A ∪ B = {2, 3, 4, 6, 8, 9, 10}

Frequently asked questions

How do you fill in a Venn diagram?+

Start in the middle with the number in both sets. Then subtract it from each set total to get "only A" and "only B". Finally, subtract everything from the total to find the number outside both circles.

What do ∩ and ∪ mean?+

A ∩ B (intersection) means in both A and B — the overlap. A ∪ B (union) means in A or B or both — everything inside the circles.

What does A' mean?+

A' (the complement of A) means everything not in A, including the region outside both circles.

How do you find a probability from a Venn diagram?+

Divide the number in the region you want by the total in the universal set ξ. If 5 of 30 people are in both sets, P(A ∩ B) = 5/30 = 1/6.

What is P(A | B)?+

The conditional probability of A given B. Only look inside circle B: P(A | B) = number in A ∩ B ÷ number in B.

Related calculators