Skip to main content

Pie Sparklines

Pie sparklines are small charts that show how a total value is divided among categories. Each slice represents the relative contribution of a category. They are useful when you need a quick, compact visual for comparing proportions without using a full-sized pie chart.

When to use pie sparklines

  • Displaying proportions: Show how each category contributes to a total, with each slice sized proportionally.
  • Simplifying comparisons: Compare parts of a whole across rows or time periods without using a full-sized chart.
  • Enhancing readability: Provide a compact, visual summary of distribution without showing raw numbers.

Create a pie sparkline

  1. On the Insert tab, select Sparklines.
  2. Under Pie Sparkline, select Insert Pie Sparkline. The Create Sparklines dialog opens.
  3. In Data Range, select a continuous range of cells (in the same row or column).
  4. In Location Range, select the cell where the sparkline will appear.
  5. Click Ok. The sparkline is inserted into the selected cell.

Edit a pie sparkline

  1. Select the pie sparkline in your workbook.
  2. On the Sparkline tab, select Settings. The PieSparkline Setting dialog opens.
  3. Set the parameters, then click Ok.
  4. Copy and paste the sparkline cell to duplicate the configuration in another location, as needed.

Pie sparkline parameters

The pie sparkline formula supports the following format:
=PIESPARKLINE(Percentage,color1,color2,...)

ParameterDescription
PercentageDefines the values used to determine slice size:

  • If a single cell is referenced, such as A1, its value is used as the percentage.
  • If a range is provided, such as A1:B3, each cell's value is divided by the sum of the range to calculate the percentage for each slice.
  • If a number is entered directly, such as 30% or 0.3, that value is used.
  • Invalid values are treated as 0.
Color1 to ColorN(Optional) Sets the color for each slice:

  • If there are more colors than values, extra colors are ignored.
  • If there are fewer colors than values, colors are reused and adjusted with a gradient to ensure contrast.
  • If no color is provided, the default is dark gray.