Excel cannot use words alone to set the sizes of pie-chart slices: slice sizes must come from numeric values. But you can use text as category labels by first counting or otherwise summarizing the text into numbers, then charting that summary. For example, count how often each response appears, select the category-and-count table, and choose Insert > Insert Pie or Doughnut Chart > 2-D Pie.
What “text data” means in a pie chart
A pie chart represents parts of a whole. Each slice needs a number that Excel can compare with the sum of the other numbers. Text such as product names, survey answers, or regions cannot provide that size by itself. Text can, however, identify what each numeric slice represents.
Suppose a column contains sales regions—East, West, North, and South—but no sales figures. A pie chart of the raw words would have no meaningful slice sizes. If the question is how many records belong to each region, count the words and chart those counts. If the question is what share of total sales each region generated, you need sales amounts as well as region labels; counting region names would answer a different question.
This distinction is the key to choosing a useful chart. A text column supplies categories; a numeric summary supplies values. The summary can represent counts, totals, averages, or another meaningful measure, depending on what you want the chart to communicate.
Turn text categories into counts with a formula
For a small dataset, a summary table with COUNTIF is straightforward. Imagine the text entries are in A2:A11:
- A2: East
- A3: West
- A4: East
- A5: North
- A6: West
- A7: East
- A8: South
- A9: North
- A10: West
- A11: East
Enter the headings Category and Count in D1 and E1. List East, West, North, and South in D2:D5. With the source text in A2:A11 and the category to count in D2, enter this in E2, then fill it down through E5:
=COUNTIF($A$2:$A$11,D2)
The results are East 4, West 3, North 2, and South 1, for a total of 10 records. The formula keeps the source range fixed as you fill down, while D2 changes to the category on each row. Select D1:E5 when you are ready to create the chart. If your list grows, expand the source range or convert the source data to an Excel Table so the summary can be maintained more easily.
COUNTIF is useful when you want a visible, editable summary and have a manageable category list. It counts exact category matches without distinguishing uppercase from lowercase. It does distinguish different text strings, so an extra space or a spelling variation can split what a person sees as one category into separate counts.
Use a PivotTable for a changing or larger list
A PivotTable is often more convenient when the source has many rows or categories that change over time. Select a cell in the data, choose Insert > PivotTable, confirm the table or range, and choose where to place the PivotTable. In the PivotTable Fields pane, drag the text field into Rows and drag that same field into Values. Excel will usually summarize a text field in Values by counting its entries.
If the Values area shows an unexpected calculation, open its field menu, choose Value Field Settings, and select Count. The resulting PivotTable lists each distinct text category and its frequency. You can select its category and count columns and insert a pie chart, or create a PivotChart from the PivotTable using the Insert options available in your Excel build. A PivotChart can respond to PivotTable filters, which is useful when the summary is part of a report.
PivotTables also make it easier to refresh a summary after adding records, though a source range may need to be updated if new rows fall outside it. Formatting, filtering, and refresh behavior can differ slightly across Excel for Windows, Mac, and the web. On Windows Microsoft 365, the paths above use the standard ribbon. On Mac, use the Insert tab for PivotTable and chart commands; ribbon labels and dialog layouts can vary by release.
Create the pie chart and show useful labels
For a normal chart based on the formula summary, select the summary table including its headers—for the example, D1:E5. On Windows in Microsoft 365, choose Insert > Insert Pie or Doughnut Chart > 2-D Pie. The chart uses the category text for its legend and the counts for slice sizes. On a Mac, use the Insert tab and select a pie-chart type; the precise gallery layout may differ, but the same two-column summary is suitable.
To put labels on the slices, select the chart and choose Chart Design > Add Chart Element > Data Labels, then choose a position such as Outside End. For more control, open More Data Label Options in the data-label options and select Category Name, Percentage, or Value as appropriate. If your goal is to show each category’s share, Category Name and Percentage are often clearer than repeating the raw count. Avoid displaying every label type if the chart becomes crowded.
The chart’s legend and data labels are separate ways to identify slices. A legend maps colors to categories; labels place information beside the corresponding slice. You can use one or both. For four categories, labels may make the chart easy to read without a legend. For many categories, labels can overlap, and a legend does not solve the deeper problem that a pie chart becomes hard to compare when there are too many slices.
Keep labels separate from numeric values
A common misunderstanding is that text labels are a substitute for values. In a chart’s source data, the category column tells Excel what a slice is called, while the value column determines its size. For example, a two-column table containing East and 4, West and 3, North and 2, and South and 1 is chartable because the second column is numeric.
Check that numbers are stored as numbers, not as text imported from another system. A value that looks like 125 may be text, in which case Excel might not treat it as a usable numeric chart value. If the imported text number is in B2, enter this in another cell and fill down as needed:
=VALUE(B2)
For a cell containing the text 125, this returns the numeric value 125. Depending on regional settings, text that uses unfamiliar decimal or thousands separators may need cleaning or conversion by another method before VALUE can interpret it. Once converted, use the numeric results as the chart values and retain the original text as labels only if it is meaningful.
Check data quality before charting
Category counts are only as reliable as the source text. These checks help prevent a chart that looks polished but represents messy input:
- Look for extra spaces. “East” and “East ” may be counted separately. Clean imported text before summarizing; Excel’s TRIM function can remove ordinary extra spaces when applied to a text cell.
- Standardize spelling and names. “N. region” and “North” become separate categories unless you map them to a common label.
- Decide what to do with blanks. A blank may mean missing information, or it may be a category worth reporting. Exclude it or label it clearly rather than letting it appear unexpectedly.
- Check the total. In a count chart, the sum of the category counts should agree with the number of included records. If it does not, check blanks, filters, and omitted categories.
- Confirm categories do not overlap. A pie chart implies that each record belongs to one part of a whole. If one record can belong to multiple categories, counts may add up to more than the number of records and the pie may mislead.
In a PivotTable, review any “(blank)” item and filters before building the chart. With a formula summary, ensure every category you intend to report appears in the summary list. COUNTIF will return zero for a listed category with no matches; that zero does not create a visible slice, but it can be useful for keeping a consistent set of categories across periods.
When a pie chart is—and is not—a good choice
A pie chart is most useful when the values are nonnegative parts of one meaningful total and the reader needs a quick sense of proportion. The regional counts in the example total 10, so East represents 40% of the records, West 30%, North 20%, and South 10%. Those percentages describe the distribution of the ten listed records, not regional sales or population unless the source data supports that interpretation.
Pie charts are less effective when there are many categories, several similarly sized slices, negative values, or values that do not form a meaningful whole. Zero values have no visible slice, and negative values cannot be communicated as ordinary positive portions of a pie. There is no universal maximum number of slices, but once labels and comparisons become difficult, a sorted bar chart is usually easier to interpret. A 2-D doughnut chart also needs numeric values and has the same basic part-to-whole limitations; it does not make text-only data chartable.
If the categories are text and the goal is to compare how often each occurs, a bar or column chart is a strong alternative. Bar lengths are easier to compare precisely, especially when one category is much smaller than another. If the goal is composition over time, a stacked column chart may be more appropriate, provided each period’s values are comparable and the visual does not become cluttered.
Common problems and practical fixes
If Excel inserts a chart with the wrong slices or labels, first verify the selected range. Include one text category column and one numeric value column, with headers if possible. If you select only the text column, Excel has no numeric series to use. If you select unrelated columns, it may interpret rows or columns differently than intended. Use Chart Design > Select Data to inspect or adjust the chart’s data range and series when necessary.
If every category appears as one slice or the chart has no useful proportions, inspect the values column. It may contain text numbers, blanks, or a formula returning text. Confirm that the summary numbers are numeric and that the total is greater than zero. If the chart shows “1” repeatedly, you may have charted individual records or a field that Excel is counting rather than charting the intended summary.
If two versions of a category appear, inspect spaces, punctuation, and spelling in the source, then clean or standardize the entries and refresh the PivotTable or recalculate the formula summary. Do not simply rename a chart label if the underlying counts still split one real-world category into several entries: correct the source or create a deliberate mapping table first.
Frequently Asked Questions
Can Excel make a pie chart from text alone?
No. Excel needs numeric values to determine slice sizes. You can use text for category names, then count or otherwise summarize those categories into numbers before inserting the chart.
How do I count text entries for a pie chart?
Make a list of the categories, use COUNTIF to count each category in the source column, and chart the category-and-count summary. For a larger dataset, a PivotTable with the text field in Rows and Values can produce the counts.
Can a pie chart show words instead of numbers?
Yes. Words can appear as category labels or data labels. The slice sizes still come from numeric values, and you can choose to display category names, percentages, values, or a combination in the data-label options.
Why is my pie chart blank or missing slices?
Check that the value range contains numbers rather than text, that it is included in the selected chart range, and that the total is not zero. A category with a zero count has no visible slice; blanks and filters can also affect what is included.
Should I use a pie chart or a bar chart for text categories?
Use a pie chart when a small set of nonnegative values represents parts of one whole. Use a bar chart when you need to compare category counts or values accurately, especially with many categories or similarly sized slices.
Related
- Excel 2016: How to Freeze Panes and Keep Headers Visible
- Excel Not Responding? Causes and Fixes
- How to Enter a Page Break in Excel and Control Printing
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Google Sheets Pivot Tables: Create, Edit, and AnalyzeYes. In Google Sheets, select a range of data and choose Insert > Pivot table, then use the…
- Excel Chart Logarithmic Scale: Setup and TroubleshootingTo add a logarithmic scale to an Excel chart in Microsoft 365 for Windows, select the chart’s numeric…
- Bar Chart Formula in Excel: How to Create OneThere is no special Excel formula that creates a bar chart: a chart is an object you insert…
- Excel Pie Chart Percentages: Show and Calculate ThemTo show percentages on an Excel pie chart, select the chart, then choose Chart Design > Add Chart…
- Excel Line Chart With Multiple Series: A Step-by-Step GuideTo create a line chart with multiple series in Excel for Microsoft 365 on Windows, arrange each series…
- Google Sheets Chart Annotations: Labels, Notes, and TipsYes—you can annotate a chart in Google Sheets by turning on data labels, adding a chart title or…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.