Add a trend or moving average line to a chart
Applies To
Excel for Microsoft 365 Outlook for Microsoft 365 PowerPoint for Microsoft 365 Excel for Microsoft 365 for Mac PowerPoint for Microsoft 365 for Mac Excel 2024 Outlook 2024 PowerPoint 2024 Excel 2024 for Mac PowerPoint 2024 for Mac Excel 2021 Outlook 2021 PowerPoint 2021 Excel 2021 for Mac PowerPoint 2021 for Mac Excel 2019 Outlook 2019 PowerPoint 2019 PowerPoint 2019 for Mac Excel 2016 Outlook 2016 PowerPoint 2016Add a trendline to your chart to show visual data trends.
Add a trendline
-
Select a chart.
-
Select the + to the top right of the chart.
-
Select Trendline.
: Excel displays the Trendline option only if you select a chart that has more than one data series without selecting a data series.
-
In the Add Trendline dialog box, select any data series options you want, and click OK.
Format a trendline
-
Click anywhere in the chart.
-
On the Format tab, in the Current Selection group, select the trendline option in the dropdown list.
-
Click Format Selection.
-
In the Format Trendline pane, select a Trendline Option to choose the trendline you want for your chart. Formatting a trendline is a statistical way to measure data:
-
Set a value in the Forward and Backward fields to project your data into the future.
Add a moving average line
You can format your trendline to a moving average line.
-
Click anywhere in the chart.
-
On the Format tab, in the Current Selection group, select the trendline option in the dropdown list.
-
Click Format Selection.
-
In the Format Trendline pane, under Trendline Options, select Moving Average. Specify the points if necessary.
: The number of points in a moving average trendline equals the total number of points in the series less the number that you specify for the period.
Add a trendline
-
On the View menu, click Print Layout.
-
In the chart, select the data series that you want to add a trendline to, and then click the Chart Design tab.
For example, in a line chart, click one of the lines in the chart, and all the data marker of that data series become selected.
-
On the Chart Design tab, click Add Chart Element, and then click Trendline.
-
Choose a trendline option or click More Trendline Options.
You can choose from the following:
-
Exponential
-
Linear
-
Logarithmic
-
Polynomial
-
Power
-
Moving average
You can also give your trendline a name and choose forecasting options.
-
Remove a trendline
-
On the View menu, click Print Layout.
-
Click the chart with the trendline, and then click the Chart Design tab.
-
Click Add Chart Element, click Trendline, and then click None.
You can also click the trendline and press DELETE .
-
Click anywhere in the chart to show the Chart tab on the ribbon.
-
Click Format to open the chart formatting options.
-
Open the Series you want to use as the basis for your Trendline
-
Customize the Trendline to meet your needs.
-
Use the switch to show or hide the trendline.
: Beginning with Excel version 2005, Excel adjusted the way it calculates the R2 value for linear trendlines on charts where the trendline intercept is set to zero (0). This adjustment corrects calculations that yielded incorrect R2 values and aligns the R2 calculation with the LINEST function. As a result, you may see different R2 values displayed on charts previously created in prior Excel versions. For more information, see Changes to internal calculations of linear trendlines in a chart.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.