Audited ·Last updated 31 Jul 2026·6 citations·Tier 1·0 uses

Venn Diagram Calculator

Paste two or three lists and get every Venn region: union, intersection, what is in only one set, and what falls outside all of them.

Venn Diagram Calculator

How many sets?
Separate elements with commas, semicolons or new lines. Braces are optional. Type {} for the empty set. Duplicates are collapsed.
The second circle. Elements shared with A land in the overlap region.
Only used when you choose 3 sets above. In 2-set mode this box is ignored completely.
Every element under consideration, including ones in none of the circles. Leave blank and the universe is taken to be exactly A ∪ B ∪ C, so nothing falls outside. Must contain every element you used in A, B and C.
In at least one set
10
|A ∪ B| in 2-set mode, |A ∪ B ∪ C| in 3-set mode. Every element that appears anywhere inside the circles, counted once.
In every set
1
In A only
3
In B only
1
In C only
2
In exactly one set
6
In exactly two sets
3
In none of them
0
Union members
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Intersection members
{6}
Exclusive regions
A only: {1, 2, 3} · B only: {8} · C only: {9, 10}
Every region at a glance
A only 3 · B only 1 · C only 2 · exactly two 3 · all three 1 · union 10 · outside 0

Background.

A Venn diagram calculator takes two or three lists and sorts every element into the region of the diagram where it belongs. Paste A = 1, 2, 3, 4, 5, 6 and B = 4, 5, 6, 7, 8 and C = 6, 7, 9, 10, and it reports that ten distinct elements appear somewhere, that only the element 6 sits in the centre where all three circles overlap, that three elements belong to A alone, one to B alone and two to C alone, and that three more sit in a two-way overlap. Those are the eight regions of a three-circle diagram, and getting them right by eye is exactly the sort of task people reliably fumble when the lists get past about a dozen entries.

In two-set mode the page is the complete set-algebra toolkit for a pair of lists. The union A ∪ B is everything that appears in either. The intersection A ∩ B is everything appearing in both. A only is the set difference A \ B, B only is B \ A, and the two crescents together are the symmetric difference A △ B. Every one of those is reported as a count and, where it helps, as an actual listing of the elements, so you can see which items are in the overlap rather than just how many there are. Choosing three sets swaps in the eight-region breakdown without changing anything about how the inputs work.

The optional universe box is what turns a diagram into a survey answer. Textbook problems almost always end with 'how many took neither', and that question is unanswerable from the two lists alone — you need to know how many people were in the room. Fill in the universe with every element under consideration and the calculator reports the outside region as |U| minus the size of the union. Leave it blank and the outside region is reported as zero, which is the honest answer: with no universe supplied, nothing is known to be outside. The calculator will not invent one. It does insist that a supplied universe actually contains everything you used in A, B and C, and names the offending element if it does not, because a universe that omits an element you have already placed inside a circle is a data-entry error rather than a legitimate configuration.

The arithmetic behind the counts is the principle of inclusion–exclusion, and the calculator's numbers can always be checked against it by hand. For two sets, |A ∪ B| = |A| + |B| − |A ∩ B|: add the sizes, then subtract the overlap once because adding both sizes counted it twice. For three sets the pattern continues — add the three sizes, subtract the three pairwise overlaps, then add the triple overlap back, because subtracting all three pairs removed the centre one time too many. On the worked example that reads 6 + 5 + 4 − 3 − 1 − 2 + 1 = 10, which is precisely the union size the page returns. A second, cleaner check is available too: the exclusive, two-way and three-way regions are disjoint and together they are the union, so 6 + 3 + 1 = 10 as well.

Element matching is exact text after trimming surrounding whitespace, which matters more than it sounds. It means 1 and 1.0 are two different elements and cat and Cat are two different elements, so a list of product codes or names compares the way you would expect rather than being silently normalised. It also means you can use anything at all as an element — words, phrases, coordinates, SKUs — not just numbers. Duplicates within a single list are collapsed, because a set holds each element once, and the order you type things in never changes a count; it only fixes the order the members are printed back in, which is first appearance scanning A, then B, then C.

