Disclaimer 1: I'm not sure if your question is about how to calculate the counts per subgroup, or how to plot a 5-set Venn diagram. I'm assuming the latter.

Disclaimer 2: I find 5-set Venn diagrams extremely difficult to read. To the point of being useless. But that's my personal opinion.

If other R packages are an option, here is a worked-out 5-set example using VennDiagram (straight from the VennDiagram reference manual)

library(VennDiagram);
venn.plot <- draw.quintuple.venn(
    area1 = 301, area2 = 321, area3 = 311, area4 = 321, area5 = 301,
    n12 = 188, n13 = 191, n14 = 184, n15 = 177,
    n23 = 194, n24 = 197, n25 = 190,
    n34 = 190, n35 = 173, n45 = 186,
    n123 = 112, n124 = 108, n125 = 108,
    n134 = 111, n135 = 104, n145 = 104,
    n234 = 111, n235 = 107, n245 = 110,
    n345 = 100,
    n1234 = 61, n1235 = 60, n1245 = 59,
    n1345 = 58, n2345 = 57,
    n12345 = 31,
    category = c("A", "B", "C", "D", "E"),
    fill = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.col = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.cex = 2,
    margin = 0.05,
    cex = c(
        1.5, 1.5, 1.5, 1.5, 1.5, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8,
        1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 1, 1, 1, 1, 1.5),
    ind = TRUE);

png("venn_5set.png");
grid.draw(venn.plot);
dev.off();


Update [15 November 2017]

Your source table is in an atypical format. As I explain in my comments, you usually start with either a binary matrix (one column per set, membership of every observation indicated by 0's or 1's), or a list of set elements.

To be honest, I'm less and less sure about what you are actually trying to do. I have a feeling that there might be a misconception about Venn diagrams. For example, let's take a look at the first rows of your table

# Read data
library(readxl);
data <- as.data.frame(read_excel("~/Downloads/dataset4venn.xlsx"));
rownames(data) <- data[, 1];
data <- data[, -1];
head(data);
#  A B  C D  E
#1 8 8  7 8 10
#2 0 0 10 0  2
#3 0 0  0 0  3
#4 0 0  1 2  0
#5 1 0  1 0  2
#6 0 0  0 0  1    

An observation is either the presence (encoded by 1) or the absence (encoded by 0) of a unique element (in your case a species) in a specific group (i.e. a sampling site). The number of sightings as you call it does not matter here: a Venn diagram explores the logical relations between different species sampled at different sites, or in other words which unique species are shared by sites A-E.

Having said that and ignoring the number of sightings per site, you can show overlaps between different sites in the following 5-set Venn diagram. I first define a helper function cts to calculate counts per group/overlap, and then feed those numbers into draw.quintuple.venn.

# Function to calculate the count per group/overlap
# Note: data is a global variable
cts <- function(set) {
    df <- data;
    for (i in 1:length(set)) df <- subset(df, df[set[i]] >= 1);
    nrow(df);
}

# Plot
library(VennDiagram);
venn.plot <- draw.quintuple.venn(
    area1 = cts("A"), area2 = cts("B"), area3 = cts("C"),
    area4 = cts("D"), area5 = cts("E"),
    n12 = cts(c("A", "B")), n13 = cts(c("A", "C")), n14 = cts(c("A", "D")),
    n15 = cts(c("A", "E")), n23 = cts(c("B", "C")), n24 = cts(c("B", "D")),
    n25 = cts(c("B", "E")), n34 = cts(c("C", "D")), n35 = cts(c("C", "E")),
    n45 = cts(c("D", "E")),
    n123 = cts(c("A", "B", "C")), n124 = cts(c("A", "B", "D")),
    n125 = cts(c("A", "B", "E")), n134 = cts(c("A", "C", "D")),
    n135 = cts(c("A", "C", "E")), n145 = cts(c("A", "D", "E")),
    n234 = cts(c("B", "C", "D")), n235 = cts(c("B", "C", "E")),
    n245 = cts(c("B", "D", "E")), n345 = cts(c("C", "D", "E")),
    n1234 = cts(c("A", "B", "C", "D")), n1235 = cts(c("A", "B", "C", "E")),
    n1245 = cts(c("A", "B", "D", "E")), n1345 = cts(c("A", "C", "D", "E")),
    n2345 = cts(c("B", "C", "D", "E")),
    n12345 = cts(c("A", "B", "C", "D", "E")),
    category = c("A", "B", "C", "D", "E"),
    fill = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.col = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.cex = 2,
    margin = 0.05,
    cex = c(
        1.5, 1.5, 1.5, 1.5, 1.5, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8,
        1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 1, 1, 1, 1, 1.5),
    ind = TRUE);

