Excel Trendline Values: Show and Calculate Them

Charts & pivot tables · Updated November 21, 2026

Yes. In Excel for Microsoft 365 on Windows, select the chart, choose Chart Design > Add Chart Element > Trendline > More Trendline Options, then select Display Equation on chart. That displays the trendline’s equation; to get predicted trendline values in worksheet cells, calculate them separately from your data.

Display a trendline equation on a chart

First, make a chart from the data you want to analyze. For a relationship between two numeric variables, an XY (Scatter) chart is usually the clearest choice: put the independent, or x, values in one column and the dependent, or y, values in another. Select the chart and add a trendline using the Chart Design ribbon path above. In the Format Trendline pane, choose the trendline type, then select Display Equation on chart. Excel places the equation as a chart label that you can move or format.

You can also select the chart, use the Chart Elements button (the plus sign beside the chart) in Windows, and choose Trendline > More Options. Or, if a trendline is already present, right-click it and select Format Trendline. The pane lets you change its type and display options. On Mac, use the chart’s Chart Design > Add Chart Element controls or open Format Trendline; labels and pane layout can differ slightly from Windows. The equation checkbox is the option to look for.

If you do not yet have a chart, select the data and choose Insert > Insert Scatter (X, Y) or Bubble Chart. After the chart appears, add the trendline. Excel’s available options depend on the chart and data; a trendline is not the same as displaying every fitted value as a new column in the worksheet.

What the equation and R-squared mean

For a linear trendline, Excel shows an equation in the form y = mx + b. Here, m is the slope: the estimated change in y for a one-unit increase in x. The b is the y-intercept, or the model’s estimated y value when x is zero. For example, y = 2x + 1 predicts y = 11 when x is 5. That prediction comes from the fitted line, not necessarily from an observed row in your data.

The equation label may also show an R-squared value if you select Display R-squared value on chart in the Format Trendline pane. R-squared describes how closely the fitted model accounts for variation in the observed y values under the model’s definition. It is not proof that the relationship is causal, that the model is appropriate, or that future predictions will be accurate. A high value can still accompany a misleading model, especially when data are sparse or the relationship bends in a way a straight line cannot capture.

Other trendline types have different equations. A polynomial trendline, for example, includes powers of x; an exponential trendline uses exponential growth or decay. Do not interpret their coefficients as though they were the slope and intercept of a simple straight line.

Calculate a predicted trendline value in a cell

If you need a numeric prediction for a particular x value, use a worksheet formula rather than copying the equation text from the chart. For a linear fit, FORECAST.LINEAR calculates the predicted y from known x and y data. Keep the ranges aligned: each x value must correspond to the y value in the same row.

Assume x values are in A2:A5 and y values are in B2:B5, with (1,3), (2,5), (3,7), and (4,9); put the x value to predict, 5, in D2. Enter =FORECAST.LINEAR(D2,$B$2:$B$5,$A$2:$A$5) in another cell. The result is 11. The data follow y = 2x + 1 exactly, so the calculation agrees with the chart’s linear trendline.

FORECAST.LINEAR is useful when you want a prediction without manually extracting the displayed coefficients. Its prediction is based on a linear relationship, so it does not automatically reproduce a polynomial or other non-linear trendline chosen on the chart. Also note that forecasting beyond the observed x range is extrapolation. Excel will return a number, but the data do not establish that the pattern continues beyond the measured range.

Calculate slope and intercept separately

To see the linear model’s coefficients in worksheet cells, use SLOPE and INTERCEPT. With x values in A2:A5 and y values in B2:B5 as in the example above, enter =SLOPE(B2:B5,A2:A5) in one cell; it returns 2. With the same ranges, enter =INTERCEPT(B2:B5,A2:A5) in another cell; it returns 1. Those results give y = 2x + 1.

These functions are helpful when you want to build a prediction or report using the coefficients. If the chart’s trendline is configured to force the intercept to a specified value, however, ordinary SLOPE and INTERCEPT results may not match that chart model. In the Format Trendline pane, Excel can set the intercept for applicable trendlines; leave that option unchecked if you want the usual freely fitted intercept. For exact calculations, make sure the chart and cell formulas use the same data and model assumptions.

Choose the trendline that fits the data

