To add a legend in Excel for Microsoft 365 on Windows, select the chart, then choose Chart Design > Add Chart Element > Legend and select a position such as Right, Top, Left, or Bottom. A legend identifies the chart’s data series by name and color, helping readers understand which plotted values belong to each group.
What a chart legend does
A legend is the chart key: it pairs each data series with its visual marker, such as a colored line, bar, or pie slice. For example, if a column chart compares monthly sales for three products, the legend can identify which color represents each product. The names usually come from the column or row headings in the chart’s source data.
Legends are most useful when a chart has multiple series and the marks themselves do not make their meaning obvious. A single-series chart may not need one, especially when its title or labels already explain the data. A legend can also take up space, so adding one is not automatically an improvement. The goal is to make the chart easier to interpret without crowding its data.
A legend is different from a chart title, axis title, and data label. The chart title describes the whole chart; an axis title names what an axis measures; and a data label displays a value or category beside a specific point. The legend explains the series identity. These elements can be used together when each adds useful information.
Add a legend from the ribbon
In the Windows desktop version of Excel for Microsoft 365, use the chart-specific ribbon commands:
- Click the chart. If the chart is not selected, Excel will not show its chart design commands.
- Open Chart Design on the ribbon.
- Select Add Chart Element > Legend.
- Choose a location: Right, Top, Left, or Bottom. Choose More Legend Options to open formatting settings.
The legend should appear immediately, with an entry for each series currently plotted. If you do not see the expected names, check the source data headings and the chart’s series settings; adding a legend does not create or rename the underlying data series.
There is also a quick method for many charts. Select the chart, click the Chart Elements button (the plus sign) beside it, and check Legend. Use the arrow beside Legend to choose a position when that control is available. The ribbon method is a useful alternative if the plus button is not shown or the chart is selected in a layout where the button is inconvenient.
Choose a position that fits the chart
Excel’s built-in placements put the legend on the right, left, above, or below the plot area. The best choice depends on the chart’s proportions, the number and length of series names, and the space available on the worksheet or report.
- Right: A familiar choice for charts with several series, particularly when the chart is wide enough to leave room beside the plot.
- Top or Bottom: Often works well for a wide chart with only a few short series names. A horizontal legend can preserve the chart’s height, but long names may wrap or use too much width.
- Left: Can be useful when the chart’s layout or surrounding content makes the left side the clearest location.
To move a legend, select the chart, open Chart Design > Add Chart Element > Legend, and choose a different location. For finer placement, click the legend itself and drag it to another spot inside the chart area. Dragging is useful for a one-off layout, but a built-in position is generally easier to maintain if the chart changes size or is updated.
Watch for overlap and unused space after moving the legend. A legend placed over the plot can obscure data points, while a large legend beside a small chart can make the chart harder to scan. Resize the chart or adjust the legend’s font and layout if necessary.
Understand series names and source data
Excel builds legend entries from the chart’s data series. In a typical table, the first row contains series names and the first column contains categories. For example, a table with months down the first column and product names across the top will generally produce one series for each product, with those product headings in the legend.
If a legend entry says “Series 1” instead of a meaningful name, correct the series name rather than trying to type over the legend. Select the chart and choose Chart Design > Select Data. In the Select Data Source dialog, select the relevant series under Legend Entries (Series), choose Edit, and set the series name by selecting its heading cell or entering a name. The exact dialog details can vary with chart type and selection, but the key is to update the series definition.
You can also fix the heading in the worksheet if the chart uses the intended header cell. Excel may update the legend automatically when that source heading changes. This is often the cleanest approach because the worksheet and chart remain consistent. If the chart has interpreted rows and columns in the opposite way from what you intended, use Chart Design > Switch Row/Column and check whether the resulting series and legend entries make sense.
A legend entry corresponds to a series, not necessarily to every row in the source table. If a chart uses months as categories and separate product columns as series, the legend lists products, while months usually appear along the category axis. If the chart seems to have too many or too few entries, inspect the selected data range and how Excel has grouped it.
Format a legend for readability
To adjust the legend’s appearance, right-click the legend and choose Format Legend. Excel opens the Format Legend pane, where available options depend on the chart and the selected legend. You can change its placement, and formatting controls can include text appearance and fill or border settings. You can also select the legend text and use the usual font controls on the Home tab.
Keep formatting restrained. A readable font, clear contrast, and a sensible position usually matter more than decorative borders or fills. If there are many entries, consider whether the chart is trying to communicate too many series at once. Splitting the information into multiple charts or using a more focused selection can be clearer than shrinking legend text until it is difficult to read.
Legend markers inherit their appearance from the corresponding series. To change a series color, select a plotted series and use its formatting options; the matching legend marker changes with it. Be careful not to rely on color alone when the chart will be read by people with color-vision differences or printed in grayscale. Distinct marker shapes, line styles, direct labels, or a well-organized table can provide additional cues.
Legend versus data labels and direct labels
A legend summarizes the series-to-color mapping in one place. Data labels instead put information beside individual chart elements, such as a value above each column or a category name beside a pie slice. To add labels, select the chart and use Chart Design > Add Chart Element > Data Labels, then choose an available placement. The options vary by chart type.
For a simple chart, direct labels can be easier to read than repeatedly looking between the data and a legend. For example, a line chart with two lines might benefit from labels at the line ends if there is room. However, direct labels can overlap, especially with many points or series. A legend is often neater when there are several series or when the chart is small.
Pie charts illustrate the distinction well. A legend can list category names beside colored keys, while data labels can show names, values, or percentages on or near slices. If labels already identify every slice clearly, a separate legend may be redundant. Conversely, a legend can be helpful if labels would crowd the chart. Choose the combination that makes the specific chart easiest to understand.
Common legend problems and fixes
- The legend is missing: Select the chart and add it through Chart Design > Add Chart Element > Legend. If the command is unavailable, confirm that the chart itself—not a cell—is selected.
- The names are generic or incorrect: Check the source headings, then use Chart Design > Select Data to edit the series name. A legend displays series names; it is not a separate list that should be renamed independently.
- An expected series is absent: Open Select Data and review the data range and listed series. A series may not be included in the chart, or filtering and chart settings may affect what is displayed.
- The legend is too crowded: Move it to another side, enlarge the chart, shorten source headings where appropriate, or reduce the number of series. Avoid making the text so small that readers cannot distinguish entries.
- The legend covers the data: Choose a built-in location outside the plot area or drag it away from important marks. Recheck the layout after resizing the chart.
One common misconception is that deleting an unwanted legend entry removes that data series from the chart. A legend entry reflects a plotted series, so the reliable way to remove a series is to change the chart’s data selection or series settings. Likewise, hiding a legend is not the same as hiding data: removing the legend changes the key, not the values being plotted.
Excel on Mac and Excel for the web
On Excel for Mac, select the chart and look for the chart design commands, then use the legend control to add or reposition the key. Ribbon organization and wording can differ somewhat by Excel version and window size, so the command may be presented through the chart design ribbon rather than in exactly the same place as on Windows. The chart’s legend and series concepts are the same.
In Excel for the web, select the chart and use the chart formatting controls available in the browser version to show or adjust chart elements. The controls can differ from the Windows desktop ribbon, and some detailed formatting choices may be more limited. If a particular placement or formatting setting is unavailable in the browser, open the workbook in the desktop Excel app and make the change there.
Frequently Asked Questions
How do I add a legend to an Excel chart?
Select the chart, then choose Chart Design > Add Chart Element > Legend and select a position. You can also use the chart’s plus-sign Chart Elements button when it is available.
How do I move a legend in Excel?
Select the chart and choose another position from Chart Design > Add Chart Element > Legend. For a custom position, select the legend and drag it within the chart area.
How do I change the names in an Excel chart legend?
Edit the source headings or select the chart and open Chart Design > Select Data. Choose a series under Legend Entries (Series), select Edit, and specify the correct series name.
Can I add a legend to a chart with only one series?
Yes. Use the same legend command. It may not add much value if the chart title, labels, or context already identify that series, so consider whether it helps the reader.
Why does my legend show “Series 1”?
Excel uses a generic name when it cannot find a meaningful series heading in the chart’s source data. Add or correct the heading, or edit the series name through Select Data.
Does removing a legend delete the chart data?
No. Removing or hiding the legend removes the key from view, not the plotted series. To remove data from the chart, change the selected source range or edit the chart’s series.
Related
- How to Make a Number Negative in Excel: Three Methods
- How to Make a Color Key in Excel for Clearer Sheets
- How to Make a Copy of a Sheet in Excel
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Map Chart Not Working? Fix the Common CausesIf an Excel map chart is blank, missing, or showing the wrong places, first check that your chart…
- Excel Line Chart Smooth Curve: Setup, Limits, and TipsYes. In Excel for Microsoft 365 on Windows, select a line in the chart, open Format Data Series,…
- 24-Hour Gantt Chart Excel: 24 Setup Ideas That WorkTo make a 24-hour Gantt chart in Excel, put 24 hourly time values across the columns, list tasks…
- Excel Pivot Table: Filter Out Zero ValuesTo filter zero values out of an Excel PivotTable, open the drop-down for the row or column field…
- Power Pivot Slicers: How to Add and Connect ThemA Power Pivot slicer is a clickable filter for a PivotTable built from Excel’s Data Model. In Excel…
- Excel Chart Show Hidden Data? How to Control ItYes. In Excel for Microsoft 365 on Windows, select the chart, choose Chart Design > Select Data >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.