png("venn_5set.png");
grid.draw(venn.plot);
dev.off();

PS

Various R packages/internet sources offer helper functions to calculate overlaps based on e.g. a binary matrix or a list of set elements. For example, the R/Bioconductor package limma offers a function limma::vennCounts that calculates counts for all overlaps based on a binary matrix. So if you don't want to write your own function (like I did), you can also use those. Either way, in the case of more complex Venn diagrams, I would suggest to not calculate overlaps manually by hand, as it's easy to make a mistake (see your error message).

Answer from Maurits Evers on Stack Overflow
🌐
Miro
miro.com › home › miroverse templates › diagramming & mapping › venn diagram
FREE 5-circle Venn Diagram | Miro 2026
A 5 Circle Venn Diagram Template is a diagramming tool that visually showcases the overlap and intersection of five different groups or categories. Each circle represents a category, and the overlap between circles indicates a commonality among ...
🌐
InteractiVenn
interactivenn.net
InteractiVenn | Interactive Venn Diagram Tool for Comparing Sets (Science & Everyday Data)
InteractiVenn: interactive Venn diagrams (≤6 large sets) with element counts, percentage views (intersections & exclusive regions), duplicate detection/removal, hierarchical & sequential unions, optimized large-set intersections, SVG/PNG/Excel/.interactivenn export. Data stays local.
Discussions

venn diagram 5 way (with 'venn' R) - Stack Overflow
I am trying to create a 5-way venn diagram. My data are arranged in excel as 5 columns (each representing a site A-E) and rows each representing a species abundance (0 - 16) for each of the five si... More on stackoverflow.com
🌐 stackoverflow.com
elementary set theory - 5-set scaled Venn diagram - Mathematics Stack Exchange
Let's assume that we have $5$ sets, each having up to $100$ elements. Some elements belong to multiple sets. Even more, there is at least one element for each of the $2^5=32$ configurations (by More on math.stackexchange.com
🌐 math.stackexchange.com
November 20, 2020
Set theory : How to solve this question, I am not able to make a 5-set venn diagram ? is there any another way to solve this ?
You don't have to draw a 5-set Venn diagram, you could just lay it out as a table of 32 rows More on reddit.com
🌐 r/learnmath
3
4
June 18, 2023
A 5-way Venn diagram of the number of words in each language and the overlap of common words between each language (as of 5.6)
This must have taken ages to do. Wow! Where did you get the idea to do this? More on reddit.com
🌐 r/NoMansSkyTheGame
21
142
April 8, 2025
People also ask

What does a Venn diagram look like?

A typical Venn diagram shows two or more circles that overlap, with each circle representing a set of information. 

🌐
miro.com
miro.com › home › graphs › venn diagram
FREE Venn Diagram Maker Online | Miro
Where can I create a Venn diagram?

You can create a Venn Diagram directly on your Miro board. If you want to add it to other presentations or documentation tools, download it as an image or PDF file. Copy and paste your design to add the Venn Diagram to other Miro boards.

🌐
miro.com
miro.com › home › graphs › venn diagram
FREE Venn Diagram Maker Online | Miro
How do I make a multi-circle Venn diagram?

You can add as many circles as you want to your diagram with Miro’s free Venn Diagram maker. To make a multi-circle Venn Diagram, get started with one of our ready-made templates or draw one from scratch using our shapes tool on the left toolbar.