The practical uses run well past homework. Comparing two exported lists to find what is in both, what only the first has, and what only the second has is the same computation as a two-circle Venn diagram, and it is faster here than in a spreadsheet. Three-set mode handles the classic survey and probability problems, the ones that give overlaps between three groups and ask for the count in exactly one of them.

What is venn diagram calculator?

A Venn diagram is a picture of the logical relationships between a small number of sets, drawn as overlapping closed curves so that every possible combination of membership and non-membership appears as its own region. John Venn introduced the construction in an 1880 paper in the Philosophical Magazine, generalising Euler's earlier circles by insisting that all 2^n combinations be represented whether or not any element happens to occupy them. That completeness is the defining property: with two sets there are four regions, with three sets eight, and each region corresponds to one row of the membership table. This calculator computes those regions from actual element lists rather than drawing them, reporting both the count in each region and, where useful, the members themselves.

How to use this calculator.

  1. Choose whether you are comparing two sets or three. Set C is ignored entirely in 2-set mode, so you can leave whatever is in it.
  2. Paste your lists into the Set A, Set B and Set C boxes, separating elements with commas, semicolons or new lines. Braces are optional and stripped.
  3. Leave the universe box blank if you only care about the circles. Fill it in with every element under consideration when you need the 'in none of them' count.
  4. Read the headline number: that is how many distinct elements appear in at least one set.
  5. Work outwards through the region counts — in every set, in exactly two, in exactly one, and the three individual crescents.
  6. Use the member listings when you need to know which elements are in a region rather than just how many. Listings stop after 40 elements.
  7. Check the arithmetic with inclusion–exclusion if you want: for two sets, |A| + |B| − |A ∩ B| must equal the union count.

The formula.

|A ∪ B| = |A| + |B| − |A ∩ B| · |A ∪ B ∪ C| = |A|+|B|+|C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C|

Every element that appears anywhere in your lists belongs to exactly one region of the diagram, determined by which circles contain it. The calculator builds the union first, then walks it once and, for each element, counts how many of the active sets contain it. An element in one set lands in that set's exclusive crescent; an element in two lands in a two-way overlap; an element in all of them lands in the centre. Because each element is classified exactly once, the region counts are disjoint and add up to the union size — which is the fastest way to check the output by hand.

The principle of inclusion–exclusion gives the same union count by a different route, and it is worth understanding because it is what survives when you have counts but not lists. Adding |A| and |B| counts every shared element twice, so subtracting |A ∩ B| once corrects it exactly: |A ∪ B| = |A| + |B| − |A ∩ B|. With three sets, adding the three sizes counts each pairwise-shared element twice and each triple-shared element three times. Subtracting the three pairwise intersections fixes the pairs but removes the centre three times, having added it three times, so the centre has vanished entirely — hence the final + |A ∩ B ∩ C| to restore it. The alternating pattern continues for any number of sets.

The 'exactly one' region is the symmetric difference when two sets are active: A △ B = (A \ B) ∪ (B \ A), the elements that belong to one list but not the other. It is the natural answer to 'what changed between these two exports'. With three sets active the same output means what it says — in exactly one of the three — which is not the same as any pairwise symmetric difference, so the page labels it by meaning rather than by symbol in three-set mode.

The outside region depends entirely on the universe, and this is the one place where the calculator refuses to guess. |U \ (A ∪ B ∪ C)| = |U| − |A ∪ B ∪ C| requires a U. With the universe box blank, the page reports the outside count as 0 and the universe is implicitly the union itself, which is the only assumption that adds no information. If you supply a universe, it must contain every element already placed in a circle; a universe that omits one is rejected with the offending element named, because that combination is not a meaningful configuration.

No rounding occurs anywhere on this page and no threshold decides anything. Every output is an exact count or an exact listing. Element identity is exact string equality after trimming leading and trailing whitespace — deliberately, because numeric coercion would silently merge 1 and 1.0 and case folding would silently merge cat and Cat, either of which would change a region count without telling you.

