A pie chart shows how a whole is divided into parts. Each slice represents a category's share of the total, so you can see which categories account for the largest and smallest portions.
Say you want to show how customers are distributed across subscription plans. A pie chart can tell you whether one plan accounts for most customers or whether the customer base is divided more evenly. But if you need to compare two plans that differ by just a few percentage points, the slices make that harder than it should be.
That's the limitation to understand before making one. Pie charts work well for a small number of categories with clear differences. They become less useful when the values are similar, the categories multiply, or you want to compare how proportions change.
We'll look at when pie charts work, when a bar chart is the better choice, how donut charts compare, and how to make one using your own data. We’ll use interactive Deepnote charts built from public datasets, alongside fictional examples illustrating common mistakes and clearer alternatives.
What is a pie chart?
A pie chart is a circular chart divided into slices that represent parts of a whole. The full circle represents 100% of a total, and each slice occupies an angle proportional to its category's share.
Pie chart key components & parts
- One complete whole: The circle represents a defined total, such as all recorded transactions or all customers in a selected group.
- One slice per category: Each category contributes a nonnegative amount, and the categories do not overlap.
- Proportional slice sizes: Each slice’s angle represents its share of the total. A 25% share occupies one-quarter of the circle.
- Shares totaling 100%: The underlying proportions account for the whole, although rounded labels may total slightly more or less.
- Clear labels: The title identifies the total being divided, while slice labels identify the categories and their shares.
For example, suppose we're looking at restaurant bills recorded across four days of the week. The tips dataset contains 244 bills, distributed as follows:
Day | Bills | Share |
|---|---|---|
Saturday | 87 | 35.7% |
Sunday | 76 | 31.1% |
Thursday | 62 | 25.4% |
Friday | 19 | 7.8% |
Total | 244 | 100% |
Saturday has the largest slice, accounting for about 36% of the recorded bills. Friday has the smallest, representing approximately 8%.
Calculate each share by dividing the category count by the total and multiplying by 100. Saturday accounts for 87 of the 244 bills: 87 ÷ 244 × 100 ≈ 35.7%.
What should count as the whole?
Before making a pie chart, define the total you're dividing.
In our restaurant example, the whole is 244 recorded bills. Each bill belongs to one of the four day categories, so the slices partition the dataset without overlap.
Now imagine a customer survey asking which tools respondents use. Some customers use Python and SQL, while others use both.
If we create separate slices for Python users and SQL users, those groups overlap. Adding their counts would double-count some respondents.
A conventional pie chart cannot represent those categories as separate, nonoverlapping slices without first defining mutually exclusive combinations.
This is why the denominator matters as much as the percentages. A chart titled "Customer distribution by plan" should make it clear whether the whole includes all customers, only paying customers, or another defined group.
If the categories don't form a complete, nonoverlapping partition of the whole, reconsider the chart or change how the data is grouped.
Pie chart use cases
Use a pie chart when the main question is how a single total is divided among a few categories.
Use case | Example question | What the whole represents |
|---|---|---|
Subscription mix | What share of customers belongs to each plan? | Customers assigned to one plan each |
Budget allocation | How is the approved budget divided among departments? | The complete budget for the stated period |
Survey results | What share of respondents chose each answer? | Responses to a single-choice question |
Incident severity | How are incidents divided across severity levels? | Incidents assigned one severity level each |
Transaction composition | What share of recorded bills falls on each service day? | All bills included in the dataset |
Five or fewer slices is a useful starting guideline, not a fixed limit. Pie charts work best when the main differences are easy to see and readers need an overview of one distribution.
For close comparisons, use a bar chart. For overlapping categories, use a Venn diagram or a table. To compare composition across several periods, consider 100% stacked bars.
When pie charts don't work, and what to use instead
Pie charts are familiar, which probably explains why they appear in so many dashboards and presentations. Familiarity doesn't make them the best choice for every categorical dataset.
The main problem is that people find it harder to compare angles and areas accurately than lengths aligned to a common baseline.
That limitation becomes especially noticeable when the slices are similar.
When the values are close together
Return to our restaurant dataset. Saturday accounts for 35.7% of bills, while Sunday accounts for 31.1%.
The difference is 11 bills, or about 4.5 percentage points using the unrounded shares.
You can probably tell which slice is larger, but estimating that difference from the angles is difficult.
The bar chart uses the same 244 observations. Saturday's 87 bills and Sunday's 76 can now be compared along a shared numerical scale.
The difference of 11 bills is easy to identify.
Use the bar graph maker when readers need to rank categories or compare their values precisely.
When there are too many categories
A pie chart with 12 categories can produce several thin slices, crowded labels, and a legend that readers have to keep consulting.
Even when the percentages add up correctly, the chart becomes difficult to interpret.
Consider 1,000 fictional support tickets across 15 issue types. Login issues account for 30%, while the remaining categories each account for 3% to 9%. Sorted horizontal bars make those smaller categories easier to compare.
You could combine minor categories into an "Other" slice, but only if the grouping is meaningful and documented. Don't hide important categories simply to make the pie look cleaner.
A horizontal bar chart is usually the safer option when the number of categories grows.
When categories overlap
In the fictional example below, 20 of 100 customers use both tools. That leaves 40 using only Python, 25 using only SQL, and 15 using neither. The Venn diagram preserves those overlaps; the pie incorrectly treats tool selections as separate customers.
Those percentages can add up to more than 100% because the categories aren't mutually exclusive.
Drawing them as slices of one pie would misrepresent the underlying data.
For overlapping groups, use a Venn diagram when there are only a few sets. For larger analyses, consider a table or an intersection chart.
If the categories describe independent characteristics, such as customer age groups and subscription plans, don't combine them into a pie unless you've defined a single categorical grouping.
When you need to show change over time
A pie chart can show the composition of revenue in one month. Showing 12 pies for 12 months is much harder to interpret.
The slices move around, change size, and force readers to compare angles across separate circles.
A 100% stacked bar chart is often a better fit when you want to compare proportions across periods. Each bar represents one period, and every bar totals 100%.
For example, a subscription business could use 100% stacked bars to show the percentage of customers on Free, Team, and Enterprise plans each quarter.
If both the proportions and absolute totals matter, ordinary stacked bars may be more informative because their complete lengths preserve total size.
When only a few percentage points matter
Sometimes the problem isn't the number of categories. It's the precision required.
Suppose three campaigns convert 12.2%, 12.8%, and 13.1% of their visitors. Each campaign has its own denominator, so these rates cannot form three slices of one pie. Separate pies showing converted and nonconverted visitors would be valid, but the small differences would remain difficult to compare.
A dot plot places the rates on a shared numerical axis, making the differences easier to read. It shows the observed rates, not whether the differences are statistically significant.
You can use the dot plot maker for this type of precise categorical comparison.
The rule we follow is simple: choose a pie chart to communicate a composition at a glance. If the reader needs to compare close values, investigate overlap, or follow changes, another chart will usually do the job better.
Common variants of a pie chart
Pie-chart variants change the presentation of the slices, but they still need categories that form one complete, nonoverlapping whole. The examples below use the same 244 restaurant bills so the effects of each design are easy to compare.
Donut chart
A donut chart, also spelled doughnut chart, leaves a hole in the center of the pie. The segments show the same proportions, while the center provides space for a useful summary.
Here, the center displays the total of 244 bills. Saturday remains the largest segment and Friday the smallest.
Choose a donut when that central summary is useful. It does not solve the difficulty of comparing similar shares; a bar chart is still clearer when small differences matter.
Exploded pie chart
An exploded pie chart pulls one or more slices slightly away from the center. This draws attention to a category without changing its underlying value.
In this example, Saturday’s slice is pulled outward to highlight its 87 bills, or 35.7% of the total.
Use this effect sparingly. Separating a slice gives it extra visual emphasis, so readers may give it more importance than its share warrants. A direct label or short annotation will often highlight the category more clearly.
3D pie chart
A 3D pie chart adds depth and usually tilts the circle. We do not recommend it for communicating proportions.
Perspective changes how the slices appear: those near the front can look more prominent, while those at the back are compressed or partly hidden. The added depth represents no additional data.
Both charts contain exactly the same values. The flat version provides the cleaner view because readers do not have to separate the data from the perspective effect.
For an ordinary composition chart, use a flat pie or donut. If precise comparisons matter, use bars.
How to read and label a pie chart properly
A well-labeled pie chart should communicate its denominator, categories, and proportions without making readers work through a large legend.
Start with the total
Ask what the complete circle represents.
Is it all customers, all revenue, all recorded transactions, or only a subset of the data?
In the restaurant example, the title refers to 244 recorded bills. That helps readers understand the percentages correctly.
Without this context, "35.7% on Saturday" could refer to bills, sales revenue, diners, or something else.
Read the labels and percentages
Use direct category labels where possible. For a small chart, placing the category name and percentage on or near each slice reduces the need to match colors to a separate legend.
Avoid showing several decimal places unless that precision is necessary.
For example, 35.7% is appropriate for the Saturday share. Displaying 35.6557377% wouldn't help readers interpret the result.
Rounding may cause displayed percentages to add up to 99.9% or 100.1%. That's normal when individual values are rounded independently, although the underlying values should still sum to the intended total.
Keep categories in a stable order
Sorting slices from largest to smallest often makes the composition easier to follow.
If categories have a meaningful order, such as stages of a process, preserving that sequence may be more important.
For related charts, keep category colors consistent. A subscription tier shouldn't appear blue in one chart and orange in the next without a reason.
Avoid decorative effects that change perception
We recommend a flat chart with a straightforward color palette.
Color should support identification, and labels should remain understandable without relying on color alone.
Check how the data was aggregated
A pie chart showing percentages from a summarized dataset can conceal mistakes in the source data.
For example, if the same transaction appears twice, its category's share may be overstated.
Before charting, confirm that the categories are mutually exclusive, the records haven't been duplicated, and the denominator reflects the intended analysis.
An attractive pie chart doesn't compensate for an incorrect total.
Pie chart examples with real data
The examples below use public datasets. Each one illustrates a different decision about composition, labeling, or choosing a clearer alternative.
Weekend vs. Thursday–Friday bills
The tips dataset contains 244 restaurant bills recorded across Thursday, Friday, Saturday, and Sunday. Earlier, we examined each day's share separately. Here, we can combine those observations into two groups to compare their proportions.
Saturday and Sunday account for 163 bills, or 66.8% of the dataset. The remaining 81 bills were recorded on Thursday and Friday.
That does not establish that the restaurant was busier on weekends in general. The data doesn't provide a complete history of its business activity or guarantee representative sampling across days.
The chart is useful because the categories form a complete partition and the differences are substantial enough to see.
Penguin observations across islands
The Palmer Penguins dataset contains 344 observations from three islands in Antarctica.
The counts are 168 from Biscoe, 124 from Dream, and 52 from Torgersen.
Biscoe accounts for approximately 48.8% of the records, Dream for 36.0%, and Torgersen for 15.1%.
Three slices are manageable, and their sizes communicate the composition clearly.
Again, these percentages describe the research dataset. They do not represent the distribution of all penguins across Antarctica.
If we wanted to compare the precise number of observations on each island, a bar chart would make those differences easier to read.
Country records by continent
Our third example comes from Gapminder's historical dataset.
For 2007, the extract includes 142 countries divided across five continent categories.
Africa accounts for 52 records, Asia for 33, Europe for 30, the Americas for 25, and Oceania for two.
The chart exposes a limitation of pie charts: Oceania's share is approximately 1.4%. Its slice is so narrow that it can be difficult to identify without a label.
Now compare the same values as horizontal bars.
The bars share a common zero baseline, making their lengths easier to compare.
This doesn't mean the original pie was incorrect. It means its visual encoding was less effective for the question we wanted to answer.
The denominator also matters. These are country records in the Gapminder extract, so the percentages do not represent the world's population by continent.
How to make a pie chart
You can make a pie chart in Deepnote, Excel, or another charting tool. The calculation is straightforward, but choosing the correct categories and checking the total should come before adjusting colors or labels.
Make a pie chart with Deepnote Agent
In Deepnote’s pie chart maker, give Agent the dataset and chart requirements in one request. It can count the categories and calculate their shares before creating the chart.
This example loads the restaurant-bill dataset through Plotly, so there is no file to prepare or upload:
Load the restaurant-bill dataset using
plotly.express.data.tips(). Treat each row as one recorded bill.Count the bills by day and calculate each day's percentage of all records. Count rows rather than summing total_bill or tip. Check for missing day values before calculating the shares.
Create an interactive, flat 2D pie chart titled “Restaurant bills by day.” Label each slice with the day and percentage to one decimal place, and show the bill count on hover. Order the slices from largest to smallest. Do not explode the slices or add 3D effects.
Show the count-and-percentage table below the chart. Verify that the day counts sum to 244 and that the unrounded percentages total 100%. Note that these shares describe the recorded bills, not the restaurant’s overall activity or revenue.
The table should show 87 Saturday bills, 76 Sunday bills, 62 Thursday bills, and 19 Friday bills. These counts divide the 244 records into four nonoverlapping groups.
To change the presentation, ask:
Convert the pie to a donut chart and place “244 bills” in the center. Keep the category counts, percentages, order, and colors unchanged.
The notebook keeps the counting and percentage calculations alongside the chart, so teammates can check the denominator and revise the analysis.
Make a pie chart in Excel
Deepnote offers a more direct workflow when the task includes preparing data and calculating shares. If your categories and values are already organized in an Excel workbook, you can also use its built-in pie chart.
Arrange your categories in one column and their values in another. Select the range, open the Insert tab, and choose a pie chart.
From there, you can add percentage labels, adjust colors, and change the chart title. Excel also supports doughnut charts and additional pie variants.
For detailed instructions, including label formatting, doughnut charts, and Google Sheets alternatives, see our guide on how to make a pie chart in Excel and other tools.
Make a pie chart from your data
Before creating a pie chart, check that the categories add up to a meaningful whole and that the differences are large enough to communicate through slices.
Use bars for precise category comparisons, 100% stacked bars for changing composition, and lines for trends over time.
In Deepnote’s AI chart generator, include the values or name a dataset Agent can load, then describe the composition you want to show. Ask it to calculate the shares and check the total before refining the chart.
For a broader look at which visualization works for which question, see our guide to the 31 types of graphs and charts.