Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Venn Diagrams Generator


How to use
  1. Pick how many sets you want with the 2 / 3 / 4 / 5 buttons. Learn more about getting started
  2. Type an expression in the box, or build it with the symbol buttons: A B ∩ ∪ \ ⊕ ᶜ ( ) ∅ U. Clear empties the box. Learn more about writing set expressions
  3. The diagram shades every region that satisfies the expression. The counter beside Expression shows how many regions out of the total are shaded. Learn more about the counter
  4. The Regions strip lists every region. Dots show which sets a region is inside; a filled cell means it is shaded. Learn more about the Regions strip
  5. Put a second expression in the Compare box: ≡ means it shades the same regions, ≢ means it does not. Learn more about comparing two expressions
  6. Library tab: click a preset expression to load it. With 2 or 3 sets you can also switch the layout to Overlapping, Disjoint, A ⊆ B, or A = B. Learn more about presets and layouts
  7. Elements tab: one set per line, like A = 1, 2, 3. Use U for elements in no set. Each element drops into the region its membership picks. Toggle Show elements and Show counts. Learn more about placing elements in regions
  8. Style tab: highlight color and opacity, outline color and width, circle size, and switches for the universe box, region labels, and the caption. Learn more about the Style tab
  9. Drag any curve to move it. At 4 and 5 sets the layout is fixed — dragging destroys regions. Learn more about dragging curves
  10. Download SVG or Download PNG to save the diagram. Learn more about exporting
  11. Typing shortcuts: & for ∩, | or + for ∪, - for \. Complement is Aᶜ, A′, A* or ¬A. ⊕ is symmetric difference. Only the set letters currently on the diagram are valid. Learn more about typing shortcuts


UAB681274539A ∩ B

Export

Intersection

A∩BA \cap B is everything in AA and in BB. Only the lens is shaded — an element in just one circle is left out.

This is the single region where both memberships are true, which is why the shading shrinks to nothing as the circles separate.

Expression

1/4
Sets in the diagram

Every combination of memberships is a region, so 2 sets give 4 of them — that is how many your expression is tested against. Two and three sets are drawn as circles, four and five as ellipses, in the one arrangement that keeps every region non-empty.

Regions

0001
U
A
B
A∩B
Compare·

Reshape the layout. Every region path is re-derived, so a relation that empties a region empties it in the drawing too.








Getting Started

DemoBuilding an expression
Step 0 of 5
Start by choosing how many sets the diagram holds. The 2 / 3 / 4 / 5 buttons rebuild the picture and change the number of regions available.

Then give the diagram something to shade:

• Type an expression directly into the Expression box.
• Or click the symbol buttons to assemble it: set letters, intersection, union, difference, symmetric difference, complement, parentheses, empty set, and the universe.
• Clear empties the box and removes all shading.

Every region satisfying the expression fills with the highlight color. The counter next to the Expression box reports how many regions out of the total are currently shaded, so a two-set union should read 3 of 4, and a three-set intersection should read 1 of 8.

Only set letters currently on the diagram are valid. Asking for C while in 2-set mode produces no result until you switch to 3 sets.

Writing Set Expressions

The expression box accepts keyboard shortcuts, which is faster than clicking symbols once you know them:

• & for intersection
• | or + for union
• - for difference
• Complement written as A with a superscript c, A with a prime mark, A* or a leading negation sign
• Symmetric difference through its own symbol button

Parentheses control grouping the way they do in arithmetic. (A∪B)∩C(A \cup B) \cap C and A∪(B∩C)A \cup (B \cap C) shade different regions, and typing both in turn is the quickest way to see why grouping matters.

Nesting is allowed, so ((A∩B)∖C)c((A \cap B) \setminus C)^c is a valid single expression. Build complicated expressions in stages: type an inner part, check the shading, then wrap it. If a shape looks wrong, the mistake is almost always a missing parenthesis rather than a wrong operator.

The Four Operations on Two Sets

The generator opens on two sets with A∩BA \cap B in the box, shading 11 of the 44 regions. Swapping the operator changes only which regions light up, never how many exist.

A∪BA \cup B shades 33 of 44; A⊕BA \oplus B, the symmetric difference, shades 22; and AcA^c shades 22 — but not the same two.
UABUABUABUAB
Two sets: A ∩ B, A ∪ B, A ⊕ B, Aᶜ

The same four regions throughout; only which ones are shaded changes. Intersection shades 1 of 4, union 3, symmetric difference 2, and the complement of A a different 2 - it includes the area outside everything, which union leaves out.

Those counts are worth reading as a group. Union and complement both shade a majority of the picture, yet A∪BA \cup B leaves out the region outside everything while AcA^c includes it. The two are not opposites of each other; AcA^c is the opposite of AA alone.

Symmetric difference is the one people meet last and it is the easiest to read here: it shades exactly the regions union shades minus the one intersection shades. Written out, A⊕B=(A∪B)∖(A∩B)A \oplus B = (A \cup B) \setminus (A \cap B), which the counts confirm as 3−1=23 - 1 = 2.

