Excel Pie Chart: Exclude Zero Values and Empty Slices

Charts & pivot tables · Updated November 3, 2026

Excel Pie Chart: Exclude Zero Values and Empty Slices

Excel pie charts automatically omit zero values as slices, so you usually do not need to change a setting. If you also want to remove zero-value categories from the legend, labels, or chart source, filter those rows or build a separate range that excludes them.

What happens to zero values in an Excel pie chart

A pie chart represents each value as a share of the whole. A value of zero has no share, so Excel draws no wedge for it. For example, if a chart uses sales of 40, 25, and 0, the visible pie has two slices: one for 40 and one for 25. The zero does not create a thin or invisible slice that changes the proportions.

That does not always mean Excel has removed the category from the chart’s underlying data. The source range can still include its row, and a legend or data-label setup may still show the category in some circumstances. This is the key distinction: a zero slice is omitted automatically, while removing the category itself may require changing or filtering the source data.

If every value in the selected range is zero, Excel has no positive share to draw. The chart may appear empty or show only chart elements such as a title or legend. That is different from a chart that has one zero category alongside nonzero values.

Make a basic pie chart that skips zero slices

For the usual case, create the chart from the category names and numeric values. Excel will leave out zero-sized slices without needing a special option.

  1. Arrange category names in one column and their values in the next, with a header row if useful.
  2. Select the category and value cells, including headers if you want Excel to use them.
  3. Choose Insert > Insert Pie or Doughnut Chart > 2-D Pie.
  4. Add or adjust a title, legend, or data labels from the chart tabs if needed.

For example, a small table with “North” at 40, “South” at 25, and “West” at 0 produces slices for North and South only. If a value later changes from zero to a positive number, the slice appears when the chart recalculates. If it changes back to zero, that slice disappears.

Remove zero categories from the chart source

Sometimes the goal is not just to hide a slice. You may want the legend to list only categories with values, or you may be preparing a clean chart for a report. The straightforward method is to filter the source rows so zero-value rows are hidden.

  1. Keep each category and its value on the same row, and select the data range.
  2. Choose Data > Filter to add filter controls to the headings. If the data is already an Excel table, use its existing heading filters.
  3. Open the filter on the value column and clear the selection for 0, or use the number filter option to show values that are not equal to 0.
  4. Create the pie chart from the range, or check the existing chart. Filtered-out rows are normally omitted from charts.

If hidden rows still appear, select the chart and choose Chart Design > Select Data > Hidden and Empty Cells. Make sure Show data in hidden rows and columns is not selected. If it is selected, Excel can include data from rows hidden by a filter. The desktop Windows version of Microsoft 365 has this control; the dialog’s presentation can vary slightly in Excel for Mac, and Excel for the web may offer fewer chart controls.

Filtering changes what is displayed without deleting the original records. That makes it useful for a chart that should respond as you include or exclude categories. Keep in mind that filters affect other views of the same table too, so clear the filter when you want to see all rows again.

Use a helper column when you need a separate chart range

A helper column can be useful when the original data must remain untouched and you want the chart to ignore zero values. It also makes the chart’s calculation logic visible to anyone reviewing the workbook. Use this when filtering the source table is inconvenient, but remember that a helper value alone may not remove a category from every legend or label configuration.

Assume category names are in A2:A6 and numeric values are in B2:B6. Enter this formula in C2, then fill it down through C6:

=IF(B2=0,NA(),B2)

The formula returns the original number when it is nonzero and returns the #N/A error when it is zero. Excel charts generally do not plot #N/A as a pie slice. Build the chart using the category names in column A and the helper values in column C, rather than the original values in column B. For example, if B2:B6 contains 40, 25, 0, 15, and 0, the helper column supplies chartable values of 40, 25, 15 and #N/A for the two zero rows; the pie’s visible values total 80.

Do not replace zeros with empty text just to suppress slices unless that is intentional. A formula that returns an empty string can behave differently from a genuinely blank cell in other calculations and displays. Also, if the category names remain in the selected source range, the legend may still retain a category depending on chart setup. Filtering the rows or creating a compact list of nonzero categories is better when you need a fully clean legend.

