Excel Trendlines: How to Add, Format, and Read Them

How-to basics · Updated November 18, 2026

To add a trendline in Excel for Microsoft 365 on Windows, select a chart, choose the plus-shaped Chart Elements button, check Trendline, and select the data series and trendline type. For more control, open More Options to choose a model, extend its forecast, or display its equation and R-squared value.

Step-by-step: Add a trendline

A trendline is attached to a data series in a chart, so create the chart first. These steps work in Excel for Microsoft 365 on Windows:

  1. Select the data to chart, including column headings. For example, select a column of months and a column of monthly sales.
  2. Choose Insert and create a suitable chart, such as a Scatter chart for numeric x-values or a Line chart for values across ordered categories.
  3. Select the chart. Click the plus-shaped Chart Elements button beside it, then check Trendline.
  4. To choose a particular model or adjust settings, point to Trendline, click the arrow beside it, and choose More Options. The Format Trendline pane opens.
  5. In the pane, choose a trendline type. Depending on the type, you can also set options such as the forecast, intercept, or polynomial order.

You can also select the chart and use Chart Design > Add Chart Element > Trendline > More Trendline Options. Another route is to right-click the plotted data series and choose Add Trendline. Make sure you select the series itself rather than the chart background; otherwise, the command may not appear. On Mac, use the Chart Design ribbon path; the exact position of chart controls can differ by Excel version. Excel for the web has fewer chart-formatting controls in some builds, so open the workbook in the desktop app if a required trendline option is missing.

Prepare the data and choose the chart

Trendlines are most useful when the chart makes the relationship between the data and the horizontal axis clear. Keep one observation per row, put the x-values in one column and the measured values in another, and use descriptive headings. Check that numbers stored as text, empty cells, or unintended totals are not being plotted as observations.

The chart type affects how Excel interprets the horizontal values. A Line chart normally treats its horizontal axis as categories: January, February, and March are spaced as successive positions, even if the dates are not equally far apart. A Scatter chart uses numeric x-values and spaces points according to their actual values. Use Scatter when intervals matter—for example, measurements taken on days 1, 3, and 20—or when you are comparing one numeric variable with another. A Line chart is often suitable for regularly spaced dates or named categories.

Trendlines are available for many common two-dimensional charts, including Scatter, Line, Column, and Bar charts, but not every chart design supports them. Pie and doughnut charts, for example, do not show a trendline. If Excel will not offer the option, try a supported two-dimensional chart and check that the chart is not a stacked or three-dimensional design. A trendline belongs to a series, so a chart with several series may need a separate trendline for each one.

Choose the right trendline type

Excel offers several models. Choose based on the shape and meaning of the data, not simply on which line looks closest to the points. A more flexible curve can fit historical data tightly while giving a poor description of the process or a poor forecast.

  • Linear: A straight line suited to a roughly steady increase or decrease. It assumes the response changes by a similar amount for each unit of x.
  • Exponential: A curved model suited to growth or decline at a roughly constant percentage rate. The data values used for this model must be positive.
  • Logarithmic: A curve that can rise or fall quickly at first and then flatten. It requires positive x-values.
  • Polynomial: A curve that can represent bends or turning points. Excel lets you set its order; a higher order can create more bends and is easier to overfit.
  • Power: A model for relationships that change according to a power of x. It requires positive x- and y-values.
  • Moving Average: A smoothed line that averages nearby observations. Its period sets how many points are used in each average; a larger period smooths more but can hide short-term changes.

For instance, monthly sales that rise by about the same number of units each month may be described reasonably by a linear line. If sales instead increase by a similar percentage each month, an exponential model may be more appropriate. Those are different assumptions: a line that fits one short period does not prove that either pattern will continue.

Show and interpret the equation and R-squared

In the Format Trendline pane, select Display Equation on chart to show the model’s equation, or Display R-squared value on chart to show a measure of how closely the line fits the plotted values. For a linear model, the equation describes a straight line using a slope and an intercept. The slope indicates the model’s predicted change in y for a one-unit increase in x; the intercept is its predicted y-value at x = 0.

R-squared ranges from 0 to 1 in this context. A value closer to 1 indicates that the model accounts for a larger share of the variation in the observations being fitted. It does not show that one variable causes another, confirm that the model is appropriate, or guarantee accurate future predictions. Comparing R-squared values is most meaningful when the models use the same data and response variable. A high-order polynomial can score well on existing points yet behave implausibly beyond them.

The equation printed on the chart may be rounded for display. If you need to read its coefficients carefully, select the equation label, open Format Trendline Label, and adjust the number format and decimal places. Do not treat the displayed rounding as exact when reproducing a calculation; small coefficient differences can have a larger effect on distant forecasts.

Extend a trendline to forecast