Every one of these is decided by the same evaluator. The tool parses your expression once and then asks it a yes-or-no question about each region's membership, so an expression of any depth is answered the same way a single operator is.

Reading the Regions Strip

The Regions strip below the diagram is the exact answer the diagram is drawing, written out as a list.

Each entry is one region. The dots show which sets that region sits inside, and a filled cell means the region is shaded by the current expression. With three sets there are 8 regions; with four there are 16; with five there are 32.

Use the strip when the picture gets crowded. Curved slivers at 4 and 5 sets are hard to see, but the strip never hides a region. If the shading counter says 6 of 16 and you can only spot four shaded areas, the strip tells you which two you missed.

The strip is also how you check an expression is doing what you intended. Read off the membership pattern of each shaded region and compare it to the definition of the operation you wrote.

Layouts Change Which Regions Exist

Switch the layout from Overlapping to Disjoint with A∩BA \cap B still in the box, and nothing shades. Switch to A⊆BA \subseteq B and the "A only" region disappears instead.

The expression did not change. The set of regions that have any area did.
UABUAB
A ∩ B under the Disjoint and A ⊆ B layouts

Under Disjoint the expression still selects the A ∩ B row, but that row has no area, so nothing shades. Under A ⊆ B it is the "A only" region that has no area. The region table is always 2^n rows; the drawing shows only the rows a layout admits.

This is the sharpest distinction the tool can draw, and it is easy to miss. The region table is combinatorial: nn sets always produce 2n2^n rows, whatever the picture looks like. The drawing is geometric, and a layout can leave a row with no area at all.

Under Disjoint the tool still selects the A∩BA \cap B row — the strip shows it — but there is no path to fill, so the diagram stays empty. Under A⊆BA \subseteq B the missing row is "A only", because every element of AA is also in BB. Under A=BA = B both "A only" and "B only" vanish and just two regions survive of the four.

That gap between what an expression *selects* and what a diagram can *show* is exactly why a Venn diagram is a tool for reasoning about relationships rather than a proof. The algebra is always over all 2n2^n regions; the picture only draws the ones your arrangement admits.

Comparing Two Expressions

DemoChecking De Morgan
Step 0 of 5
The Compare box takes a second expression and tests it against the first.

An equivalence sign means both expressions shade exactly the same regions. A struck-through equivalence sign means they differ somewhere.

This turns the generator into a checker for set identities. Enter (A∪B)c(A \cup B)^c in the Expression box and Ac∩BcA^c \cap B^c in the Compare box, and the equivalence sign confirms De Morgan's law. Try (A∩B)c(A \cap B)^c against Ac∩BcA^c \cap B^c and the sign flips, because that pairing is false.

Comparison is per-region, not per-symbol, so two expressions written completely differently register as equivalent whenever their shaded regions agree. That is the right test: two set expressions are equal exactly when they select the same regions of the universe.

Three Sets and De Morgan's Law

At three sets there are 23=82^3 = 8 regions. A∩B∩CA \cap B \cap C shades exactly one of them, the centre.

Put (A∪B)c(A \cup B)^c in the box and 22 regions shade: the area outside everything, and CC alone.
UABCUABC
Three sets: A ∩ B ∩ C, then (A ∪ B)ᶜ

Eight regions. The triple intersection is one of them; the complement of A ∪ B is two - C alone and the area outside everything. Put A ᶜ ∩ B ᶜ in the Compare box and the tool reports them equivalent across all eight.

That second result is De Morgan's law made visible. (A∪B)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c — everything outside both AA and BB — and with a third set present that leaves two places to be: inside CC only, or inside nothing at all.

The Compare box turns this from a picture into a check. Type (A∪B)c(A \cup B)^c in one box and Ac∩BcA^c \cap B^c in the other and the tool reports ≡\equiv, meaning the two shade identically across all eight regions. Type Ac∪BcA^c \cup B^c instead and it reports ≢\not\equiv and names the regions that differ.

That is a genuine verification, not an illustration: comparing region by region over all 2n2^n rows is exactly what proving a set identity requires.

Four and Five Sets

Beyond three sets circles stop working — no arrangement of four circles produces all 1616 regions — so the tool switches to a fixed layout of tilted ellipses at 44 sets and a fixed five-fold arrangement at 55.

At four sets A∩BA \cap B shades 44 of the 1616 regions; at five sets A∩B∩CA \cap B \cap C shades 44 of the 3232.
UABCDUABCDE
Four sets (A ∩ B) and five sets (A ∩ B ∩ C)

Circles cannot produce all 16 regions, so these layouts are fixed ellipse arrangements and dragging is disabled. Fixing k of n sets leaves 2^(n-k) regions shaded: 4 of 16 here, and 4 of 32.

Those counts follow a rule worth knowing. Fixing kk of the nn sets to "inside" leaves the other n−kn - k free, so the expression shades 2n−k2^{n-k} regions: 24−2=42^{4-2} = 4 and 25−3=42^{5-3} = 4. A short expression selects a whole family of regions, and the family grows as the diagram does.

