About the Venn Diagram Calculator
What is the Venn Diagram Calculator?
A Venn diagram shows two overlapping groups as circles inside a rectangle representing everyone (the universal set). It is used in survey questions such as “60 students play cricket, 45 play football and 20 play both — how many play neither?”
Enter the size of each group, the overlap and the total. The calculator fills in all four regions — only A, only B, both and neither — and gives the size and probability of A ∪ B.
How to use the Venn Diagram Calculator
- Number in Set A (sample: 60)
- Number in Set B (sample: 45)
- Number in Both (A ∩ B) — the number in both groups (the overlap). (sample: 20)
- Total in the Universal Set (U) — everyone surveyed or counted (the universal set). (sample: 100)
- Press Calculate Regions (results also refresh as you type). The result card shows the A ∪ B (in A or B), along with Only A, Only B, Both A and B and Neither A nor B.
Formula used
|A ∪ B| = |A| + |B| − |A ∩ B|
- Only A = |A| − |A ∩ B|
- Only B = |B| − |A ∩ B|
- Neither = total − |A ∪ B|
The overlap cannot be larger than either circle, and the total must be at least |A ∪ B|; the calculator checks both.
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| Number in Set A | 60 |
| Number in Set B | 45 |
| Number in Both (A ∩ B) | 20 |
| Total in the Universal Set (U) | 100 |
| Result | Value |
|---|---|
| A ∪ B (in A or B) | 85 |
| Only A | 40 |
| Only B | 25 |
| Both A and B | 20 |
| Neither A nor B | 15 |
| P(A ∪ B) | 85% |
Tips for using the Venn Diagram Calculator
- Always start filling a Venn diagram from the overlap and work outwards.
- Divide any region by the total to turn it into a probability.
