A trendline shows the direction your data is moving
A trendline is a line drawn through your data points on an Excel chart that shows whether values are going up, down, or staying flat over time. It filters out the noise in your numbers and lets you see the actual pattern. If you're tracking sales month to month and they jump around, a trendline cuts through the ups and downs to show whether your business is growing or shrinking overall.
Excel can draw several types of trendlines depending on your data. A straight line works for data that moves steadily in one direction. A curved line works better if your data accelerates or decelerates. You can also add a trendline that predicts future values based on past patterns — useful if you want to estimate next quarter's numbers.
Key Takeaways
- Right-click the data series (the bars or points on your chart) and select "Add Trendline" to open the trendline menu.
- Choose "Linear" for a straight-line trend, "Exponential" if your data accelerates, or "Polynomial" if it curves.
- Check the "Display Equation on Chart" box to see the mathematical formula, and "Display R-squared Value" to see how well the line fits your actual data.
- You can extend the trendline forward or backward to predict values outside your current data range.
How to insert a trendline in three steps
Start with a chart already in your spreadsheet. The chart needs to have data plotted as points, bars, or columns — trendlines don't work on pie charts or other chart types that don't show individual values.
Right-click directly on one of the data points or bars in your chart. A menu appears. Click "Add Trendline" (the exact wording varies slightly by Excel version, but it will say "Trendline"). A panel opens on the right side of your screen with trendline options.
In that panel, you'll see "Linear" is selected by default. This draws a straight line through your data. Leave it as is if your data moves steadily up or down. If your data curves or accelerates, click "Exponential" or "Polynomial" instead. Then click the X to close the panel. The trendline appears on your chart immediately.
Choosing the right trendline type for your data
Linear is the most common choice. Use it when your data increases or decreases at a steady rate — like revenue growing by roughly the same amount each month, or temperature dropping consistently as you go higher in altitude. The trendline will be a straight diagonal line.
Exponential works when your data accelerates — it grows faster and faster, or shrinks faster and faster. Use this for things like viral spread, compound interest, or bacterial growth. The line curves upward (or downward) rather than staying straight.
Polynomial fits data that changes direction or has multiple curves. If your data goes up, then down, then up again, polynomial can follow that pattern. You choose the degree (2, 3, 4, or higher) — higher numbers create more curves, but they can also fit noise rather than real patterns. Start with 2 (a simple curve) unless you have a specific reason to go higher.
Power, Logarithmic, and Moving Average are less common. Power works for relationships where one variable depends on another raised to a power. Logarithmic fits data that rises quickly at first then levels off. Moving Average smooths out short-term fluctuations. Most everyday spreadsheets use Linear or Exponential.
Adding an equation and R-squared value to your trendline
The equation tells you the exact mathematical relationship between your variables. If your trendline equation is y = 2x + 50, that means for every unit increase in x, y increases by 2, starting from a base of 50. This is useful if you want to predict a value that isn't on your chart.
To display the equation, right-click the trendline itself (not the data points — the line you just drew). Click "Format Trendline". In the panel that opens, check the box for "Display Equation on Chart". The formula appears on your chart.
The R-squared value tells you how well your trendline actually fits your data. It ranges from 0 to 1. A value of 1 means the line passes through every single data point perfectly. A value of 0.95 means the line explains 95% of the variation in your data — very good. A value of 0.5 means the line only explains half the variation — your data is scattered and the trend is weak. Check "Display R-squared Value" in the same Format Trendline panel to see this number on your chart.
Extending a trendline to predict future values
Once you have a trendline, you can extend it forward to estimate what comes next, or backward to estimate what came before your data starts. Right-click the trendline and select "Format Trendline" again.
In the panel, look for "Forecast" options. Under "Forward", enter a number — this is how many periods (months, years, whatever your x-axis measures) to extend the line into the future. Under "Backward", enter how many periods to extend it into the past. The line stretches across your chart, and you can read off estimated values where it goes.
Remember: this is a prediction based on the pattern in your existing data. If conditions change, the prediction will be wrong. A trendline that fit your past data perfectly might not predict the future accurately.
Removing or changing a trendline
To delete a trendline, right-click it and select "Delete". The line disappears but your chart and data stay intact.
To change the type, right-click the trendline, select "Format Trendline", and choose a different option from the panel — Linear, Exponential, Polynomial, or another type. The line redraws immediately with the new shape.
You can also add more than one trendline to the same chart if you're comparing multiple data series. Right-click each data series separately and add its own trendline. This is useful if you're tracking two products' sales and want to see which one is growing faster.
Common mistakes when adding trendlines
The most common mistake is right-clicking the chart background or axis instead of the actual data. You need to click directly on a data point, bar, or column. If the menu that appears doesn't include "Add Trendline", you clicked the wrong thing — try again on the data itself.
Another mistake is choosing the wrong trendline type and not checking the R-squared value. If you pick Linear but your data is clearly curved, the R-squared will be low (maybe 0.6 or 0.7) and the line won't match your data well. Switch to Polynomial and watch the R-squared jump to 0.95 or higher. The better fit means you chose the right shape.
A third mistake is trusting a trendline too far into the future. A line that fits your past six months of data perfectly might be useless for predicting six months ahead if market conditions change. Use trendlines to understand patterns in what already happened, not as a crystal ball.
Frequently Asked Questions
Can I add a trendline to a pie chart?
No. Pie charts show parts of a whole, not individual values plotted over time or against another variable. Trendlines only work on charts where each data point is visible — like column charts, line charts, scatter plots, and bar charts.
What does R-squared value mean in plain terms?
R-squared tells you what percentage of your data's variation the trendline explains. An R-squared of 0.85 means the trendline accounts for 85% of the ups and downs in your numbers. The remaining 15% is noise or factors the trendline doesn't capture. Higher is better, but 0.7 and above is usually considered a good fit.
How do I know which trendline type to use?
Start with Linear — it works for most business data. If the line doesn't match your data points well (low R-squared), try Exponential if your data accelerates, or Polynomial if it curves. Plot each type and compare their R-squared values. The type with the highest R-squared fits best.
Can I change the color or style of a trendline?
Yes. Right-click the trendline and select "Format Trendline". In the panel, look for "Line" options where you can change the color, thickness, and dash style. This is useful if you're printing in black and white or want the trendline to stand out more.
What if my data has outliers that throw off the trendline?
A single extreme value can pull a trendline out of shape, especially with Linear or Exponential types. Check whether the outlier is a real value or a data entry error. If it's real but unusual, consider using Polynomial, which can bend around extreme points. You can also delete the outlier temporarily to see what the underlying trend looks like, then add it back for the final chart.