🌐
miro.com
miro.com › home › graphs › venn diagram
FREE Venn Diagram Maker Online | Miro
🌐
Beautiful.ai
beautiful.ai › blog › 1-slide-5-ways-venn-diagram
1 Slide, 5 Ways: Venn Diagram | The Beautiful Blog
February 22, 2026 - Discover five creative ways to customize your Venn Diagram slide using Beautiful.ai’s Smart Slide templates. Learn design tips to visualize relationships and elevate your presentation storytelling.
🌐
Magnific
magnific.com › free-photos-vectors › venn-diagram-five-circles
Venn diagram five circles Images - Free Download on Magnific (formerly Freepik)
Find & Download Free Graphic Resources for Venn diagram five circles Vectors, Stock Photos & PSD files. ✓ Free for commercial use ✓ High Quality Images
Find elsewhere
🌐
Canva
canva.com › home › graphs › venn diagrams
Free Venn Diagram Maker Online and Examples | Canva
Create your own brilliant, custom Venn diagrams for free with examples from Canva's Venn diagram maker online.
Top answer
1 of 1
1

Disclaimer 1: I'm not sure if your question is about how to calculate the counts per subgroup, or how to plot a 5-set Venn diagram. I'm assuming the latter.

Disclaimer 2: I find 5-set Venn diagrams extremely difficult to read. To the point of being useless. But that's my personal opinion.

If other R packages are an option, here is a worked-out 5-set example using VennDiagram (straight from the VennDiagram reference manual)

library(VennDiagram);
venn.plot <- draw.quintuple.venn(
    area1 = 301, area2 = 321, area3 = 311, area4 = 321, area5 = 301,
    n12 = 188, n13 = 191, n14 = 184, n15 = 177,
    n23 = 194, n24 = 197, n25 = 190,
    n34 = 190, n35 = 173, n45 = 186,
    n123 = 112, n124 = 108, n125 = 108,
    n134 = 111, n135 = 104, n145 = 104,
    n234 = 111, n235 = 107, n245 = 110,
    n345 = 100,
    n1234 = 61, n1235 = 60, n1245 = 59,
    n1345 = 58, n2345 = 57,
    n12345 = 31,
    category = c("A", "B", "C", "D", "E"),
    fill = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.col = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.cex = 2,
    margin = 0.05,
    cex = c(
        1.5, 1.5, 1.5, 1.5, 1.5, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8,
        1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 1, 1, 1, 1, 1.5),
    ind = TRUE);

png("venn_5set.png");
grid.draw(venn.plot);
dev.off();


Update [15 November 2017]

Your source table is in an atypical format. As I explain in my comments, you usually start with either a binary matrix (one column per set, membership of every observation indicated by 0's or 1's), or a list of set elements.

To be honest, I'm less and less sure about what you are actually trying to do. I have a feeling that there might be a misconception about Venn diagrams. For example, let's take a look at the first rows of your table

# Read data
library(readxl);
data <- as.data.frame(read_excel("~/Downloads/dataset4venn.xlsx"));
rownames(data) <- data[, 1];
data <- data[, -1];
head(data);
#  A B  C D  E
#1 8 8  7 8 10
#2 0 0 10 0  2
#3 0 0  0 0  3
#4 0 0  1 2  0
#5 1 0  1 0  2
#6 0 0  0 0  1    

An observation is either the presence (encoded by 1) or the absence (encoded by 0) of a unique element (in your case a species) in a specific group (i.e. a sampling site). The number of sightings as you call it does not matter here: a Venn diagram explores the logical relations between different species sampled at different sites, or in other words which unique species are shared by sites A-E.

Having said that and ignoring the number of sightings per site, you can show overlaps between different sites in the following 5-set Venn diagram. I first define a helper function cts to calculate counts per group/overlap, and then feed those numbers into draw.quintuple.venn.

# Function to calculate the count per group/overlap
# Note: data is a global variable
cts <- function(set) {
    df <- data;
    for (i in 1:length(set)) df <- subset(df, df[set[i]] >= 1);
    nrow(df);
}

