Quick guide
How to use this calculator
- Choose two or three sets.
- Enter each set size and every required intersection size.
- Read the size of the union after overlap is corrected.
Calculation method
Subtract duplicate counts and restore triple overlap
For two sets, |A∪B|=|A|+|B|−|A∩B|. With three sets, subtract all pairwise intersections and add the triple intersection once.
Worked example
Two overlapping groups
If 20 people are in A, 15 in B, and 5 in both, 30 are in at least one group.
20+15−5 = 30
Supported inputs
Precision and limits
Discrete domain
Inputs are whole counts. Negative, fractional, grouped, and scientific-notation inputs are rejected.
Exact integers
Results use arbitrary-precision integers and are never rounded. Inputs and output size are bounded to keep the page responsive.
Consistency
Impossible intersection sizes are rejected instead of producing a misleading union.
