Visualize set relationships with 2 or 3 sets. Compute union, intersection, difference, symmetric difference, and detailed region elements. Ideal for students, teachers, and data enthusiasts.
Introduced by John Venn in 1880, the Venn diagram is a cornerstone of logic, probability, and data science. It visually represents mathematical or logical sets as overlapping circles, where each circle's area corresponds to a set's magnitude, and overlaps show intersections. Our calculator goes beyond static sketches: it uses area-proportional scaling so the geometric overlap accurately reflects the cardinality of |A∩B| relative to the sizes of A and B.
For any two finite sets A and B, the fundamental relation:
|A ∪ B| = |A| + |B| – |A ∩ B|.
Jaccard Index: J(A,B) = |A ∩ B| / |A ∪ B| (measures similarity).
Unlike generic Venn generators, this tool applies a numerical optimization to set circle radii proportional to √|A| and √|B|, then finds the exact distance between centers so that the overlapping area matches the expected ratio (|A∩B|/|A| * πR²). The overlapping area of two circles is derived via circular segment geometry. Using a robust binary search, we achieve a precise visual match — helping learners intuitively grasp set relationships.
| Scenario | |A| | |B| | |A∩B| | Union | Jaccard | Interpretation |
|---|---|---|---|---|---|---|
| Overlapping markets | 150 | 120 | 45 | 225 | 0.200 | Moderate overlap; cross-selling potential |
| Disjoint sets | 30 | 40 | 0 | 70 | 0.000 | No common elements; mutually exclusive |
| Subset (B ⊆ A) | 25 | 12 | 12 | 25 | 0.480 | B completely contained in A |
| Equal sets | 42 | 42 | 42 | 42 | 1.000 | Identical sets, perfect similarity |
A digital agency runs two ad campaigns: Campaign A (display ads) reaches 340 users, Campaign B (search ads) reaches 280 users. The intersection (users exposed to both) is 95. Using this Venn calculator, the marketer finds A-only = 245, B-only = 185, total unique reach = 525. The Jaccard similarity 0.181 indicates low overlap — campaigns target distinct audiences, justifying separate budgets. Conditional probability P(A|B)=0.339 means a user from B has 34% chance to be in A. These insights guide retargeting strategies.