These two layouts are the reason dragging is disabled at 44 and 55 sets. The arrangements are chosen so that every one of the 2n2^n regions exists and is reachable; nudging a curve destroys some of them, which is the geometric failure that made circles insufficient in the first place.

It is also why five sets is close to the practical ceiling. 3232 regions is already more than a reader can track, and the diagram becomes a device for confirming an answer rather than for finding one.

Presets and Layouts

DemoLayouts
Step 0 of 5
The Library tab holds ready-made expressions. Clicking one loads it into the Expression box, so you can see the standard operations without typing anything.

With 2 or 3 sets the Library tab also changes the layout:

• Overlapping is the familiar arrangement where every combination of memberships exists.
• Disjoint separates the circles so no element belongs to two sets.
• A is a subset of B nests one circle inside another.
• A = B puts the circles on top of each other.

Layouts matter because they encode assumptions. On a disjoint layout, A∩BA \cap B is empty and the shading confirms it. On a subset layout, A∖BA \setminus B vanishes. Switching layouts while holding an expression fixed shows which results depend on the sets actually overlapping.

Placing Elements in Regions

DemoElements and style
Step 0 of 5
The Elements tab moves the diagram from abstract regions to concrete members.

Write one set per line, in the form A = 1, 2, 3. An element listed on several lines belongs to several sets, and it lands in whichever region matches its full membership. Elements listed under U belong to no set and sit in the outer universe box.

Two switches control what appears:

• Show elements prints the member names inside their regions.
• Show counts prints how many elements each region holds.

This is the fastest way to check a cardinality calculation by hand. Type the sets, turn on counts, and read off ∣A∪B∣|A \cup B| directly, then verify it against ∣A∣+∣B∣−∣A∩B∣|A| + |B| - |A \cap B|. It also makes membership concrete for anyone who reads the circles as pictures rather than as sets of elements.

Styling and Exporting

The Style tab controls appearance:

• Highlight color and opacity for the shaded regions
• Outline color and width for the curves
• Circle size
• Switches for the universe box, region labels, and the caption

Drag any curve to move it. At 2 and 3 sets dragging is safe and useful for spacing the picture. At 4 and 5 sets the layout is fixed, and dragging destroys the regions the diagram depends on.

Two export buttons finish the job. Download SVG produces a vector file that stays sharp at any size and can be edited in a vector editor, which is what you want for print, worksheets, or slides. Download PNG produces a raster image for anywhere that will not accept SVG. Set your colors and toggles before exporting, since the file captures the diagram exactly as it appears.

What a Venn Diagram Shows

A Venn diagram splits a universe into regions, one for every possible pattern of membership across the sets.

That last part is what separates a Venn diagram from a loose sketch of overlapping circles. With nn sets, a true Venn diagram has 2n2^n regions: 4 regions for 2 sets, 8 for 3, 16 for 4, and 32 for 5. Every combination is present, including the region outside all the sets.

This is why 4 and 5 set diagrams stop using circles. Four circles cannot produce all 16 regions, so the generator switches to ellipses and curved shapes that can. It is also why the layout is locked at those sizes.

A diagram where some combinations are missing on purpose, such as disjoint circles, is an Euler diagram rather than a Venn diagram.

For the full treatment of regions and set relations, see set theory.

The Core Set Operations

Five operations cover almost everything you will type into the box.

Intersection keeps only what is in both sets:

A∩B={x:x∈A and x∈B}A \cap B = \{x : x \in A \text{ and } x \in B\}


Union keeps anything in either set:

A∪B={x:x∈A or x∈B}A \cup B = \{x : x \in A \text{ or } x \in B\}


Difference keeps what is in the first set but not the second:

A∖B={x:x∈A and x∉B}A \setminus B = \{x : x \in A \text{ and } x \notin B\}


Complement keeps everything in the universe outside the set:

Ac={x∈U:x∉A}A^c = \{x \in U : x \notin A\}


Symmetric difference keeps what is in exactly one of the two sets:

A⊕B=(A∖B)∪(B∖A)A \oplus B = (A \setminus B) \cup (B \setminus A)


Type each one on a two-set diagram and note the shaded count: intersection gives 1 of 4, union 3 of 4, difference 1 of 4, complement 2 of 4, symmetric difference 2 of 4.

For worked definitions and proofs, see set operations.

Checking Identities Visually

Set identities are equalities between expressions, and every one of them can be tested here in seconds using the Compare box.

The identities worth trying first:

• De Morgan: (A∪B)c=Ac∩Bc(A \cup B)^c = A^c \cap B^c and (A∩B)c=Ac∪Bc(A \cap B)^c = A^c \cup B^c
• Distributive: A∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)
• Absorption: A∪(A∩B)=AA \cup (A \cap B) = A
• Difference as intersection: A∖B=A∩BcA \setminus B = A \cap B^c

A shaded diagram is not a proof, but it is a reliable check. If two expressions shade different regions, the identity is false and you have a counterexample immediately. If they shade the same regions across all 2n2^n patterns, the identity holds for those sets, and a formal proof by element membership will follow the same case split the regions already show.

For formal statements, see set identities.