What a legend does and why you need one
A legend is the box that tells you what each color or pattern in your chart represents. Without it, anyone looking at your chart has to guess what the blue bars mean or which line is which. Excel lets you add a legend in about three clicks, and you can move it, resize it, and change what it says.
If you have already made a chart in Excel — a bar chart, line chart, pie chart, or any other type — you can add a legend right now. If you have not made a chart yet, create one first by selecting your data, going to the Insert tab, and picking a chart type. Once the chart exists, the legend tools are ready to use.
Key Takeaways
- Right-click your chart and select Add Chart Element, then Legend, to place a legend on any chart you have already made.
- Excel puts the legend on the right side by default, but you can move it to the top, bottom, left, or remove it entirely by clicking the legend and choosing a position.
- The legend automatically pulls its labels from the names you gave your data series when you created the chart, so clean data labels make a better legend.
- You can resize the legend box by dragging its corners, and you can edit the text inside it by right-clicking and choosing Edit Legend Entry.
Adding a legend to a chart you have already made
Click on the chart itself to select it. You will see a border around the chart with small squares at the corners and edges. Right-click anywhere inside the chart area and look for the option that says Add Chart Element. Click it.
A menu will open with options like Axis Titles, Data Labels, and Legend. Click Legend. Excel will immediately place a legend box on the right side of your chart. The legend will show the name of each data series — the rows or columns you charted — with a colored square or line next to each name.
If you do not see Add Chart Element when you right-click, make sure you clicked on the chart itself, not on the spreadsheet behind it. The chart should have a gray border around it when it is selected. If it does not, click the chart once more.
Moving the legend to a different spot
The legend starts on the right side of the chart, but you may want it elsewhere. Click the legend box itself — not the chart, but the legend — and a border will appear around it. Right-click the legend and you will see options for where to put it: Right, Left, Top, Bottom, or None.
Choose the position that looks best for your chart. If your chart is wide and short, the legend might fit better at the top or bottom. If your chart is tall and narrow, the left or right side may work better. Click your choice and the legend will move.
You can also drag the legend by hand. Click and hold on the legend box, then drag it to any spot on the chart. This is useful if you want the legend in a corner or overlapping the chart area slightly. When you let go, the legend will stay where you placed it.
Changing what the legend says
The legend pulls its text from the names of your data series. If you charted a column called "Sales" and another called "Expenses", the legend will say "Sales" and "Expenses". If those names are unclear or misspelled, the legend will be unclear too.
To fix the legend text, you have two choices. The first is to go back to your data and change the column or row headers before the chart was made. Select the header cell, type the new name, and press Enter. The legend will update automatically.
The second choice is to edit the legend entry directly. Right-click the legend and select Edit Legend Entry. A dialog box will open where you can type a new name for that series. This is faster if you only need to change one or two entries, but it does not change the original data.
Resizing and formatting the legend
If the legend is too big or too small, you can resize it. Click the legend to select it, then drag one of the small squares at its corners or edges. Drag outward to make it bigger, or inward to make it smaller. The text inside will adjust to fit.
You can also change how the legend looks. Right-click the legend and select Format Legend. A panel will open on the right side of your screen with options to change the background color, the border, the text size, and more. These changes are optional — the legend will work fine with the default look — but they can help match your chart to a report or presentation.
Removing the legend if you do not need it
Some charts do not need a legend. If you have only one data series, or if the chart is so simple that labels are obvious, you can remove the legend to save space. Click the legend and press Delete, or right-click it and select Delete.
If you change your mind later, you can add it back the same way you added it the first time: right-click the chart, select Add Chart Element, then Legend.
Common mistakes and how to fix them
The most common mistake is forgetting to name your data series before you make the chart. If your data has no headers, Excel will call everything "Series 1", "Series 2", and so on. The legend will then be useless. Go back to your data, add clear names to the top of each column, and the legend will update.
Another mistake is placing the legend where it covers important parts of the chart. If the legend is blocking bars or lines you need to see, move it to a different position or make it smaller. You can also right-click the legend, select Format Legend, and turn on Show the legend without overlapping the chart to let Excel find the best spot automatically.
If the legend text is too small to read, you can make it bigger. Right-click the legend, select Format Legend, go to the Text Options tab, and increase the font size. A legend that nobody can read is worse than no legend at all.
Frequently Asked Questions
Can I change the order of items in the legend?
The legend order matches the order of your data series in the spreadsheet. If you want a different order, rearrange the columns or rows in your data, and the legend will follow. You cannot reorder the legend itself without changing the source data.
Why does my legend say "Series 1" instead of a real name?
Your data does not have a header row or column. Go back to your spreadsheet, add a name at the top of each column or to the left of each row, and the legend will update automatically. Make sure the header is in the first row or column of the data you selected when you made the chart.
Can I have a legend on a pie chart?
Yes. Pie charts often use a legend to show what each slice represents. Add it the same way: right-click the chart, select Add Chart Element, then Legend. For pie charts, the legend is usually more useful than data labels.
What if I want the legend to show only some of my data series, not all of them?
You cannot hide individual series from the legend without removing them from the chart entirely. If you want to hide a series, right-click it in the legend and select Delete. The series will disappear from both the chart and the legend.
Can I put the legend inside the chart area instead of outside it?
Yes. Click the legend, right-click it, and choose a position like Top Right or Bottom Left. These positions place the legend inside the chart area. Make sure it does not cover data you need to see.