Overview
A two-circle Venn diagram splits items into four groups: only A, only B, both, and neither. This fills in those numbers from the size of each set and their overlap.
Enter the size of A, B, their intersection, and the total universe. Enter 0 for the universe if there isn't one.
Worked examples
| Inputs | Result |
|---|---|
| Set a Size120Set B Size95Intersection Size38Universe Size260 | Union: 177A only: 82B only: 57Jaccard similarity: 0.21Overlap coefficient: 0.4P(A ∪ B): 68.08% |
Show 2 more examples
| Set a Size40Set B Size25Intersection Size15Universe Size100 | Union: 50A only: 25B only: 10Jaccard similarity: 0.3Overlap coefficient: 0.6P(A ∪ B): 50% |
| Set a Size300Set B Size300Intersection Size150Universe Size1,000 | Union: 450A only: 150B only: 150Jaccard similarity: 0.33Overlap coefficient: 0.5P(A ∪ B): 45% |
Union by set a size
With the calculator's starting values, the union is 177. The table shows how it changes with the set a size.
| Set a Size | Union |
|---|---|
| 60 | 117 |
| 80 | 137 |
| 100 | 157 |
| 120starting value | 177 |
| 140 | 197 |
| 160 | 217 |
| 180 | 237 |
Other inputs: Set B Size: 95 · Intersection Size: 38 · Universe Size: 260. Change them in the calculator above for your own numbers.
How it works
The union is A plus B minus the overlap, because the overlap would otherwise be counted twice. Only A and only B are each set minus the overlap. Jaccard similarity is the overlap divided by the union, and the overlap coefficient divides it by the smaller set. The last figure is the union's share of the universe.
The formula
| |A ∩ B| | Items in both sets |
| universe | Everything being counted, including items in neither set |
Practical tips
- 120 in A, 95 in B and 38 in both give a union of 177, with 82 only in A and 57 only in B.
- With a universe of 260, 83 items are in neither set.
- The overlap can't be bigger than either set, and the union can't be bigger than the universe.
Frequently asked questions
How do I draw it?
Draw two overlapping circles. Write the overlap in the middle, the 'only' counts in each side and the 'neither' count outside.
What is Jaccard similarity used for?
Comparing how alike two groups are, such as customer lists or sets of words, on a scale of 0 to 1.
Can this handle three sets?
No, it covers two. Three sets need seven regions and more inputs.