Zeros, blanks, text, and formulas are different

Excel treats a numeric zero, an empty cell, text that looks like zero, and a formula returning an empty string as different inputs. They can look similar on a worksheet, but charts and filters may respond differently.

  • Numeric 0: A zero-sized slice is omitted from a pie chart.
  • Genuinely blank cell: It has no numeric slice. Blank-cell handling can be adjusted in the chart’s Hidden and Empty Cells dialog, although the available choices are most meaningful for chart types with continuous data.
  • Text such as “0”: This is not the numeric value zero. It may be treated as a label or ignored as nonnumeric data rather than as a zero-value category.
  • Formula returning an empty string: The cell looks empty but contains a formula. It is not the same as a truly blank cell, so test the chart when formulas generate the source values.

If a number that looks like zero is not being filtered as expected, check whether it is stored as text. Select the cell and inspect the formula bar, or use a numeric filter and verify the source values. If the data comes from formulas, check the formulas and their results rather than relying only on how the cells are formatted.

Why a zero category may still seem to appear

A common misconception is that Excel must delete a zero row for it to be excluded. It does not: the row can remain in the source while its zero-sized slice is absent. The apparent problem is often a legend entry, a category label, or a data table that still reflects the source categories.

Check these items if the chart does not look right:

  • Confirm the cell is truly zero. A small positive value such as 0.004 may display as 0 because the worksheet uses a rounded number format. The chart can still draw a very small slice. Increase the displayed decimal places or inspect the formula-bar value.
  • Check which range the chart uses. Select the chart and open Chart Design > Select Data. Confirm that the value series points to the intended cells and that the category labels are in the expected range.
  • Check filters and hidden-row settings. A chart configured to show hidden rows and columns can include data hidden by a filter.
  • Review data labels. Labels can include category names, values, and percentages. Remove or adjust labels if the chart looks cluttered, but remember that hiding a label does not remove its source row.
  • Look for negative values. A pie chart is designed to show parts of a positive whole. If the source includes negative or mixed-sign numbers, do not assume the chart communicates them meaningfully; correct or restructure the data, or choose another chart type.

Choose the right method for a clean result

Use the method that matches what “exclude” means for your chart. If all you need is to prevent a zero-sized wedge, use the original data and let Excel omit it. That keeps the chart simple and preserves the source range.

If the legend should also omit zero categories, filter the source rows and ensure hidden rows are not included. If you need to retain the original table and create an independent chart input, use a helper column with NA() or make a separate nonzero-only list. Then inspect the legend and labels, because suppressing a plotted value is not always the same as removing its category from the chart’s structure.

For a presentation where the exact set of categories matters, a filtered range is usually easiest to explain and maintain. A pie chart is most useful when there are a few categories that form a meaningful whole. If there are many categories, tiny nonzero values, or values that are not parts of one total, a bar or column chart may make comparisons clearer.

Frequently Asked Questions

Does Excel automatically exclude zero values from a pie chart?
Yes. A numeric zero has no share of the total, so Excel draws no slice for it. The source row can remain, however, and may still affect the legend or labels depending on the chart setup.

How do I remove zero values from the pie chart legend?
Filter the source data to show only nonzero rows, and make sure Show data in hidden rows and columns is turned off in the chart’s Hidden and Empty Cells settings. Review the legend after filtering, since chart labels and source categories are separate elements.

Why does a value displayed as 0 still make a slice?
The underlying value may be a small positive decimal rounded to zero by the cell’s number format. Increase the displayed decimal places or inspect the actual value in the formula bar. A value that is truly zero will not produce a slice.

Can I hide zero values without deleting the original data?
Yes. Filter the source rows, or use a separate helper range for the chart. Both approaches leave the original records available; filtering hides rows, while a helper range supplies a different set of chart values.

What if every value in the chart is zero?
Excel cannot draw meaningful pie slices when the total is zero. Check whether the source range is correct and whether the values are genuinely zero. If there is no positive total to represent, use a message or a different visual instead of an empty pie.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.