SOLVETUTORMATH SOLVER

Instrument MI-07-190 · Statistics

Venn Diagram Calculator

A Venn diagram makes set overlap visual, but the numbers behind the picture are simple arithmetic — this calculator does that arithmetic directly from the three counts a two-circle diagram needs.

Instrument MI-07-190
Sheet 1 OF 1
Rev A
Verified
Type 07 — Data Visualization SER. 2026-07190

|A ∪ B| — union

40.0000

|A union B| = |A| + |B| - |A intersect B|

20.0000 Only in A
10.0000 Only in B
The working Every figure verified twice
  1. union = 30 + 20 − 10 = 40.0000
  2. onlyA = 30 − 10 = 20.0000
  3. onlyB = 20 − 10 = 10.0000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

A two-set Venn diagram uses two overlapping circles to show how two groups relate: the region where the circles overlap represents items that belong to BOTH sets, while the non-overlapping parts of each circle represent items that belong to only that one set. Once you know the size of set A, the size of set B, and the size of their overlap (the intersection, A ∩ B), every other region of the diagram follows from simple arithmetic.

The union, A ∪ B — everything in A or B or both — is NOT simply the size of A plus the size of B, because that would double-count everything sitting in the overlap. The correct formula subtracts the overlap back out once: |A ∪ B| = |A| + |B| − |A ∩ B|. The two 'only' regions are even simpler: only A is just |A| with the overlap removed (|A| − |A ∩ B|), and only B is |B| with the overlap removed (|B| − |A ∩ B|).

This arithmetic shows up constantly outside of math class too — customers who bought product X or product Y (or both), survey respondents who answered yes to either of two questions, students enrolled in one course, another, or both. Any time you have two possibly-overlapping groups and know (or can count) how many items fall in each and in their overlap, this is the exact calculation that fills in the rest of the picture.

AB=A+BAB|A \cup B| = |A| + |B| - |A \cap B|
|A|, |B| — the total sizes of sets A and B · |A ∩ B| — the size of their overlap (intersection) · |A ∪ B| — the union, everything in A or B or both · only A / only B — the parts of each set that don't overlap with the other.
  • Enter the total size of the first set into |A| — size of set A.
  • Enter the total size of the second set into |B| — size of set B.
  • Enter how many items belong to both sets into |A ∩ B| — size of the overlap — this can't exceed the smaller of |A| and |B|.
  • Read |A ∪ B| — union for the total number of items in either set (or both), and Only in A / Only in B for the counts unique to each set.

Worked example — |A|=30, |B|=20, overlap=10

Enter 30 into |A| — size of set A, 20 into |B| — size of set B, and 10 into |A ∩ B| — size of the overlap. The instrument first adds the two set sizes and subtracts the overlap once: 30 + 20 − 10.

|A ∪ B| — union reads 40.0000 — the total number of items in A, in B, or in both, counted without double-counting the overlap. Only in A reads 20.0000 (30 − 10) and Only in B reads 10.0000 (20 − 10) — together, 20 (only A) + 10 (only B) + 10 (the overlap) adds back up to the union of 40, confirming the arithmetic accounts for every item exactly once.

Questions

Why isn't the union just |A| plus |B|?

Because simply adding |A| and |B| would count every item in the overlap twice — once as part of A, once as part of B. Subtracting the overlap, |A ∩ B|, exactly once corrects for that double-count, leaving the true total number of distinct items that belong to A, to B, or to both. This is sometimes called the inclusion-exclusion principle, and it's the foundation this entire calculation rests on.

What does it mean if the overlap equals the smaller set's full size?

It means the smaller set is entirely contained within the larger one — every item in the smaller set is also in the larger set, so 'only' the smaller set is empty (its exclusive region has zero items), and the union simply equals the size of the larger set. The calculator's built-in check prevents entering an overlap larger than the smaller set's own size, since that would be logically impossible — a set can't overlap with another set by more than its own total size.

What if the overlap is zero?

That means the two sets are disjoint — they share no items at all. In that case, only A equals the full size of A, only B equals the full size of B, and the union is simply |A| + |B| with nothing to subtract, since there's no double-counted region to correct for.

Can this calculator handle three or more overlapping sets?

No — this is specifically the two-set case, matching the classic two-circle Venn diagram. Three-set diagrams introduce additional regions (each pairwise overlap plus the triple overlap where all three sets meet) and require a more elaborate version of the inclusion-exclusion formula, which isn't what this particular calculator computes.

References