What is a data range in a Google Sheets pie chart?
The data range is the set of cells a Google Sheets chart reads. For a pie chart that means one column of labels and one column of positive numbers, which you set under Setup in the chart editor.
Updated · 4 min read
What the data range is in a pie chart
Short answer: whatever sits inside the range becomes slices, and anything outside it is ignored. Google's own help puts it in one line: the data range is "the set of cells you want to include in your chart".
A pie chart needs two things from that range. Google's pie chart page sets out the layout:
- First column: a label or category for each row.
- Second column: positive numbers. A header name in the first row is optional.
- Rows: each row is one slice.
That is the whole recipe. Most pie charts that look wrong have a range problem, and the chart settings are fine.
How to set or change the data range
To make the chart, select the cells, then click Insert, then Chart. The chart editor opens at the right.
To change the range later, on a computer:
- Double-click the chart.
- At the right, click Setup.
- Under "Data range", click the Grid icon.
- Select the cells you want in the chart.
- Click OK.
The same step has an Add another range button for adding cells from somewhere else in the sheet. For the full walk-through from a blank sheet, see how to make a chart in Google Sheets.
What a good pie chart range looks like
The range has a header row on top, labels down the left and numbers beside them. There are no totals, no gaps and no extra columns. Here is a monthly budget set out that way, so the range is A1:B6:
| Item | Amount (£) |
|---|---|
| Rent | 1200 |
| Food | 400 |
| Bills | 250 |
| Fun | 200 |
| Transport | 150 |
Five rows give five slices, and together they make up the whole budget, which is what a pie is for.
Rent takes over half of a £2,200 monthly budget
Monthly spending by item, £
Rent is the largest slice at 55% (1,200 of 2,200), then food at 18%. The smallest is transport at 7%.
Source: Sample data
| Item | Amount, £ | Share |
|---|---|---|
| Rent | 1,200 | 54.5% |
| Food | 400 | 18.2% |
| Bills | 250 | 11.4% |
| Fun | 200 | 9.1% |
| Transport | 150 | 6.8% |
Not sure a pie is the right choice at all? Try the chart picker.
Why a pie chart looks wrong: common range mistakes
When the slices look off, check the range for these four things.
A totals row. If the range reaches down to a "Total" line, Sheets treats it as one more category. The total equals all the other rows added together, so it takes exactly half the pie.
Include the Total row and it takes exactly half the pie
The same budget with the £2,200 total left in the range
Total is the largest slice at 50% (2,200 of 4,400), then rent at 27%. The smallest is transport at 3%.
Source: Sample data
| Item | Amount, £ | Share |
|---|---|---|
| Total | 2,200 | 50% |
| Rent | 1,200 | 27.3% |
| Food | 400 | 9.1% |
| Bills | 250 | 5.7% |
| Fun | 200 | 4.5% |
| Transport | 150 | 3.4% |
Text in the number column. Google asks for numeric data in the second column. A cell like "about 400" or "TBC" is text, so it has no size to draw. Retype it as a plain number.
Blanks, zeros and negatives. Google's pie page says a value of 0 or below won't show up in the chart. A blank cell gives that row nothing to draw either. If a category is missing from the pie, check its value first.
Extra columns. Google's pie layout has exactly two columns. If a third column, such as last year's figures or notes, sits inside the range, take it out. A pie shows one set of numbers. Two sets need a different chart: see best chart for comparison.
Pie charts with text-only data: count first, then chart
Form results often come as a column of words: Yes, No, Maybe. A pie chart cannot size a slice from words. It needs a count for each answer.
- In a spare area, list each answer once: Yes, No, Maybe.
- Next to each, count it with COUNTIF. For example,
=COUNTIF(B2:B200,"Yes")counts the cells in B2:B200 that say Yes. - Set the chart's data range to that small table, with the answers in the first column and the counts in the second.
The chart reads the counts, and the raw responses stay where they are.
Data range, labels and series: how they relate
The data range is the whole block of cells. Inside it, the first column supplies the labels, which are the slice names in the legend. The second column is the series: the one set of numbers the slices are sized from. Google describes a pie as comparing "parts of a single data series to the whole". Change the range and the labels and series change with it.
Two documented options in Setup change how Sheets reads the range:
- Switch rows / columns helps when your categories run across a row instead of down a column.
- Use row N as headers treats the top row as names, not as a slice.
Google's help does not describe the separate label and series boxes in the pie chart Setup tab, so the steps above stick to the data range. To show percentages or values on the slices, click Customize, then Pie chart, and choose an option under "Slice label". Google's page does not list what each option shows.
Skip the range setup: make the pie chart in Chartsmade
If you would rather not set up a range, there is a faster route. Chartsmade does not edit a Sheets chart. You paste the two columns or a CSV into the pie chart maker, pick a suggested chart, then download a PNG or SVG or share a live embed. Pie and donut charts take up to 12 slices, and the smallest fold into "Other", so a long tail stays readable. It is free to start, and free downloads carry a small "Made with Chartsmade" line. For a ring, use the donut chart maker.
If you stay in Sheets, here is how to save a Google Sheets chart as an image.
Questions
- What is a data range in a Google Sheets pie chart?
- It is the set of cells the chart reads. For a pie chart Google asks for labels in the first column and positive numbers in the second, with each row becoming one slice.
- How do I change the data range of a chart in Google Sheets?
- Double-click the chart, click Setup, then click the Grid icon under Data range. Select the cells you want and click OK.
- Why does my Google Sheets pie chart show the wrong slices or a total slice?
- The range usually includes something that is not a category. A Total row becomes its own slice and takes half the pie. Text, blanks, zeros or negative numbers in the value column leave slices missing. Trim the range to the label and number columns only.
- Can a Google Sheets pie chart use non-adjacent columns?
- Google documents an Add another range button in the data range steps, which adds cells from elsewhere in the sheet. If the slices still come out wrong, copy the label and number columns side by side and chart those.
- How do I make a pie chart from text responses such as a Google Form?
- Count the answers first. List each answer once, use COUNTIF to count how often it appears, then set the data range to that small summary table.