What a trendline does and when you need one

A trendline is a line Excel draws through your data points to show the overall direction they're moving. If you have sales figures scattered across twelve months, a trendline smooths out the ups and downs and shows you whether sales are generally climbing, falling, or staying flat. Excel calculates the line mathematically so it represents the pattern in your actual numbers.

You add a trendline to a chart that already exists in your spreadsheet — not to raw data in cells. The chart itself (a scatter plot, line chart, or column chart) comes first; the trendline comes second. Trendlines work best when your data has enough points to show a real pattern, usually at least five or six data pairs.

Key Takeaways

  • You must have a chart already created in Excel before you can add a trendline to it.
  • Right-click on any data point in your chart, select "Add Trendline", and choose the type that matches your data pattern — linear for straight trends, exponential for rapid growth, polynomial for curves.
  • The trendline equation and R-squared value can be displayed on the chart itself to show how well the line fits your actual data.
  • Moving or changing your original data updates the trendline automatically, so you do not need to recreate it.

Creating the chart before adding the trendline

Start by selecting the data you want to chart. Highlight the cells that contain your numbers — for example, months in one column and sales figures in another. Include the header row if you have one. Then go to the Insert tab at the top of Excel and click Chart. Excel will show you chart type options: choose the one that fits your data (scatter plots and line charts work well with trendlines).

Once your chart appears on the spreadsheet, you are ready to add the trendline. The chart does not have to be perfect yet — you can adjust colors, labels, and other details later. What matters is that your data is plotted and visible.

The steps to add a trendline

Click on the chart to select it. You will see a border around the chart with small squares at the corners and edges. Now right-click directly on one of the data points (the dots or markers on your chart, not on the axes or background). A menu will appear with several options.

Look for Add Trendline in that menu and click it. A panel will open on the right side of your screen (or a dialog box, depending on your Excel version) with trendline options. This is where you choose what type of trendline fits your data best.

Choosing the right trendline type

Linear is the most common choice and works when your data moves in a roughly straight line — either up, down, or flat. If your sales increase by about the same amount each month, linear is your answer.

Exponential is for data that grows or shrinks rapidly, speeding up over time. Viral spread, compound interest, or bacterial growth often follow exponential patterns. Polynomial creates a curved line and works when your data dips and rises — for example, temperature throughout a day or product sales over a product lifecycle.

Power and Moving Average are less common. Power trendlines fit data where one variable depends on another raised to a power. Moving Average smooths out short-term noise by averaging groups of points, useful for stock prices or weather data with daily fluctuations.

If you are unsure which type fits, start with linear. You can always delete it and try another type by right-clicking the trendline itself and selecting Delete.

Displaying the equation and fit value on your chart

In the trendline panel, you will see checkboxes for Display Equation on chart and Display R-squared value on chart. Check both if you want to see them.

The equation (like y = 2.5x + 10) tells you the mathematical relationship between your variables — useful if you want to predict future values. The R-squared value (a number between 0 and 1) shows how well the trendline fits your actual data. A value closer to 1 means the line matches your data points closely; closer to 0 means the pattern is messier and the line is a rough guess. An R-squared of 0.85 or higher usually means a good fit.

Adjusting the trendline after you add it

Once the trendline appears on your chart, you can change its appearance. Right-click on the trendline itself (the line, not the data points) and select Format Trendline. You can adjust the color, thickness, and style (solid, dashed, dotted). You can also change the trendline type here if you decide linear was not the right choice.

If your original data changes, the trendline updates automatically — you do not need to delete and recreate it. If you want to remove the trendline entirely, right-click it and select Delete.

Common reasons a trendline might not appear

If you right-click and do not see "Add Trendline" as an option, you may have clicked on the chart background instead of a data point. Try right-clicking directly on one of the colored dots, bars, or line segments that represent your data.

Some chart types do not support trendlines — pie charts and doughnut charts, for example. If you are using one of those, switch to a scatter plot or line chart first. Also, if your data has only one or two points, Excel will not let you add a trendline because there is no pattern to show.

Frequently Asked Questions

Can I add more than one trendline to the same chart?

Yes. Right-click on a different data series (if you have multiple series) or on the same series again, and select "Add Trendline" a second time. Each trendline will appear as a separate line on your chart. This is useful when you want to compare trends across different datasets.

What does the R-squared value actually mean?

R-squared tells you what percentage of the variation in your data is explained by the trendline. An R-squared of 0.92 means the trendline accounts for 92% of the ups and downs in your numbers. The remaining 8% is noise or factors the trendline does not capture. Higher is better, but even 0.7 can be useful depending on your data.

Can I use the trendline equation to predict future values?

Yes, if the R-squared value is reasonably high (0.7 or above). Plug a future x-value into the equation to estimate the y-value. For example, if your equation is y = 3x + 5 and you want to predict month 13, calculate 3(13) + 5 = 44. Keep in mind that predictions get less reliable the further you extend beyond your actual data.

Why does my trendline look jagged instead of smooth?

You may have selected "Moving Average" without realizing it. Moving Average creates a stepped line that follows your data more closely than other types. Switch to linear, exponential, or polynomial if you want a smoother line that shows the overall trend rather than short-term fluctuations.