Files never leave your device

Two-set Venn calculator

Calculate the four regions of a two-set Venn diagram from totals and an overlap. Your inputs stay on your device.

Set up your task

Ready. Processing stays in this browser.

How to use Two-set Venn calculator

Calculate the four regions of a two-set Venn diagram from totals and an overlap. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

  1. Check the example inputs: Total population, Count in A, Count in B, Count in both.
  2. Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.
  3. Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

Supported inputs and limits

Use whole-number counts. The overlap must fit both groups, and the union must fit the total population.

How it works

Counts for A and B both include their shared members. Adding the two totals counts the overlap twice, so subtracting it once gives the size of the union. From that union, subtract from the population to find people or items outside both groups.

The four region counts are separate categories. Adding their sizes should give the original population. A negative region indicates incompatible assumptions, either because the overlap exceeds a group total or because it is too small to fit the groups in the stated universe.

Example

Run the pre-filled example. Its first result is “Either set: 44”.

Total population
60
Count in A
30
Count in B
24
Count in both
10
Either set: 44
A only: 20 · B only: 14
Both: 10 · Neither: 16
Inclusion–exclusion: 30 + 24 − 10 = 44

Questions about Two-set Venn calculator

Can I enter three sets?

The four outputs describe two sets only. A three-set calculation needs all relevant pairwise overlaps and the triple overlap.

What happens when the overlap is zero?

The sets are disjoint. Their union is the sum of the individual counts, provided it fits in the total population.

Keep the example totals and set the overlap to 30.

The count is rejected. The overlap cannot exceed 24 because B has only 24 members, even though A is larger.

Related tools

Year 1: Foundations

Last updated