A worked example.

Example

Take A = {1, 2, 3, 4, 5, 6}, B = {4, 5, 6, 7, 8} and C = {6, 7, 9, 10} in three-set mode, with the universe left blank. Start with the union. Scanning A gives 1 through 6; B adds 7 and 8, since 4, 5 and 6 are already there; C adds 9 and 10, since 6 and 7 are already there. So the union is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} and the headline count is 10. Now place each element. The element 6 is the only one in all three lists, so the centre region holds exactly {6} and the intersection count is 1. Elements 4 and 5 are in A and B but not C; element 7 is in B and C but not A; nothing is in A and C without also being in B, because the only element A and C share is 6. That gives three elements in exactly two sets. Everything else sits in a single circle: 1, 2 and 3 in A alone, 8 in B alone, and 9 and 10 in C alone — six elements in exactly one set. The three tiers must account for the whole union, and they do: 6 in exactly one, plus 3 in exactly two, plus 1 in all three, is 10. That is the quickest hand check available and it is the one to run first when a result looks wrong. Inclusion–exclusion gives the same answer independently. The set sizes are 6, 5 and 4. The pairwise overlaps are |A ∩ B| = 3 (the elements 4, 5, 6), |A ∩ C| = 1 (just 6) and |B ∩ C| = 2 (6 and 7). The triple overlap is 1. So 6 + 5 + 4 − 3 − 1 − 2 + 1 = 10, matching the union count exactly. The outside region comes back as 0 because no universe was supplied — with nothing known beyond the three lists, nothing is known to be outside them. Had you entered a universe of 1 through 12, the two extra elements 11 and 12 would appear in no circle and the outside count would be 12 − 10 = 2. Switching to two-set mode with the same A and B, and ignoring C entirely, gives a smaller picture: the union becomes {1, …, 8} with 8 elements, the intersection is {4, 5, 6} with 3, A \ B is {1, 2, 3} with 3, and B \ A is {7, 8} with 2. The symmetric difference — in exactly one of the two — is 3 + 2 = 5, and inclusion–exclusion confirms the union as 6 + 5 − 3 = 8.

set C6, 7, 9, 10
sets3
set B4, 5, 6, 7, 8
universe
set A1, 2, 3, 4, 5, 6

Frequently asked questions.