Excel offers several trendline types, but choosing one just because its equation looks familiar can give a poor analysis. Consider the shape of the data, what the variables mean, and whether the model is reasonable in the range where you plan to use it.

  • Linear: A straight-line pattern; each equal increase in x corresponds to a constant estimated change in y.
  • Logarithmic: A curve that can rise or fall quickly and then level off. It requires positive x values.
  • Exponential: A pattern where y changes by a proportional rate rather than a fixed amount. Exponential trendlines require positive y values.
  • Power: A curved relationship represented by a power of x; the data must have positive x and y values.
  • Polynomial: A curve that can bend, with the selected order controlling how many bends the fitted equation can have. Higher order is not automatically better and can overfit a small dataset.
  • Moving average: A smoothed line that averages a chosen number of neighboring points. It helps reveal a changing pattern, but it does not provide the same kind of equation for predicting y from x.

For a time series, check whether the x-axis is genuinely numeric or just a set of equally spaced categories. A line chart may treat dates or labels as category positions, while an XY scatter chart uses numeric x distances. If intervals between measurements vary, a scatter chart can represent those intervals more faithfully.

Make the equation readable and useful

Excel rounds the equation displayed on a chart, so the visible coefficients may not have enough precision to reproduce a calculated value exactly. To show more digits, right-click the equation label, choose Format Trendline Label, and adjust the number format in the pane. You can also enlarge the chart or move the label so it does not cover points. More displayed digits improve readability of the coefficients, but they do not make a poorly chosen model more reliable.

For a report, include the units and the x range that supports the model. A slope of 2 means two y units per one x unit, not simply “2” in every context. If x represents days and y represents items sold, the slope is in items per day. State whether a prediction lies inside the observed range or extends beyond it; readers need that context to judge how much confidence to place in it.

Common problems and fixes

  • No equation appears: Select the trendline itself, open Format Trendline, and turn on Display Equation on chart. A moving average does not provide an ordinary fitted equation to display.
  • The equation differs from a hand calculation: Check that both use the same rows, trendline type, and intercept setting. Also check whether the chart’s displayed coefficients are rounded.
  • The line looks wrong: Confirm that the x and y data were assigned correctly. For two numeric variables, use an XY scatter chart rather than relying on category positions in a line chart.
  • Excel rejects the trendline type: Some types require positive values. Check for zero or negative values in the relevant x or y data before selecting logarithmic, exponential, or power.
  • The prediction is unexpectedly far away: Check the units and x range, and confirm that the formula’s known_x and known_y ranges line up. A formula can calculate an extrapolation even when that extrapolation is not meaningful.

When to use a chart equation versus a formula

Use the chart equation when you want to annotate a visual explanation, compare the fitted shape with the data points, or show an approximate model directly on a chart. Use worksheet formulas when you need repeatable values, calculations for many x inputs, or coefficients that feed other formulas. The chart label is a display element; it is not a live table of fitted y values.

If you need a fitted value for every existing x point, you can apply a suitable formula to each x value, or use the model’s equation in a helper column. For a straight-line fit, FORECAST.LINEAR can calculate the value at each x. For a non-linear fit, use a formula that matches that model rather than assuming the chart label itself can populate cells. Keep the original observations beside calculated values so the difference between measured data and model estimates remains clear.

Frequently Asked Questions

How do I show the trendline equation in Excel?

Select the chart, choose Chart Design > Add Chart Element > Trendline > More Trendline Options, then select Display Equation on chart in the Format Trendline pane. If a trendline is already on the chart, right-click it and choose Format Trendline.

How do I show trendline values in Excel cells?

The equation checkbox only displays a chart label. For a linear model, use FORECAST.LINEAR with your target x value and aligned known y and x ranges to calculate predicted y values in cells.

Why is the Excel trendline equation rounded?

The chart label uses a number format that may show only a few digits. Right-click the equation label, choose Format Trendline Label, and increase the displayed decimal places. A rounded label can produce slightly different hand-calculated predictions.

Can Excel show an equation for a moving average trendline?

A moving average smooths neighboring observations rather than fitting a single equation of y against x, so it does not have the usual equation label. Choose a fitted trendline type, such as linear, if you need an equation.

Is R-squared the same as prediction accuracy?

No. R-squared summarizes fit to the data used to create the model; it does not guarantee accurate predictions or demonstrate cause and effect. Consider the data, model assumptions, and whether predictions stay within the observed range.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.