What a trendline does and when you need one
A trendline is a line that Excel draws through your data points to show the overall direction or pattern. If you have a chart showing your monthly expenses over a year, a trendline shows whether they are going up, down, or staying flat. Excel calculates the line mathematically so it sits as close as possible to all your actual data points.
You add a trendline when you want to see the big picture instead of the ups and downs. A chart of your utility bills might jump around month to month, but a trendline shows whether you are actually using more energy over time. Trendlines work on any chart type that has an X-axis and Y-axis — column charts, line charts, scatter plots, and area charts all support them.
Key Takeaways
- You add a trendline by right-clicking on the data series in your chart and selecting "Add Trendline" from the menu.
- Excel offers five types of trendlines: linear (straight line), exponential (curved upward), polynomial (wavy), power (curved), and moving average (smooths out bumps).
- A linear trendline works for most situations where you want to see if something is generally increasing or decreasing.
- You can display the equation and R-squared value on the chart itself so readers understand how well the trendline fits your actual data.
How to insert a trendline in three steps
First, create your chart with your data. Highlight your data including headers, go to the Insert tab, and choose your chart type. Once the chart appears on your spreadsheet, you are ready to add the trendline.
Second, right-click directly on one of the data points in your chart — the dots, bars, or line itself, depending on your chart type. A menu will appear. Click "Add Trendline" near the bottom of the menu. A panel labeled "Format Trendline" will open on the right side of your screen.
Third, choose your trendline type from the options shown. Linear is the default and works for most cases. Click the X to close the panel when you are done. The trendline now appears on your chart as a straight or curved line running through your data.
The five trendline types and which one to use
Linear is a straight line and the most common choice. Use it when your data moves steadily up or down. If you are tracking sales growth, weight loss, or temperature changes over time, linear usually shows the pattern clearly.
Exponential curves upward and works when something is accelerating — like bacteria growth, investment returns, or viral spread. The line starts shallow and gets steeper as it moves right.
Polynomial creates a wavy line that can bend up and down multiple times. Use it when your data has peaks and valleys but you still want to see the overall shape. A polynomial trendline might show seasonal patterns in sales data.
Power is a curved line that works for relationships where one thing depends on another in a non-linear way. It is less common in everyday spreadsheets but appears in scientific data.
Moving average smooths out short-term bumps by averaging groups of nearby points. If your daily sales data is noisy, a moving average trendline shows the underlying trend without the daily noise.
Displaying the equation and R-squared value
The R-squared value tells you how well your trendline actually fits your data. It ranges from 0 to 1, where 1 means the trendline matches your data perfectly and 0 means it does not match at all. Most real-world data has an R-squared between 0.5 and 0.9.
To show these values on your chart, right-click the trendline itself and select "Format Trendline" again. In the panel on the right, check the boxes for "Display Equation on chart" and "Display R-squared value on chart." Both will appear as text on your chart. The equation shows the mathematical formula Excel used to draw the line, which is useful if you want to predict future values.
A high R-squared (above 0.8) means your trendline is reliable for spotting the real pattern. A low R-squared (below 0.5) means your data is scattered and the trendline is just a rough guide. Neither is wrong — it just tells you how much noise is in your data.
Common mistakes and how to avoid them
The most common mistake is right-clicking on the chart background instead of the data itself. You need to click directly on a data point — a bar, dot, or line segment. If the menu that appears does not include "Add Trendline," you clicked the wrong spot. Try again on the actual data.
Another mistake is choosing the wrong trendline type for your data. If you pick polynomial when linear would work, your trendline becomes unnecessarily complicated and harder to read. Start with linear, and only switch types if the line clearly does not match your data shape.
Do not assume a trendline proves cause and effect. A trendline showing that ice cream sales and drowning deaths both rise in summer does not mean ice cream causes drowning. Trendlines show correlation, not causation. They show that two things move together, not that one causes the other.
Editing or removing a trendline
To change your trendline after you have added it, right-click on the trendline itself (not the data points) and select "Format Trendline." The panel opens again and you can switch the type, adjust the R-squared display, or change colors and thickness.
To remove the trendline entirely, right-click it and select "Delete." The line disappears and your chart returns to showing only the data points. You can always add a new trendline later if you change your mind.
Frequently Asked Questions
Can I add more than one trendline to the same chart?
Yes. If your chart has multiple data series (for example, sales for Product A and Product B), you can add a separate trendline to each series. Right-click on the first data series, add its trendline, then right-click on the second series and add another. Each trendline can be a different type.
What does the equation on the trendline mean?
The equation is in the form y = mx + b, where m is the slope (how steep the line is) and b is where the line crosses the Y-axis. If your equation shows y = 2x + 10, it means for every unit increase in X, Y increases by 2. You can use this to predict future values by plugging in a new X number.
Why does my trendline not look like it goes through my data points?
That is normal. A trendline is not supposed to touch every point — it is supposed to sit as close as possible to all of them on average. If your data is scattered, the trendline will miss many individual points while still showing the overall direction.
Should I use a trendline if my R-squared is below 0.5?
You can, but be honest about what it means. A low R-squared tells readers that your data is noisy and the pattern is weak. A trendline is still useful for showing direction, but do not claim it is a strong or reliable pattern. Always display the R-squared value so readers can judge for themselves.