How do I calculate the union and intersection of two sets?
Choose 2 sets, paste your two lists, and read the top two figures. The union is every element appearing in at least one list, counted once even if it appears in both. The intersection is every element appearing in both. This page also gives you the two set differences — A only is A \ B, B only is B \ A — and the actual members of each region, not just the counts, so you can see which items overlap rather than only how many do.
What does the inclusion–exclusion principle say?
For two sets, |A ∪ B| = |A| + |B| − |A ∩ B|. Adding both sizes double-counts everything in the overlap, so you subtract the overlap once. For three sets the pattern alternates: add the three sizes, subtract the three pairwise intersections, then add the triple intersection back, because subtracting all three pairs removed the centre one time too many. On this page's default example that is 6 + 5 + 4 − 3 − 1 − 2 + 1 = 10, which matches the union count the calculator returns.
Why is the 'in none of them' count zero?
Because you have not told the calculator what the universe is. The outside region is |U| − |A ∪ B ∪ C|, and without a U there is no way to know what lies beyond the circles. Rather than invent a plausible universe, the page reports 0 and says so. Fill in the universe box with every element under consideration — every student surveyed, every product in the catalogue — and the outside count becomes meaningful.
How many regions does a three-set Venn diagram have?
Eight. Each of the three sets independently either contains an element or does not, so there are 2 × 2 × 2 = 8 combinations: A only, B only, C only, A∩B only, A∩C only, B∩C only, the centre where all three meet, and the region outside all three. A two-set diagram has four regions by the same argument. Insisting that all 2^n combinations be drawn is exactly what distinguishes a Venn diagram from an Euler diagram, which shows only the non-empty ones.
What is the symmetric difference?
A △ B is the set of elements in exactly one of the two sets — everything in A or B but not in both. It equals (A \ B) ∪ (B \ A), and on this page it is the 'in exactly one set' output when you are in 2-set mode. It is the natural answer to 'what is different between these two lists', which is why it is useful for comparing two exports or two versions of an inventory. In 3-set mode the same output means 'in exactly one of the three', which is a different quantity.
Can I use words or names as elements, not just numbers?
Yes. Elements are compared as exact text after trimming surrounding whitespace, so anything you can type works — names, SKUs, email addresses, whole phrases. That also means comparison is case-sensitive and format-sensitive: cat and Cat are two different elements, and so are 1 and 1.0. That is deliberate. Coercing text to numbers or folding case would silently merge elements you meant to keep apart and change a region count without telling you.
What happens to duplicates and to the order I type things in?
Duplicates within a single list are collapsed, because a set contains each element once — the list 2, 2, 3 is the two-element set {2, 3}. Order never affects any count. It only affects the order elements are printed back in, which is first appearance scanning A, then B, then C. If a count comes out lower than the number of items you pasted, a repeated element is almost always why.
Does this calculator draw the diagram?
No — it computes it. Every region of a two- or three-circle diagram is reported as a count, and the union, the intersection and each exclusive crescent are also reported as lists of their actual members. That is the part a drawing cannot give you once the lists are longer than a handful of items, which is exactly when a diagram stops being readable and the numbers start mattering.
Why does the calculator reject my universe?
Because it does not contain an element you have already placed in one of the circles, and the error message names that element. A universe is meant to be everything under consideration, so every member of A, B and C must be in it by definition; a universe that omits one is a data-entry slip rather than a legitimate configuration. Either add the missing element to the universe or remove it from the set, or leave the universe box blank to work with the circles alone.

References& sources.

  1. [1]Weisstein, Eric W. "Inclusion-Exclusion Principle." MathWorld — Wolfram Research. Gives "|A union B| = |A| + |B| - |A intersection B|" and the alternating-sum extension, worked through a three-set example. This is the source for the union arithmetic on this page. Retrieved 2026-07-29.
  2. [2]Ruskey, Frank, and Mark Weston. "A Survey of Venn Diagrams", §"What is a Venn diagram?". The Electronic Journal of Combinatorics, Dynamic Survey DS5 — "Since each region is either inside or outside of a given curve, and there are n curves, there must be exactly 2^n regions in a Venn diagram (including the exterior…)", and "some authors refer to diagrams with fewer than 2^n regions as Venn diagrams, but they are more properly termed Euler diagrams". Open access; retrieved 2026-07-29.
  3. [3]Weisstein, Eric W. "Venn Diagram." MathWorld — Wolfram Research. Independently gives the region count as N = Σ(k=0..n) C(n,k) = 2^n, including the exterior region. Retrieved 2026-07-29.
  4. [4]Levin, Oscar. Discrete Mathematics: An Open Introduction, 3rd edition, §0.3 "Sets" — the definitions of subset, union, intersection and the empty set used throughout this page. Open access; retrieved 2026-07-29.
  5. [5]Venn, John. "On the diagrammatic and mechanical representation of propositions and reasonings." The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 9 (1880): 1–18 — the originating paper. Volume number and page range as recorded independently by both MathWorld and the Ruskey–Weston survey bibliography; some modern bibliographies instead give 5th series, vol. 10, no. 59, a discrepancy this page does not attempt to resolve. The linked copy is a scanned facsimile and was not machine-readable at fetch time.
  6. [6]Halmos, Paul R. Naive Set Theory. Springer Undergraduate Texts in Mathematics, 1974 reprint of the 1960 Van Nostrand edition, §4 "Unions and Intersections" — the definitions of ∪ and ∩. Print reference, cited bibliographically; not retrieved during authoring.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 977 calculators remain free
  • No billing is enabled
Coming soon