Note: These steps apply to Office 2013 and newer versions. Looking for Office 2010 steps?
Add a trendline
- Firstly, pick a chart.
- Secondly, choose the + to the top right of the chart.
- Thirdly, click Trendline.
Note: Excel displays the Trendline option only if you choose a chart with multiple data series. This is based on the event that yo choose no data series.
- Finally, pick any preferable data series options. Do this in the Add Trendline dialogue box. Then, press OK.
Format a trendline
- Firstly, select any area in the chart.
- Secondly, choose the trendline choice in the drop-down list. Do this in the Format tab. This is within the Current Selection group.
- Thirdly, select Format Selection.
- Next, pick a Trendline Option to select your desired trendline for your chart. This will be done in the Format Trendline pane. Formatting a trendline is a statistical way to measure data:

- Finally, set a value in the Forward and Backward fields to cast your data into the future.
Add a moving average line
You can format your trendline to a moving average line.
- Select anywhere in the chart.
- Click the trendline option in the drop-down list. Do this in the Format tab. This is within the Current Selection group.
- Select Format Selection.
- Choose Moving Average. Find this in the Format Trendline pane, under Trendline Options. Then, state the points if necessary.
Note: A moving average’s total points trendline equals the total amount of points in the series. Then, you minus the number that you specify for the period from this.
Add a trend or moving average line to a chart in Office 2010
Add a trendline (Office 2010)
On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the data series to which you want to add a trendline or moving average, or do the following to select the data series from a list of chart elements:
Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
Note: If you select a chart that has more than one data series without selecting a data series, Excel displays the Add Trendline dialog box. In the list box, click the data series that you want, and then click OK.
On the Layout tab, in the Analysis group, click Trendline.
Do one of the following:
Click a predefined trendline option that you want to use.Note: This applies a trendline without enabling you to select specific options.
Click More Trendline Options, and then in the Trendline Options category, under Trend/Regression Type, click the type of trendline that you want to use.
Use this type | To create |
---|---|
Linear | A linear trendline by using the following equation to calculate the least squares fit for a line:![]() |
Logarithmic | A logarithmic trendline by using the following equation to calculate the least squares fit through points:![]() |
Polynomial | A polynomial or curvilinear trendline by using the following equation to calculate the least squares fit through points:![]() ![]() |
Power | A power trendline by using the following equation to calculate the least squares fit through points:![]() |
Exponential | An exponential trendline by using the following equation to calculate the least squares fit through points:![]() |
Moving average | A moving average trendline by using the following equation: ![]() |
R-squared value | A trendline that displays an R-squared value on a chart by using the following equation:![]() |
If you select Polynomial, type the highest power for the independent variable in the Order box.
If you select Moving Average, type the number of periods that you want to use to calculate the moving average in the Period box.
If you add a moving average to an xy (scatter) chart, the moving average is based on the order of the x values plotted in the chart. To get the result that you want, you might have to sort the x values before you add a moving average.
If you add a trendline to a line, column, area, or bar chart, the trendline is calculated based on the assumption that the x values are 1, 2, 3, 4, 5, 6, etc.. This assumption is made whether the x-values are numeric or text. To base a trendline on numeric x values, you should use an xy (scatter) chart.
Excel automatically assigns a name to the trendline, but you can change it. In the Format Trendline dialog box, in the Trendline Options category, under Trendline Name, click Custom, and then type a name in the Custom box.
Tips:
- You can also create a moving average, which smoothes out fluctuations in data and shows the pattern or trend more clearly.
- If you change a chart or data series so that it can no longer support the associated trendline — for example, by changing the chart type to a 3-D chart or by changing the view of a PivotChart report or associated PivotTable report — the trendline no longer appears on the chart.
- For line data without a chart, you can use AutoFill or one of the statistical functions, such as GROWTH() or TREND(), to create data for best-fit linear or exponential lines.
Change the format of a trendline (Office 2010)
- On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the trendline that you want to change, or do the following to select it from a list of chart elements.
- Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
- On the Layout tab, in the Analysis group, click Trendline, and then click More Trendline Options.
- To change the color, style, or shadow options of the trendline, click the Line Color, Line Style, or Shadow category, and then select the options that you want.
Specify the number of periods to include in a forecast (Office 2010)
- On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the trendline that you want to change, or do the following to select it from a list of chart elements.
- Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
- On the Layout tab, in the Analysis group, click Trendline, and then click More Trendline Options.
- To specify the number of periods that you want to include in a forecast, under Forecast, click a number in the Forward periods or Backward periods box.
Specify the point where the trendline crosses the vertical (value) axis (Office 2010)
- On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the trendline that you want to change, or do the following to select it from a list of chart elements.
- Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
- On the Layout tab, in the Analysis group, click Trendline, and then click More Trendline Options.
- Select the Set Intercept = check box, and then in the Set Intercept = box, type the value to specify the point on the vertical (value) axis where the trendline crosses the axis.Note: You can do this only when you use an exponential, linear, or polynomial trendline.
Display the trendline equation on the chart (Office 2010)
- On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the trendline that you want to change, or do the following to select it from a list of chart elements.
- Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
- On the Layout tab, in the Analysis group, click Trendline, and then click More Trendline Options.
- To display the trendline equation on the chart, select the Display Equation on chart check box.Note: You cannot display trendline equations for a moving average.
Tip: The trendline equation is rounded to make it more readable. However, you can change the number of digits for a selected trendline label in the Decimal places box on the Number tab of the Format Trendline Label dialog box. (Format tab, Current Selection group, Format Selection button).
Display the R-squared value for a trendline (Office 2010)
- On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the trendline for which you want to display the R-squared value, or do the following to select the trendline from a list of chart elements:
- Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
- On the Layout tab, in the Analysis group, click Trendline, and then click More Trendline Options.
- On the Trendline Options tab, select Display R-squared value on chart.
Note: You cannot display an R-squared value for a moving average.
Remove a trendline (Office 2010)
- On an unstacked, 2-D, area, bar, column, line, stock, xy (scatter), or bubble chart, click the trendline that you want to remove, or do the following to select the trendline from a list of chart elements:
- Click anywhere in the chart.This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click the chart element that you want.
- Do one of the following:
- On the Layout tab, in the Analysis group, click Trendline, and then click None.
- Press DELETE.
- On the Layout tab, in the Analysis group, click Trendline, and then click None.
Tip: You can also remove a trendline immediately after you add it to the chart by clicking Undo on the Quick Access Toolbar, or by pressing CTRL+Z.
Need more help?
You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.
See Also
Create a chart from start to finish
This information was compiled using information courtesy of © Microsoft 2020. All rights reserved.