StatisticsCALCULATOR LAB
PROBABILITY & DISTRIBUTIONS

Venn Diagram Calculator

Create a Venn diagram for two or three sets. Enter set totals and overlaps, or paste element lists, to calculate each region, unions, intersections and probabilities when the total is known.

01 / YOUR INPUTSCalculated in your browser

Explore sets and their overlaps

Try an example:

Choose two or three sets, then enter totals, individual elements or exclusive region counts.

Set display labels (optional)

Symbols A, B and C stay unchanged in formulas and expressions.

Counts: whole numbers up to 1,000,000,000,000 per field. Lists: up to 2,000 distinct items, 100 characters per item and 50,000 characters per list.

02 / YOUR RESULT

See your sets and regions

Enter your data, or try an example.
Your diagram and calculation will appear here.

How to use this calculator

  1. Choose whether your problem contains two or three sets.
  2. Select set totals, individual elements or exclusive region counts as your input method.
  3. Enter your known values. Pairwise intersections include elements shared with the third set unless the field says “only.”
  4. Calculate to view the Venn diagram, region counts and supported probabilities. Select a set operation to highlight the matching regions.

Formula & assumptions

Two-set union

|A ∪ B| = |A| + |B| − |A ∩ B|

Three-set union

|A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|

|A|
Number of elements in set A
∪ / ∩
Union / intersection
U
Universal set containing every outcome under consideration
  • A union includes elements in at least one specified set.
  • An intersection contains elements shared by the specified sets.
  • Inclusive pairwise intersections include the triple intersection.
  • Each exclusive Venn region is counted exactly once.
  • Counts must be nonnegative integers.
  • U is needed for the number outside the sets and complements relative to the complete universe.
  • The diagram is schematic, not area-proportional.

Sources

Reviewed: October 2026

A QUICK WALKTHROUGH

Worked example: three sets

This example uses sample values, not your current inputs.

Suppose 100 students were surveyed about three subjects, A, B and C. Some students selected more than one subject.

|U| = 100; |A| = 52; |B| = 48; |C| = 40; |A ∩ B| = 22; |A ∩ C| = 16; |B ∩ C| = 14; |A ∩ B ∩ C| = 6.

Union
94
Exactly one
54
Exactly two
34
All three
6
None
6
P(at least one)
94%
Exclusive regions in the sample survey
RegionCount
A only20
B only18
C only16
A ∩ B only16
A ∩ C only10
B ∩ C only8
All three6
None6

94 of the 100 students selected at least one subject. Six selected none.

Example calculation
  1. |A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|.
  2. All three = 6 = 6.
  3. B ∩ C only = 14 − 6 = 8.
  4. A ∩ C only = 16 − 6 = 10.
  5. C only = 40 − 10 − 8 − 6 = 16.
  6. A ∩ B only = 22 − 6 = 16.
  7. B only = 48 − 16 − 8 − 6 = 18.
  8. A only = 52 − 16 − 10 − 6 = 20.
  9. Union = 52 + 48 + 40 − 22 − 16 − 14 + 6 = 94.
  10. Union (at least one set) = 20 + 18 + 16 + 16 + 10 + 8 + 6 = 94.
  11. Exactly one set = 54; exactly two sets = 34.
  12. None = |U| − union = 100 − 94 = 6.
  13. Probabilities use P(E) = |E| / |U|, interpreting the counted elementary outcomes as equally likely.

Understanding Venn diagrams

A Venn diagram shows how sets relate to one another. Each circle represents a set, overlapping areas show shared elements, and the rectangle represents the universal set. A two-set diagram has four possible regions, while a three-set diagram has eight, including the area outside all circles.

Union vs. intersection

The union A ∪ B contains everything in A, B or both. The intersection A ∩ B contains only elements belonging to both sets. To count a union, subtract the overlap so shared elements are not counted twice.

Venn diagrams and probability

When the universal set contains equally likely outcomes, the probability of an event is its region count divided by the total number of outcomes. For example, if 60 of 80 outcomes belong to A ∪ B, then P(A ∪ B) = 60/80 = 0.75, or 75%.

Venn diagram vs. Euler diagram

A Venn diagram displays every possible membership region, even when a region contains no elements. An Euler diagram shows the relationships that actually occur and may omit empty regions.

Common questions

What is a Venn diagram?

A Venn diagram uses overlapping circles to illustrate relationships between sets. The overlapping regions show elements shared by multiple sets, while the nonoverlapping regions show elements that belong to particular sets only.

How do you calculate the union of two sets?

Add the number of elements in A and B, then subtract the elements counted in both: |A ∪ B| = |A| + |B| − |A ∩ B|. For example, if A has 40 elements, B has 30 and their intersection contains 10, the union contains 60 elements.

What is the difference between union and intersection?

A union includes elements belonging to at least one of the selected sets. An intersection contains elements that belong to every selected set. The symbols are ∪ for union and ∩ for intersection.

How do you calculate a three-set Venn diagram?

Start with the triple intersection. Subtract it from each inclusive pairwise intersection to find the pair-only regions. Then subtract the appropriate overlapping regions from each individual set total. Add the seven exclusive regions to obtain the union.

What does A and B only mean in a three-set Venn diagram?

It means elements belonging to both A and B but not to C. Its count is |A ∩ B| − |A ∩ B ∩ C|.

What is the complement of a set?

The complement of A contains the elements in the universal set U that are not in A. If U is known, its count is |U| − |A|. Without a defined universe, the total number of elements outside A cannot generally be determined.

How do I calculate the probability of A or B?

Divide the union count by the number of equally likely outcomes in the universal set: P(A ∪ B) = |A ∪ B| / |U|. Equivalently, P(A ∪ B) = P(A) + P(B) − P(A ∩ B).

Can I enter lists of elements instead of counts?

Yes. Choose Individual elements and enter the members of each set. The calculator removes duplicates within each set and determines the union, intersections and exclusive regions from set membership.

What happens if the set counts are inconsistent?

The calculator reports an error rather than producing an impossible diagram. For example, an intersection cannot contain more elements than either set, and no exclusive region may have a negative count.

Do the circles have to be proportional to the set sizes?

No. A standard Venn diagram represents logical membership, not geometric area. The displayed circles are schematic; the calculated region values and tables provide the exact quantities.

Can two sets have no elements in common?

Yes. Such sets are disjoint and their intersection is empty. In a complete Venn diagram the intersection region still exists conceptually, but its count is zero.

Is a Venn diagram the same as an Euler diagram?

No. A Venn diagram includes all possible membership regions, including empty ones. An Euler diagram can omit regions that do not occur in the represented sets.

Use these tools for mathematical information, not as a substitute for checking assumptions. Read our methodology or disclaimer.