In Excel for Microsoft 365 on Windows, box-and-whisker plot x-axis labels usually come from the headers above each group of data. Put each group in its own column, enter its label in the top cell, and include those header cells when you create the chart; to change labels later, select the chart and use Chart Design > Select Data to edit the Horizontal (Category) Axis Labels range.
What the x-axis labels represent
A box-and-whisker chart summarizes the distribution of values in one or more groups. Each box represents a group, such as a department, product, or month. The x-axis labels identify those groups; they are not labels for every individual observation in the source data. The values themselves determine the box, median line, whiskers, and any displayed outlier points.
For example, suppose you have test scores for three classes. If the scores for Class A, Class B, and Class C are in three columns, those class names belong in the header cells above the scores. Excel uses the headers as the categories along the bottom axis. Without useful headers, Excel may show generic names such as Series 1 or Series 2, or it may interpret the selected cells in an unexpected way.
This distinction matters because a box plot reduces many observations to a summary for each group. If you want to compare the distributions of several groups, the category labels should describe those groups, not the students or measurements that contributed values to them.
Arrange data so Excel can identify categories
The most dependable layout is one column per group, with a descriptive header in the first row and the observations below it. The groups do not need to contain exactly the same number of observations, though a clear rectangular range is easiest to select. For instance, put North, Central, and South in B1, C1, and D1, then put each region’s measurements below its heading.
Leave the group names in the header row and avoid inserting a title row inside the data range. A worksheet title above the table is fine if you do not include it in the chart selection. If the data are arranged in rows instead, each group may be represented by a row and its row heading may become the category name; the result depends on Excel’s interpretation of the orientation.
- Use short, distinct headers such as North, Central, and South.
- Keep one observation per cell in the group’s column or row.
- Do not put the group name in every observation cell; a single header is sufficient.
- Exclude unrelated notes, totals, and worksheet titles from the selected chart data.
For a new chart, select the data including its headers, then choose Insert > Insert Statistic Chart > Box and Whisker. If Excel treats the layout in the wrong direction, select the chart and choose Chart Design > Switch Row/Column. Check the result after switching: the category names should identify the groups whose distributions you intend to compare.
Change the labels on an existing chart
When a chart already exists, first check the source range rather than retyping labels on the chart. Select the chart, go to Chart Design > Select Data, and look for Horizontal (Category) Axis Labels in the dialog. Choose Edit, select the worksheet cells containing the intended group names, and confirm. The exact dialog arrangement can vary with the chart and Excel build, but the key is to point the category-label range to the cells that contain the headings.
- Click the box-and-whisker chart so the Chart Design tab appears.
- Choose Chart Design > Select Data.
- Under Horizontal (Category) Axis Labels, choose Edit.
- Select the cells containing the desired names, without including the data values unless they are genuinely part of the labels.
- Confirm the selection and check that each label matches the corresponding box.
If the chart has no separate category-label range to edit, or the categories are still wrong, check its data orientation and source selection. Chart Design > Switch Row/Column can correct a rows-versus-columns interpretation. If that does not help, rebuild the chart from a clean range with one group per column and headers included. Avoid editing the underlying values just to force a label change; that can change the statistics shown by the chart.
Format crowded or hard-to-read labels
Correct labels can still be difficult to read when there are many groups or long names. Select the horizontal axis, right-click it, and choose Format Axis. Under Axis Options, look for the label interval setting and show labels at a wider interval if displaying every name would make them overlap. This hides some text labels, not the data categories themselves, so use it only when the chart remains understandable without every name printed.
For a smaller number of long labels, make the chart wider, shorten the source headings, or rotate the text. In the Format Axis pane, the Text Options and Text Box controls provide text-direction or angle settings in supported desktop versions. The precise control placement can vary by build. If rotated text is awkward to scan, use concise labels and explain abbreviations in a chart note instead.
You can also add a horizontal axis title when readers need more context about what the categories mean. Select the chart and choose Chart Design > Add Chart Element > Axis Titles > Primary Horizontal, then type a brief description. The axis title describes the category dimension, such as Region or Treatment Group; it does not replace the individual labels beneath the boxes.
Why labels may appear as Series 1 or disappear
Generic labels commonly mean Excel did not recognize the header cells, or the selected range did not include them. Return to Select Data and inspect the category-label range. If it points only to the measurement cells, edit it to include the cells containing the names. Also check whether the first row or column contains numbers that Excel might treat as observations rather than text headings.
Other problems have different causes:
- The categories are in the wrong order: Check the order of the source columns or rows. Reordering categories usually means reordering the source data.
- One label is missing: Check for a blank header cell, a shortened label range, or a category with no usable values.
- Labels show numbers or dates unexpectedly: Excel may be reading those cells as category text or formatting them as dates. Review the source cells and the selected label range.
- Every box has the same label: The category range may contain one repeated value, or the chart may be using a single category. Correct the source labels or switch the data orientation.
- Labels overlap: Widen the chart, shorten the headings, rotate them, or display fewer labels with an interval setting.
Do not confuse the legend with the x-axis labels. The legend identifies plotted series, while the horizontal axis identifies categories. In a box plot, the chart’s treatment of series and categories depends on how the data are organized; if one appears where the other is expected, confirm the row-and-column layout and use Switch Row/Column as needed.
How labels relate to box-plot statistics
Changing a category label changes how a group is named, not its distribution. The plotted statistics still come from the observations assigned to that category. Excel’s box-and-whisker chart can show a median, quartiles, whiskers, and optionally inner points or outlier points, depending on its formatting choices. The label tells readers which set of observations those marks summarize.
This is also why a label range should have the same number of names as the chart has categories. If there are three data groups but only two labels, the chart cannot provide a meaningful name for every group. A mismatched range can lead to blank, repeated, or misleading category text. Verify both the number and order of headings against the groups in the chart.
One common misconception is that Excel can use a separate text column of labels to name every individual value in a box. A standard box plot does not display one x-axis category for each observation: it groups observations and plots a distribution summary. If each point needs its own label, a box plot may not be the right chart type; a scatter plot or another chart that shows individual observations may be more appropriate.
Excel for Mac and Excel for the web
In Excel for Microsoft 365 on Mac, the chart concepts and general workflow are similar: select the chart, open the chart design controls, and use the data-selection options to review the category labels. Ribbon layout and dialog details can differ from Windows, so the command may be placed or presented differently. The essential fix remains the same: make sure the chart’s category labels refer to the cells containing the group names.
Excel for the web may not expose every chart-formatting or source-selection control available in the desktop app. If you cannot edit the category-label range or find a needed axis setting in the browser, open the workbook in the desktop version of Excel and make the change there. The web version’s available controls can change over time, so do not assume that a missing dialog means the chart data itself is invalid.
Frequently Asked Questions
How do I add x-axis labels to an Excel box plot?
Put each group name in the header cell above its data, select the headings and observations, and insert a Box and Whisker chart. For an existing chart, use Chart Design > Select Data and edit Horizontal (Category) Axis Labels.
Why does my box-and-whisker chart show Series 1?
Excel may not have recognized or included your header cells. Edit the category-label range to point to the cells containing the group names, or recreate the chart from a range that includes those headers.
Can I use a different cell range for the x-axis labels?
Yes. In Select Data, edit Horizontal (Category) Axis Labels and select the cells with the names you want. Keep the number and order of labels consistent with the chart’s categories.
How do I rotate x-axis labels in Excel?
Select the horizontal axis, open Format Axis, and look in Text Options or Text Box for text direction or angle controls. Shortening the source labels or widening the chart can also improve readability.
Can every data point have its own x-axis label in a box plot?
Not in the usual sense. A box plot groups observations into categories and summarizes each group. Use a chart designed to show individual observations if every point needs a separate label.
Quick check before sharing the chart
Before sharing or printing the workbook, verify that every box has the intended group name, that the labels are in the same order as the source data, and that none are clipped or unreadable. If someone else will interpret the chart, use clear category names and add an axis title when the meaning of the groups is not self-evident. These checks prevent a well-formatted chart from communicating the wrong comparison.
Related
- Security Risk in Excel: How to Find and Check It Safely
- VBE Editor in Windows: Name, Access, and Uses
- Excel Data Entry Form: Add an Image Box Step by Step
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel 3-Line Chart: Create and Format Three SeriesTo create a three-line chart in Excel for Microsoft 365 on Windows, put the category labels in the…
- Excel: Hide Columns Without Affecting Your Chart ViewYes. In Excel for Microsoft 365 on Windows, select the chart, go to Chart Design > Select Data…
- How to Make Org Chart Lines in PowerPoint and Align ThemTo make org chart lines in PowerPoint, insert a SmartArt organization chart and add positions with SmartArt Design…
- Add a Trendline to an Excel Bar Chart? Here’s How It WorksYes—Excel for Microsoft 365 on Windows can add a trendline to a supported 2-D bar chart. Select the…
- Excel Pivot Chart Multiple Lines: How to Create ThemYes. To show multiple lines in an Excel PivotChart, create a PivotChart from your PivotTable, choose a line…
- Excel Chart Series Order: Bring a Data Series to FrontYes. In Excel for Microsoft 365 on Windows, select the chart, choose Chart Design > Select Data, select…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.