Adding a horizontal average line to an Excel chart is a quick way to visually compare individual data points against the overall average. This guide shows you the simplest method using a line chart or column chart and a helper column that holds the average value. You’ll need your data in a worksheet and a chart already created (or you’ll create one as part of the steps).
What You’ll Need
- A Microsoft Excel workbook (Microsoft 365, Excel 2021, 2019, or 2016; steps are similar on Mac and Excel for the web).
- A set of numerical data you want to chart, for example monthly sales figures.
- An existing chart (column, line, or bar) or the data to create one.
Step-by-Step
- Prepare your data. Suppose your data is in column A (labels) and column B (values), with headers in row 1. For example, months in A2:A13 and sales in B2:B13.
- Create a chart (if you don’t have one). Select the data range (A1:B13), go to the Insert tab, and choose a chart type like Column or Line. For this method, a column chart works well.
- Add a helper column for the average. In cell C1, type
Average. In cell C2, enter the formula=AVERAGE(B2:B13)and press Enter. This calculates the average of your sales values. - Copy the average down. Click on cell C2, then double-click the fill handle (the small square at the bottom-right of the cell) to fill the formula down to C13. Now every row in column C has the same average value.
- Add the helper column to the chart. Right-click anywhere on the chart and choose Select Data. In the dialog, click Add to add a new series. For Series name, enter
Average(or click C1). For Series values, select C2:C13. Click OK twice. - Change the new series to a line. The average series will likely appear as columns. Right-click on the new series (you may need to click on one of the average columns) and choose Change Series Chart Type. Select Line for the Average series and click OK. Now you have a horizontal line at the average level.
- Format the line (optional). Right-click the line and choose Format Data Series. You can change the color, width, dash type, or add markers to make it stand out.
If you’re using a line chart instead of a column chart, the same steps work: add the helper column, add it as a new series, and it will appear as a line. For a bar chart (horizontal bars), the average line will be vertical, but the method is identical.
Common Mistakes
- Forgetting to fill the average down. If you only put the average in one cell and don’t copy it to all rows, the line will only show for that one point.
- Selecting the wrong data range. When adding the series, ensure you select the entire C2:C13 range, not just the first cell.
- Leaving the average series as columns. You must change the chart type to a line, otherwise you’ll get a second set of bars, not a horizontal line.
- Using a dynamic average formula incorrectly. If you use
=AVERAGE(B2:B13)and then copy it down, each cell will recalculate the same average, which is fine. But if you accidentally use relative references like=AVERAGE(B2:B2), the line will be wrong.
Tips
- Use a named range for the average. Instead of typing the range each time, you can define a name for the average value and use it in the helper column, but the simple method above works fine.
- Make the line dynamic. If your data range changes (e.g., you add new months), update the AVERAGE formula to include the new cells, and the line will automatically adjust.
- Add a data label to the line. Right-click the line, select Add Data Labels, and choose to show the value. This makes the average explicit.
- Use a secondary axis if needed. If the average is very different in scale from your data (e.g., percentages vs. large numbers), you might want to put the average on a secondary axis. Right-click the line, choose Format Data Series, and select Secondary Axis.
- Keyboard shortcut for the average. After typing
=AVERAGE(, you can select the range with the mouse or press Ctrl+Shift+Down (Windows) or Cmd+Shift+Down (Mac) to select all contiguous data.
Troubleshooting
The line doesn’t show up. Check that the helper column actually contains numbers (not text). If you see #DIV/0! or other errors, fix the formula. Also ensure the series is set to a line chart type, not hidden behind the columns.
The line is not horizontal. This happens if you didn’t copy the average down to all rows. Make sure every cell in the helper column has the same value. If some cells are empty, the line will dip.
I can’t find the Average series in the chart. Right-click the chart, select Select Data, and check the list on the left. If it’s not there, you may have accidentally added it to the wrong chart or deleted it.
The line appears but is behind the bars. Right-click the line, choose Format Data Series, and adjust the Series Overlap or Gap Width if needed, or move the line to the front by changing the chart type.
On Mac, the steps are slightly different. Right-clicking works, but you may need to use the Chart Design tab (or Format tab) instead of right-click menus. The Select Data option is under the Chart Design tab.
Frequently Asked Questions
Can I add an average line without a helper column? Yes, you can use a combination chart with a calculated series, but the helper column method is the most straightforward. Alternatively, you can add a trendline and set it to average, but that’s not a true average line.
Does this work for a pivot chart? Yes, but you need to add the average as a calculated field or use a helper column in the source data. The steps are similar, but you’ll add the series from the pivot chart’s data.
Can I add multiple average lines (e.g., for different groups)? Yes, add multiple helper columns, each with its own average, and add each as a separate series.
Why does my line show as a diagonal when I have only one data point? If your chart has only one data point, the line will be a single point, not a horizontal line. You need at least two data points to see a line.
How do I remove the average line later? Click on the line to select it, then press Delete. Or right-click and choose Delete.
Can I use a formula to make the average line update automatically when I add new data? Yes, use a dynamic range like =AVERAGE(OFFSET(B2,0,0,COUNTA(B:B)-1,1)), but this is more advanced. The simple method requires manual updating of the range.
Related
- Random Washington Address: How to Get One Safely
- How to Repair an Excel File: Step-by-Step
- How to Resize a Column or Row in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Do Excel Cells Automatically Resize?No. In Microsoft Excel for Microsoft 365 on Windows, columns do not automatically widen and rows do not…
- Excel Flash Fill Shortcut: How It Works and When to Use ItIn Excel for Microsoft 365 on Windows, the Flash Fill keyboard shortcut is Ctrl+E. Enter one or two…
- Excel Find and Replace Results: Export Matches and CellsExcel does not have a one-click command to export the results of Find and Replace as a separate…
- Personal Budget Spreadsheet Template: Build One in ExcelA personal budget spreadsheet template is a worksheet that compares planned income and expenses with what actually comes…
- Balance GraphQL API: Availability and AlternativesIf you mean Balance, the B2B payments platform, its publicly described developer interface is REST-oriented; there is no…
- Conditional Formatting in Microsoft Lists: How It WorksYes. Microsoft Lists can use conditional formatting to change how columns or rows look when their values meet…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.