In Excel for Microsoft 365 on Windows, a box plot’s x-axis labels normally come from the column headers in the chart’s source data: put each group of observations in its own column and type the label you want in the first row. If the labels are missing or the groups run along the wrong direction, check the selected data range and use Chart Design > Switch Row/Column or adjust the category labels in Chart Design > Select Data.
What the x-axis labels represent
An Excel box plot, also called a Box and Whisker chart, summarizes a distribution of values. Each box represents a group of observations, such as one product, location, or month. The x-axis identifies those groups; the vertical axis shows the numerical scale. The labels are categories, not the individual values inside each group.
For example, if you compare delivery times for three services, the horizontal labels might be Standard, Express, and Pickup. The box and whiskers for each label show how the delivery-time values in that group are distributed. Excel calculates the plotted quartiles and other chart elements from the observations. It does not use the x-axis label itself as a value in that calculation.
Do not confuse category labels with an axis title. A category label names one box, while an axis title describes the whole axis, such as Delivery method. To add an axis title, select the chart and use Chart Design > Add Chart Element > Axis Titles. Choose Primary Horizontal for a title beneath the categories. This adds explanatory text; it does not rename the categories.
Arrange the source data so labels appear
The simplest layout is one group per column, with a header in the first row and observations below it. For example, put the headers North, Central, and South in A1:C1, then enter the measured values for each region in the rows below the matching header. Select the full range, including the headers, before inserting the chart.
- Place one category’s numeric observations in each column.
- Enter a clear category name at the top of each column.
- Select the headers and the observations, including any cells that are blank because groups have different sample sizes.
- Choose Insert > Insert Statistic Chart > Box and Whisker.
Excel uses the header cells as the category names in the ordinary column-oriented layout. If you select only the numeric cells, Excel may create boxes but use generic names or interpret the data differently than intended. Including descriptive headers is usually the quickest way to control the x-axis labels.
Unequal group sizes are normal in a box plot. One column can contain more observations than another; leave unused cells blank rather than filling them with zero. A zero is a real observation and can change the distribution, while an empty cell is not an observation. Keep text notes, IDs, and dates out of the measurement cells unless they are genuinely numeric data intended for the chart.
Change labels after creating the chart
For a chart that already has the right grouping, the most reliable fix is often to edit the header cells in the worksheet. For example, change a header from Series 1 to North, and the chart should display the updated name. This also keeps the chart label connected to the source data, so later edits are easier to maintain.
You can also inspect the chart’s data settings. Select the chart, open Chart Design > Select Data, and look for the Horizontal (Category) Axis Labels area. If the Edit control is available, choose it and select the worksheet cells containing the labels you want, then confirm the dialog. The dialog’s available controls can depend on how Excel has interpreted the Box and Whisker data. If that label range cannot be edited for the chart’s current structure, revise the source headers or rearrange the data and recreate the chart.
When you use a separate label range, make sure it contains one label for each box and that the labels are in the same order as the plotted groups. A mismatch can make a correct distribution appear to belong to the wrong category. Avoid selecting a range with extra blank cells or a different number of labels from the categories shown.
Choose between columns and rows
Excel’s box plot can interpret the rows or columns of a selected range as separate groups. If the boxes appear in the wrong orientation—for example, you expected one box per column but see one per row—select the chart and choose Chart Design > Switch Row/Column. Check the result rather than assuming that a particular layout will always be inferred correctly; the shape of the selection and its headers affect Excel’s interpretation.
Column-oriented data is often easiest to read because each group name sits directly above its measurements. Row-oriented data can be useful when the source table already has one group per row, but it may be less convenient if the number of observations differs by group. After switching, verify both the number of boxes and their labels. If switching produces confusing labels, place the groups in separate columns with headers and build the chart from that layout.
Switch Row/Column changes how Excel groups the selected data; it does not simply rotate the chart or change the horizontal axis into a vertical one. The Box and Whisker chart’s measurement scale remains numerical, while the group names identify the boxes.
Format labels for readability
Long names, many categories, or a narrow chart can make x-axis labels crowded. First try enlarging the chart or shortening the source headers to meaningful names such as Q1, Q2, and Q3. If abbreviations are not self-explanatory, define them in a nearby note or use a longer chart title or subtitle where appropriate.
To change the appearance of the category labels, select the horizontal axis and open Format Axis. Depending on the current Excel build and chart selection, you can adjust options such as label positioning, text direction, or the interval at which labels appear. For a small chart, reducing font size or rotating labels can help, but do not make the text so small that readers cannot distinguish the groups. Widening the chart is often clearer than forcing a large number of labels into a tight space.
- Use short, distinct names when categories are numerous.
- Keep the order meaningful, such as low to high, chronological, or matching the source table.
- Use a horizontal axis title when readers need to know what the categories represent.
- Check the chart at the size at which it will be printed or shared; labels that fit on screen may be clipped in a report.
Formatting the axis changes how labels look, not the underlying group assignment. If the wrong name appears under a box, fix the source data or category-label mapping rather than trying to solve the problem with text formatting.
Fix common x-axis label problems
Excel shows 1, 2, or generic series names. The selected range may not include the header row, or Excel may have treated the first row as data. Confirm that the range includes the intended headers. If the header cells are included but the result is still wrong, try Switch Row/Column and inspect which cells Excel is using as series names.
The labels appear as numbers or dates. Excel may be displaying the values in the selected label cells as they are stored or formatted. Check the source cells and their number format. If you want a descriptive category, enter text such as Week 1 or Store A in the header rather than relying on a number whose meaning is unclear. If a date is a genuine category, use a clear date format in the source cell.
The chart has one box instead of several. Excel may be reading the selection as one data series rather than several groups. Check that each group has its own column or row and that the selected range includes the group boundaries and headers. Use Switch Row/Column to test the alternative interpretation. For a clear comparison, a tidy table with one group per column and one observation per row is usually a good starting point.
Labels do not match the boxes. A manually selected label range may be in a different order from the data, or the chart may have switched its grouping direction. Compare the label sequence with the source columns or rows one by one. Correct the source layout or label range, then confirm the plotted order visually.
Some labels are cut off or overlap. Increase chart width, reduce the number of displayed categories, shorten labels, or adjust axis text direction. If every category must be shown, do not hide labels without considering whether readers can still identify each box. A table accompanying the chart can preserve full names when the display area is limited.
When another chart or layout is better
A box plot is useful when the question is about spread, median, quartiles, and potential outliers across groups. It is not a substitute for labels on individual observations: the x-axis names the groups, while the chart summarizes the values within them. If the goal is to show every measurement and its exact category, a scatter chart or a table may be more appropriate, depending on the question.
If categories and observations are stored in a long table—one column for Group and another for Measurement—Excel may not automatically create the intended box for each category from a simple selection. Reshape or summarize the data into separate group columns first, or use a suitable pivoting workflow to prepare the chart data. Preserve the original records so the chart’s input can be checked. Do not add repeated category names as if they were measurements; the box plot needs the numeric observations for each group.
Excel also offers options that affect how the box itself is drawn, including quartile calculation choices and display of mean markers or outlier points. These settings change the statistical presentation, not the x-axis category names. If the labels are right but the box shape differs from another program, investigate the chart’s statistical settings and the underlying calculation convention separately.
Frequently Asked Questions
How do I add names to the x-axis of an Excel box plot?
Put each group of observations in its own column and type the group name in the top cell. Select the headers with the data when you insert Insert > Insert Statistic Chart > Box and Whisker. Excel normally uses those headers as the category labels.
Can I change Excel box plot labels without changing the data?
Often, yes. Check Chart Design > Select Data and the Horizontal (Category) Axis Labels controls. If Excel allows the label range to be edited, select the cells containing your preferred names. If those controls are unavailable for the chart’s layout, change the header cells or reorganize the source data.
Why does my Excel box plot show Series 1 instead of my category names?
The chart may not include the header cells, or Excel may have interpreted the rows and columns in the opposite way from what you expected. Expand the source range to include the headers and try Chart Design > Switch Row/Column. Confirm that each intended group corresponds to one box.
Can Excel box plot x-axis labels contain text?
Yes. Labels such as Control, Treatment, or East are normal category labels. Put them in the header cells associated with the groups. The measurements beneath those headers should still be numeric values for the box plot.
How do I add an x-axis title rather than category labels?
Select the chart and choose Chart Design > Add Chart Element > Axis Titles > Primary Horizontal. Type the title that explains the category axis. This adds one axis title; it does not replace the individual labels under the boxes.
Excel on Mac and the web
The directions above are for Excel for Microsoft 365 on Windows. In Excel for Mac, the chart concepts and worksheet layout are the same, and the Chart Design tab provides corresponding chart controls, though the ribbon arrangement and dialog appearance can differ by release. On Mac, the common shortcut for opening Format Cells is Control+1 rather than Windows Ctrl+1; this shortcut is not required to change box-plot labels. Excel for the web may show charts and offer a different set of editing controls, so if a specific Box and Whisker option or label control is missing, open the workbook in the desktop app to make the chart change.
The practical rule is simple: make the group names explicit in the source headers, include those headers in the chart range, and verify that each box corresponds to the intended group. Once the data orientation is correct, formatting the labels is a separate finishing step.
Related
- Conditional Formatting: Apply Rules to Entire Rows
- Can You Do Text to Columns Vertically in Excel?
- Conditional Formatting a Row Based on a Cell
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Table Columns Side by Side: How to ShowTo show PivotTable categories side by side, select the PivotTable, open the PivotTable Fields pane, and drag the…
- How to Add a Trendline to a Google Sheets ChartTo add a trendline in Google Sheets, click or double-click the chart, open Customize > Series in the…
- Combo Chart in Excel: How to Create and Format OneA combo chart in Excel combines two or more chart types in one chart, most often columns and…
- Excel Chart Group by Category: How to Set It Up RightTo group Excel chart data by category, first summarize the records so each category has one row, then…
- Excel Dashboard Software Alternatives and How to ChooseExcel dashboard software alternatives include Microsoft Power BI, Tableau, Looker Studio, Qlik Sense, Zoho Analytics, and Metabase. The…
- Excel Pivot Table Filter Not Working? Fixes That HelpIf a filter in an Excel PivotTable is not working, first clear the filter, refresh the PivotTable, and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.