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
Starting local processing
Ready. Processing stays in this browser.
2 Your result
Your result updates in this browser. Check your input if the result looks unexpected.
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.
- Check the example inputs: Total population, Count in A, Count in B, Count in both.
- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.
- 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
Last updated