# Plot
library(VennDiagram);
venn.plot <- draw.quintuple.venn(
    area1 = cts("A"), area2 = cts("B"), area3 = cts("C"),
    area4 = cts("D"), area5 = cts("E"),
    n12 = cts(c("A", "B")), n13 = cts(c("A", "C")), n14 = cts(c("A", "D")),
    n15 = cts(c("A", "E")), n23 = cts(c("B", "C")), n24 = cts(c("B", "D")),
    n25 = cts(c("B", "E")), n34 = cts(c("C", "D")), n35 = cts(c("C", "E")),
    n45 = cts(c("D", "E")),
    n123 = cts(c("A", "B", "C")), n124 = cts(c("A", "B", "D")),
    n125 = cts(c("A", "B", "E")), n134 = cts(c("A", "C", "D")),
    n135 = cts(c("A", "C", "E")), n145 = cts(c("A", "D", "E")),
    n234 = cts(c("B", "C", "D")), n235 = cts(c("B", "C", "E")),
    n245 = cts(c("B", "D", "E")), n345 = cts(c("C", "D", "E")),
    n1234 = cts(c("A", "B", "C", "D")), n1235 = cts(c("A", "B", "C", "E")),
    n1245 = cts(c("A", "B", "D", "E")), n1345 = cts(c("A", "C", "D", "E")),
    n2345 = cts(c("B", "C", "D", "E")),
    n12345 = cts(c("A", "B", "C", "D", "E")),
    category = c("A", "B", "C", "D", "E"),
    fill = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.col = c("dodgerblue", "goldenrod1", "darkorange1", "seagreen3", "orchid3"),
    cat.cex = 2,
    margin = 0.05,
    cex = c(
        1.5, 1.5, 1.5, 1.5, 1.5, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8, 1, 0.8,
        1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 0.55, 1, 1, 1, 1, 1, 1.5),
    ind = TRUE);

png("venn_5set.png");
grid.draw(venn.plot);
dev.off();

PS

Various R packages/internet sources offer helper functions to calculate overlaps based on e.g. a binary matrix or a list of set elements. For example, the R/Bioconductor package limma offers a function limma::vennCounts that calculates counts for all overlaps based on a binary matrix. So if you don't want to write your own function (like I did), you can also use those. Either way, in the case of more complex Venn diagrams, I would suggest to not calculate overlaps manually by hand, as it's easy to make a mistake (see your error message).

