Inclusion-Exclusion Principle Calculator
Choose two or three sets and enter the sizes of the sets and their overlaps.
How many elements A has.
How many elements B has.
The size of the overlap of A and B.
Try
Result
You entered
Only in A
Only in B
In both
Show the work
Inclusion–exclusion for two sets
Adding and counts everything in both sets twice, so take away the size of the overlap once.
Result
So there are elements in or or both.