Excel charts make trends obvious, but manually drawing a trendline can feel clunky. Adding an average line (like a moving average or simple mean) automatically connects your data points with a smooth, insightful curve. This guide shows you how—whether you’re tracking stock prices, sales data, or project timelines—without writing complex formulas. All you need is a chart with your data and a few clicks.
What You'll Need
- A dataset with at least three data points (e.g., columns of numbers or dates)
- An existing Excel chart based on your data
- Excel 2013 or later (procedures are identical in Office 365/2019/2021)
Step-by-Step
- Create or edit your chart: Select the data range you want to visualize (e.g., cells A1:B10 for two columns). If you don’t have a chart yet, go to Insert > Chart, then choose a line graph (e.g., "Clustered Column" if you have two Y-axes). For time-series data (dates), pick "Line with markers" or "Area chart." Note: Labels can differ slightly by version—e.g., in Excel 2016, this path works: Insert > Chart > Recommended Charts > Line.
-
Add a trendline to the chart:
Right-click any data series (the line/marker series) in the chart area. Hover over Add Trendline... (or Add Chart Element... > Trendlines in older versions). A dialog appears.
Select the type:
- Linear Trendline (for simple averages): Shows a straight line of best fit (y = mx + b). Use this for equal-weighted means (e.g., daily closing prices).
- Moving Average Trendline (for smoothed trends): Choose "Moving Average" and specify the window size (e.g., 10 days for rolling averages). Excel will average data points over that span.
- Exponential Trendline (for weighted data): Useful if newer data points carry more importance (e.g., GDP growth). Avoid this for raw averages.
- Check Display Equation to show the formula (e.g., "y = 0.5x + 2.3")
- Enable Display R-Squared Value to see how close the line fits
- Use Line Color or Line Style to match your chart (e.g., a dashed green line)
- Adjust the trendline's data range (if needed): If your trendline spans only part of your data, select the trendline series in the chart (right-click > Select Data...). In the Legend Entries tab, verify the source range matches your chart data. For moving averages, Excel auto-calculates this—but edit it only if the range is wrong.
-
Format the trendline (optional):
Right-click the trendline line itself, not the data series. Choose Format Trendline... to:
- Add markers (e.g., dots at data points) under Series Options
- Change the line style (solid, dashed, dotted) to improve readability
- Adjust the gap between the trendline and data points if needed
Common Mistakes
Common errors include skipping the trendline setup or misconfiguring the data range. Here’s what to avoid:
- Using the wrong trendline type: A linear trendline won’t show a smooth average—switch to Moving Average for rolling calculations.
- Ignoring the trendline’s data source: Right-click the trendline > Select Data... to confirm the range matches your chart. A mismatch will stretch or crop the line incorrectly.
- Overlapping with data series: Too many lines can obscure the chart. Use Format Trendline to adjust line thickness or color.
- Skipping the chart update: After editing the trendline, press F9 (Excel for Windows) or Ctrl+Shift+Enter (macOS) to recalculate the formula if you changed the underlying data range.
Tips
Pro tips for better averages:
- Moving average window size: For stock data, a 20-day moving average smooths noise better than 5. Smaller windows (e.g., 7) work for daily sales but may overreact to spikes.
- Multiple trendlines: Compare two moving averages (e.g., 30-day vs. 90-day) by adding a second series with a different window size.
- Custom formulas: If Excel’s trendlines aren’t flexible enough, use a helper column with
=AVERAGE(A1:A10)and plot that data series instead. - Chart titles and axes: Add Chart Elements > Chart Title and Axes to label your average line (e.g., "30-Day Moving Avg").
- Conditional formatting: Highlight deviations from the trendline (e.g., red if data < 2 standard deviations below the average).
Troubleshooting
If your average line doesn’t appear or looks wrong:
- Trendlines aren’t showing up: Check if you’re right-clicking the data series (the connected line), not the legend. A trendline must be added to a data series to display. If that fails: Restart Excel and try again. Corrupted charts sometimes require a File > Options > Add-ins > Manage Excel Add-ins > Disable all (temporarily) to clear conflicts.
- The trendline is wrong: Delete the trendline (right-click > Delete Trendline), then re-add it with the correct type (e.g., Moving Average). Verify the data range: Select the trendline > Select Data... > Series tab. Ensure the Chart Area matches your chart’s data.
- The line stretches beyond your data: Right-click the trendline > Select Data... > Series tab > Legend Entry Name. Edit the source range if needed (e.g., change "=ChartData!A1:A10" to "=ChartData!A1:A15" if your data is longer). Warning: Wrong ranges can cause errors or missing data. Test with a smaller range first.
-
Excel won’t let you add a trendline:
Try these steps in order:
- Update Excel to the latest version via File > Account.
- Sign out and back into your Microsoft account (if on Office 365).
- Create a new blank Excel file and repeat the steps—corrupted charts can block features.
- If all else fails, use a third-party tool like PivotChart (Excel extension) to manually add an average line.
Frequently Asked Questions
Why does my trendline skip data points?
This happens if the trendline’s data range doesn’t match your chart. Right-click the trendline > Select Data... and verify the source range includes all your data points. For moving averages, Excel auto-adjusts the range, but you can edit it manually if needed.
How do I make the average line appear on a stacked bar chart?
Stacked bar charts often don’t support trendlines, but you can:
- Convert to a line chart by selecting your data > Design > Chart Type > Line.
- Or use a helper column for the average (e.g.,
=AVERAGE(A1:A100)) and plot that as a separate series.
Can I apply the same moving average to multiple charts?
Yes! Calculate the moving average once in a helper column (e.g., column C) with a formula like =AVERAGE(B1:B10), then plot column C as a new data series. This avoids recalculating the average for each chart.
What’s the difference between linear and exponential trendlines?
A linear trendline fits a straight line (y = mx + b) and works for equal-weighted averages. An exponential trendline assumes growth follows an exponential curve (e.g., compound interest) and gives more weight to recent data. Use exponential only if your data naturally grows exponentially.
How do I remove a trendline?
Right-click the trendline > Delete Trendline. If the line still persists, click the trendline’s legend entry in the chart and press Delete.
Is there a way to add an average line without using trendlines?
Yes! Manually insert a line series:
- Select your data > Insert > Line.
- In the Data tab, click Change Series Chart > Line.
- Use a helper column with
=AVERAGE(A1:A10)and copy the values to a new column, then connect this column to the line chart.