How to Add Trend Line in Excel

This guide treats “add trend line in excel” the way busy spreadsheet users actually want it: answer first, a live tool to prove it on your own data, then the reasoning. It is written for Excel but calls out every place Google Sheets differs, and the platform toggle at the top switches all shortcuts between Windows and Mac so nothing here assumes the keyboard you are not on.

Exact answer

In Excel: click the chart, open the ➕ Chart Elements button and tick Trendline — then right-click the line ▸ Format Trendline to pick the type and show the equation and R².

ƒxCorrelation & TrendlineLive

6 pairs

Correlation (r)
0.9981

R² = 0.9962

Slope
1.9857

Intercept = 0.1667

=CORREL(A2:A10,B2:B10) · =SLOPE(B,A) · =RSQ()
=SLOPE(known_ys, known_xs)
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

A trendline is a fitted line drawn through a data series: linear by default, with exponential, logarithmic, polynomial, power and moving-average alternatives in the Format Trendline pane. Two checkboxes at the bottom of that pane matter more than the line itself — "Display Equation on chart" and "Display R-squared value on chart". The equation lets you reproduce the fit in a formula, and R² tells you how much of the variation the line actually explains, which is the difference between a trend and a decoration. Excel also exposes the same maths as worksheet functions: SLOPE, INTERCEPT, RSQ, LINEST and TREND. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “add trend line in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

Twelve months of revenue in B2:B13 against month numbers in A2:A13. Click the chart ▸ ➕ ▸ Trendline ▸ Linear. Right-click the line ▸ Format Trendline ▸ tick Display Equation and Display R-squared. If the chart shows y = 3,120x + 41,500 and R² = 0.87, revenue is rising about €3,120 a month and the straight line explains 87% of the variation. The same numbers without a chart: =SLOPE(B2:B13,A2:A13) returns 3120, =RSQ(B2:B13,A2:A13) returns 0.87. A trendline turns a scatter of points into a stated rate of change, and the equation plus R² is what makes that statement defensible instead of a line someone drew through the noise. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. Treat “add trend line in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.

Common mistakes

  • Fitting a high-order polynomial because it hugs the points — an order-6 fit through 12 points has almost no predictive value and a flattering R².
  • Adding a trendline to a bar chart of categories, where the x-axis has no numeric meaning.
  • Quoting the slope without R², which hides how well the line actually fits.
  • Forecasting far beyond the data and presenting the extension as a measurement rather than an assumption.
  • Leaving unequal time gaps in the x values while treating them as evenly spaced — use a scatter chart with real x values.

Frequently asked questions

How do I add a trendline in Excel?

Click the chart, press the ➕ Chart Elements button and tick Trendline. On Mac use Chart Design ▸ Add Chart Element ▸ Trendline.

How do I show the trendline equation?

Right-click the trendline, choose Format Trendline, and tick "Display Equation on chart" and "Display R-squared value on chart" at the bottom of the pane.

What does R-squared mean?

The share of the variation in your data that the fitted line explains, from 0 to 1. R² = 0.87 means 87%. A low R² means the line is drawn but the relationship is weak.

Can I get the trend without a chart?

Yes — =SLOPE(known_ys, known_xs) and =INTERCEPT(known_ys, known_xs) give the same line, =RSQ() gives R², and =TREND() returns fitted values for new x inputs.

Other ways people ask this

People reach this page typing “how to add a trend line in excel”, “how to add trend lines in excel” and “excel add trend line”, among other phrasings; whichever wording you used, the fix above is the one you want.

Why do people search for this in so many different ways?

Because the same task has many names. “how to add a trend line in excel”, “how to add trend lines in excel”, “excel add trend line” all point at the one operation explained on this page, which is why they all lead here.