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.
  2. Type an expression in the box, or build it with the symbol buttons: A B ∩ ∪ \ ⊕ ᶜ ( ) ∅ U. Clear empties the box.
  3. The diagram shades every region that satisfies the expression. The counter beside Expression shows how many regions out of the total are shaded.
  4. The Regions strip lists every region. Dots show which sets a region is inside; a filled cell means it is shaded.
  5. Put a second expression in the Compare box: ≡ means it shades the same regions, ≢ means it does not.
  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.
  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.
  8. Style tab: highlight color and opacity, outline color and width, circle size, and switches for the universe box, region labels, and the caption.
  9. Drag any curve to move it. At 4 and 5 sets the layout is fixed — dragging destroys regions.
  10. Download SVG or Download PNG to save the diagram.
  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.


UAB681274539A ∩ B

Export

Intersection

ABA \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

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. (AB)C(A \cup B) \cap C and A(BC)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 ((AB)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.

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.

Comparing Two Expressions

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 (AB)c(A \cup B)^c in the Expression box and AcBcA^c \cap B^c in the Compare box, and the equivalence sign confirms De Morgan's law. Try (AB)c(A \cap B)^c against AcBcA^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.

Presets and Layouts

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, ABA \cap B is empty and the shading confirms it. On a subset layout, ABA \setminus B vanishes. Switching layouts while holding an expression fixed shows which results depend on the sets actually overlapping.

Placing Elements in Regions

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 AB|A \cup B| directly, then verify it against A+BAB|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:

AB={x:xA and xB}A \cap B = \{x : x \in A \text{ and } x \in B\}


Union keeps anything in either set:

AB={x:xA or xB}A \cup B = \{x : x \in A \text{ or } x \in B\}


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

AB={x:xA and xB}A \setminus B = \{x : x \in A \text{ and } x \notin B\}


Complement keeps everything in the universe outside the set:

Ac={xU:xA}A^c = \{x \in U : x \notin A\}


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

AB=(AB)(BA)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: (AB)c=AcBc(A \cup B)^c = A^c \cap B^c and (AB)c=AcBc(A \cap B)^c = A^c \cup B^c
• Distributive: A(BC)=(AB)(AC)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)
• Absorption: A(AB)=AA \cup (A \cap B) = A
• Difference as intersection: AB=ABcA \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.

Related Concepts and Tools

Set Theory - Sets, membership, subsets, and the universe the diagram divides.

Set Operations - Formal definitions of intersection, union, difference, complement, and symmetric difference.

De Morgan's Laws - The two complement identities the Compare box confirms fastest.

Cardinality - Counting elements, and the inclusion-exclusion rule the Elements tab lets you verify.

Logic - Set operations mirror the logical connectives: intersection is AND, union is OR, complement is NOT.

Probability - Events are sets, so the same diagrams carry over to probability rules for unions and complements.