🌐
Miro
miro.com › home › graphs › venn diagram
FREE Venn Diagram Maker Online | Miro
When traditional tools slow you down, mapping overlapping ideas can feel harder than it should. With Miro’s Venn diagram maker, you can quickly show connections, highlight differences, and present ideas simply, making brainstorms, meetings, and presentations more effective.
🌐
Canva
canva.com › home › graph templates › flowcharts
Free customizable flowchart templates | Canva
Venn Diagrams · SWOT Analyses · Work Breakdown Structures · Gantt Charts · Concept Maps · Fishbone Diagrams · Organization Charts · Histogram Graphs · Chore Charts · Pictogram Graphs · Docs · Whiteboard · Presentations · Logos · Landscape Videos ·
🌐
Boardmix
boardmix.com › articles › venn-circles-4-ways-venn-diagram
Exploring Venn Circles: A Guide to 4-Way Venn Diagrams
Venn circles stand out as a powerful tool for showcasing relationships, intersections, and unions between different sets of data. This article delves deep into the concept of Venn circles, with a particular focus on 4-way Venn diagrams. We'll explore their construction, advantages, limitations, and practical applications across various fields.
🌐
Figma
figma.com › templates › venn-diagram
Free Venn Diagram Template | Figma
Its easy to create two circle, three circle, and four circle Venn diagrams with our templates.
🌐
EdrawMax
edrawmax.com › templates › 5-circle-venn-diagram-1005018
5 Circle Venn Diagram | EdrawMax Template
June 4, 2021 - Venn diagram is usually used for compare the differences and similarities, and the five circle venn diagram is the for showing the differences and similarities of human automation.
🌐
Wikimedia Commons
commons.wikimedia.org › wiki › File:Symmetrical_5-set_Venn_diagram.svg
File:Symmetrical 5-set Venn diagram.svg - Wikimedia Commons
April 16, 2019 - #!/usr/bin/env python import math class Ellipse: def __init__(self, x,y, rx,ry): self.x = x self.y = y self.rx = rx self.ry = ry class Matrix: def __init__(self, ellipse): self.half_width = max(int(math.ceil(ellipse.rx + ellipse.x) + 1), int(math.ceil(ellipse.ry + ellipse.y) + 1)) self.half_height = self.half_width self.width = self.half_width * 2 self.height = self.half_height * 2 self.cells = [[0 for x in range(self.width)] for y in range(self.height)] def display(self): codes = '0123456789abcdefghijklmnopqrstuvwxyz' print('\n'.join([''.join([codes[self.cells[y][x]] for x in range(self.width
🌐
Stack Exchange
math.stackexchange.com › questions › 3916149 › 5-set-scaled-venn-diagram
elementary set theory - 5-set scaled Venn diagram - Mathematics Stack Exchange
November 20, 2020 - In other words, I want each of the $32$ regions of the Venn diagram have an area proportional to the number of elements that belong to it. ... Now, more practical question: is there a (possibly, approximative) algorithm that would help to construct such a diagram? ... $\begingroup$ There are 5 set venn diagram images that you can use.
🌐
Reddit
reddit.com › r/learnmath › set theory : how to solve this question, i am not able to make a 5-set venn diagram ? is there any another way to solve this ?
r/learnmath on Reddit: Set theory : How to solve this question, I am not able to make a 5-set venn diagram ? is there any another way to solve this ?
June 18, 2023 -

There are 1000 students in a colony who play one or more game among Hockey, Golf, Badminton, Polo and Chess. 225 students play Badminton but not Hockey. 500 people play Hockey. 325 students played exactly three games and 225 students played exactly four games. All those students who play Golf do not play Polo. No student plays Golf alone. The number of students who play Polo, Badminton and Chess but not the other two is half the number of students who do not play Hockey but play Golf. Exactly 175 students play Hockey and at most one more game. All those students who play Chess also play Badminton.
Question :- How many only play Polo ?

🌐
Lucidchart
lucidchart.com › pages › tutorial › venn-diagram
What is a Venn Diagram - Ultimate Guide | Lucidchart
Comedy: On NBC’s Late Night with Seth Meyers, the comedian has a recurring routine called “Venn Diagrams,” comparing two seemingly unrelated items to find their funny commonality (he hopes.) Determine your goal. What are you comparing, and why? This will help you to define your sets. Brainstorm and list the items in your sets, either on paper or with a platform like Lucidchart. Now, use your diagram to compare and contrast the sets. You may see things in new ways and be able to make observations, choices, arguments or decisions.
🌐
ChatDiagram
chatdiagram.com › template › 5-circle-venn-diagram-template
Free 5 Circle Venn Diagram Template with AI Auto-Fill | No Signup
This 5 circle Venn diagram template shows the relationships and intersections between five distinct sets in a clear layout. It uses overlapping circles to display shared and unique attributes among the sets.
🌐
amCharts
amcharts.com › home › demos › complex venn diagram
Complex Venn Diagram - amCharts
December 4, 2023 - A Venn diagram is a visual representation that uses overlapping circles or ellipses to illustrate the relationships and commonalities between different sets or groups of items. Each circle represents a set, and the overlapping regions depict the intersections or shared elements between the sets.
🌐
draw.io
drawio.com › example-diagrams
Example draw.io diagrams and templates
Cabinet diagram (template library) | Download · Org chart template, modified to use waypoint shapes | Download · An org chart, generated from CSV and formatting data | Download · Concept map for UML 2.5 diagrams | Download · Mindmap of living beings (template library) | Download ·