Excel can extend some trendlines beyond the observed data. Select the trendline, open the Format Trendline pane, and enter a value under Forecast Forward or Forecast Backward. The value is measured in horizontal-axis units. With monthly observations on a regular category axis, a forward value of 3 extends the line by three category positions. With a Scatter chart, the extension is along the numeric x-axis, so check the axis scale and units before entering a value.

A trendline extension is a mathematical extrapolation, not a forecast that accounts for new information. It does not automatically know about seasonality, price changes, policy changes, capacity limits, or unusual events. A straight line extended far beyond the data may predict impossible values; an exponential line can rise or fall especially rapidly. Treat the result as one scenario based on the chosen model, and compare it with domain knowledge or other forecasting methods before relying on it.

To make a simple projection more credible, use enough observations to cover the pattern you are studying, keep time intervals consistent where possible, and inspect the chart for seasonal cycles or structural breaks. If the data has a repeating seasonal pattern, a single basic trendline may not represent it well.

Format a trendline so it is readable

Select the trendline to open its formatting controls. You can change its color, width, dash style, and other line effects in the Format Trendline pane. Choose a color that contrasts with the data series without overpowering the points. If the line crosses markers, make it visually distinct; on a Scatter chart, leaving the observations visible helps readers judge the fit rather than seeing only the model.

Give the chart a useful title and label the axes with units, such as “Month” and “Units sold.” If the equation or R-squared label overlaps the data, drag the label to an open area. A legend can help distinguish multiple series, but avoid adding a trendline to every series if it makes the chart difficult to interpret. For a moving average, state the period in a subtitle or note so readers know how much smoothing is applied.

Common problems and how to fix them

  • Trendline is unavailable: Confirm that you selected a supported two-dimensional chart and a data series, not the chart area. If necessary, change the chart type to Scatter or Line and try again.
  • The curve does not match expectations: Verify which values Excel is using on the horizontal axis. A Line chart may treat dates as equally spaced categories; switch to Scatter if actual numeric intervals should determine spacing.
  • An exponential or power option fails: Check the values against the model’s requirements. Exponential trendlines cannot use zero or negative y-values; power trendlines require positive x- and y-values, and logarithmic trendlines require positive x-values.
  • The equation seems inconsistent with the chart: Check that the trendline belongs to the intended series and that the chart uses the intended x-values. Also account for rounding in the displayed equation.
  • The forecast looks extreme: Shorten the extension and reconsider the model. Extrapolation magnifies the effect of a poor fit, especially for a high-order polynomial or an exponential curve.
  • The line is hard to read: Improve contrast, move the equation label, or simplify the chart. Confirm that the series and trendline are not using nearly identical colors or styles.

Trendlines versus other ways to show a pattern

A chart trendline is useful when you want a visual summary attached to plotted data. It is not the same as connecting observations with a line: connecting points shows the sequence of actual values, while a trendline summarizes a fitted pattern. A moving average is a smoothing line and can be more helpful when short-term variation obscures the broader direction.

For a time series with strong seasonality, a basic trendline may be too simple. Excel’s Forecast Sheet, available from Data > Forecast Sheet in desktop Excel, can create a forecast worksheet for time-based data and is designed to account for seasonality when the data supports it. It is a different tool with different assumptions, not a more accurate version of every trendline. For a chart intended only to show direction, a trendline may be all that is needed; for planning, inspect the model assumptions and forecast uncertainty as well.

Frequently Asked Questions

Can I add a trendline to a Line chart in Excel?

Yes. Select the Line chart, select its data series, and use Chart Elements > Trendline or Chart Design > Add Chart Element > Trendline. Remember that a Line chart commonly spaces category labels evenly, so use Scatter when the actual numeric distance between x-values matters.

How do I show a trendline equation in Excel?

Select the trendline to open Format Trendline, then check Display Equation on chart. The option is in the trendline settings, not the chart title settings. Increase the displayed decimal places through Format Trendline Label if rounded coefficients are not precise enough for inspection.

What does R-squared mean on an Excel trendline?

It indicates how closely the selected model fits the observations used to create it, with values nearer 1 indicating a closer fit in this sense. It does not establish causation or prove that the trend will continue, and a high value alone is not a reason to choose a complex model.

Why can’t I add a trendline to my chart?

The chart type may not support trendlines, or the chart background rather than a data series may be selected. Try a standard two-dimensional Scatter, Line, Column, or Bar chart, then select the series. Some model types also cannot be used with zero or negative values.

Can an Excel trendline predict future values?

You can enter a forward forecast in the Format Trendline pane, but the result extends the fitted pattern rather than accounting for new events or changing conditions. Use it as a model-based projection, check whether the assumptions make sense, and avoid presenting it as a guaranteed outcome.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

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

Spotted an error in this guide? Let us know.