Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Insert Average Line in Excel Graph: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To insert an average line in an Excel graph, you must create a helper column that calculates the average of your data and then add that column as a second data series to your chart. Because Excel does not have a single-click "Add Average Line" button for most chart types, this method ensures the line remains dynamic and updates automatically whenever your source data changes.

What You'll Need

  • A computer with Microsoft Excel installed.
  • A dataset consisting of at least one column of labels (e.g., dates or names) and one column of numerical values.
  • A basic understanding of how to use the AVERAGE function in Excel.

Step-by-Step

  1. Prepare Your Data: Ensure your data is organized in a clean table. For example, Column A should contain your categories (like "Month") and Column B should contain your values (like "Sales").
  2. Create the Average Helper Column: In the cell immediately to the right of your first data value (Column C), type a header such as "Average". In the first cell under this header, enter the formula =AVERAGE($B$2:$B$11). Replace $B$2:$B$11 with the actual range of your numerical data. The dollar signs are critical; they create an absolute reference, ensuring that when you drag the formula down, it always looks at the same range of numbers rather than shifting downward.
  3. Fill the Formula Down: Click the small green square (fill handle) at the bottom-right corner of the cell containing your average formula and drag it down to the bottom of your dataset. Every cell in this column should now display the exact same average value. This creates the "flat line" effect on your graph.
  4. Insert the Initial Chart: Highlight your original data (Columns A and B). Go to the Insert tab on the top ribbon and select your preferred chart type, such as a Clustered Column Chart.
  5. Add the Average Series to the Chart: There are two ways to do this. The first is to right-click the chart area and select Select Data. In the dialog box, click Add under Legend Entries (Series). For the "Series name," click the cell containing the word "Average." For the "Series values," highlight the entire range of cells in your helper column. Click OK.
  6. Change the Series Chart Type: Your average data will likely appear as another set of bars, which looks cluttered. Right-click on one of the new "Average" bars and select Change Series Chart Type.
  7. Convert to a Line Chart: In the Change Chart Type window, look for the "Combo" section at the bottom. Find the "Average" series in the list and change its chart type from Clustered Column to Line. Ensure the "Secondary Axis" checkbox is unchecked unless your average values are on a completely different scale than your primary data. Click OK.
  8. Format the Line: To make the line stand out, right-click the average line and select Format Data Series. Under the Fill & Line (paint bucket) icon, you can change the color to red or dashed, and adjust the width to make it more visible.

Common Mistakes

One of the most frequent errors is forgetting the absolute references (the dollar signs) in the AVERAGE formula. If you use =AVERAGE(B2:B11) without the signs, Excel will shift the range to B3:B12, B4:B13, and so on, as you drag the formula down. This results in a sloping line rather than a flat average line, which provides an incorrect visual representation of the mean.

Another common mistake is attempting to use a Trendline instead of a helper column. While Excel has a built-in "Add Trendline" feature, a linear trendline calculates a line of best fit (regression), which is not the same as a mathematical average. A trendline shows the direction of the data, whereas an average line shows the central tendency. Using a trendline when you need a mean will mislead your audience.

Users also frequently forget to update the data range when adding new rows to their table. If you add a 12th month of data but your average formula is still locked to $B$2:$B$11, the line on your graph will not reflect the new data point. To avoid this, it is highly recommended to format your data as an official Excel Table (Ctrl + T) before starting.

Tips

To make your graph look professional, add a data label to the average line. Right-click the line and select Add Data Labels. Since every point on the line is the same, you only need one label. Click on the other labels individually and press Delete, leaving only the final label at the end of the line. This tells the viewer exactly what the average value is without them having to guess based on the Y-axis.

If you are working with a very large dataset, instead of manually typing the range in the formula, you can use a Named Range. Go to the Formulas tab, select Name Manager, and define your data column as "SalesData". Your formula then becomes =AVERAGE(SalesData), which is much easier to read and manage.

For those who want a more dynamic look, you can use a "Slicer" if your data is in a Table. By using a Pivot Chart and adding a calculated field for the average, the average line will automatically shift and recalculate as you filter the data by region, employee, or date.

Troubleshooting

The line is missing from the chart: This usually happens if the average values are very small compared to the primary data. Check if the "Average" series was accidentally moved to a Secondary Axis with a different scale. Right-click the chart, go to Change Series Chart Type, and ensure the "Secondary Axis" box is unchecked for the average line.

The line is not flat: This is a sign that your formula is using relative references instead of absolute references. Go back to your helper column and ensure the formula contains dollar signs (e.g., $B$2:$B$10). After fixing the formula in the first cell, drag it down again to overwrite the incorrect values.

The line is hidden behind the bars: Excel layers data series in the order they were added. If the line is obscured, right-click the chart, go to Select Data, and use the arrow buttons to move the "Average" series to the bottom of the list. This moves it to the "front" of the visual stack.

The chart is lagging or freezing: If you have thousands of rows, calculating an average for every single row in a helper column can slow down the workbook. In this case, consider using a single-cell average and referencing that cell in your chart, though this requires a more advanced "dummy series" setup using the Chart Data Range.

Frequently Asked Questions

Can I add an average line to a Pie Chart?

No, average lines are not compatible with Pie Charts because Pie Charts represent parts of a whole rather than values across a scale. Average lines are best suited for Column, Bar, and Line charts.

Does the average line update automatically?

Yes, as long as you used a formula to calculate the average. If you change a value in your primary data column, the helper column will update, and the line in the graph will shift instantly.

How do I change the color of the average line?

Right-click the line in the chart, select Format Data Series, and use the paint bucket icon to choose a new color, line style (solid, dashed, or dotted), or thickness.

What is the difference between an average line and a trendline?

An average line is a horizontal line representing the mean of all data points. A trendline is a mathematical regression line that shows whether data is generally increasing or decreasing over time.

Can I have multiple average lines (e.g., for different categories)?

Yes, you can create multiple helper columns—one for each category's average—and add each as a separate series to the chart, following the same steps for each.