To add a trendline to an Excel line chart in Microsoft 365 for Windows, select the chart, then choose Chart Design > Add Chart Element > Trendline and select a type, such as Linear. To adjust it, choose More Trendline Options; Excel opens a pane where you can change the model, extend it forward, or show its equation and R-squared value.
What a line-chart trendline shows
A trendline is a line or curve fitted to a data series to make its general direction easier to see. It can help reveal an overall rise, decline, or relatively stable pattern when the plotted values fluctuate from point to point. It is an analytical aid, not a replacement for the data: the original observations remain the values in the chart, while the trendline summarizes a pattern among them.
Excel fits a separate trendline to each data series you select. For example, a chart with sales for three product lines can have three trendlines, each describing a different series. A trendline does not average multiple series together, explain why values changed, or establish that one variable caused another to change.
Line charts are commonly used for values recorded over time, such as monthly orders or daily temperatures. A trendline can clarify the broad movement in such a series, but it may conceal seasonality or short-lived changes. Keep the underlying line and its markers visible when individual observations matter.
Add a trendline in Excel for Windows
- Select the line chart. If you select a point instead of the chart, Excel may focus on that series; this is useful when you want a trendline for only one series.
- Open the Chart Design tab on the ribbon.
- Choose Add Chart Element > Trendline, then select a suggested type. Linear is a sensible starting point when you want to show a steady average direction.
- To choose another model or control its settings, return to Add Chart Element > Trendline > More Trendline Options. The Format Trendline pane provides the available types and options.
You can also select the chart and use the Chart Elements button, shown as a plus sign beside the chart, then check Trendline. Its arrow opens choices for a particular series and for more options. If the chart contains several series, use the series-specific choice when you do not want Excel to add trendlines to all of them.
In Excel for Mac, select the chart and use the Chart Design tab to find Add Chart Element and Trendline; the exact arrangement can vary with the window size and ribbon layout. Excel for the web may offer fewer chart-formatting choices than the desktop app. If you cannot find the model or forecasting controls, open the workbook in the Windows or Mac desktop version.
Choose a trendline type
The right type depends on the shape and meaning of the data, not on which option produces the most impressive-looking curve. Excel offers several common models. Begin with a simple one, inspect whether it follows the data sensibly, and avoid choosing a more complex curve solely because it hugs the plotted points.
- Linear: Shows a constant average rate of change. It is appropriate when the series rises or falls at a broadly steady pace, though individual values may vary.
- Exponential: Represents growth or decline that changes by a roughly constant proportion rather than a constant amount. It is not suitable when the series contains zero or negative values.
- Logarithmic: Can describe a pattern that changes quickly at first and then levels off, or the reverse. Its x-values must be positive.
- Polynomial: Can bend to represent one or more changes in direction. Excel lets you set the order; a higher order can fit observed points more closely but may produce an implausible curve between or beyond them.
- Power: Represents a relationship in which change follows a power-shaped pattern. It requires positive x- and y-values.
- Moving Average: Smooths short-term variation by averaging a chosen number of neighboring points. It is useful for seeing a less jagged pattern, but unlike a fitted linear or curved model, it does not describe a single overall equation in the same way.
For example, monthly sales that generally increase by about the same number of units each month may suit a linear trendline. A growing user count that increases by a similar percentage each month may be better described by an exponential model. Those are starting hypotheses, not guarantees: check the chart context, the values, and whether the chosen curve makes practical sense.
Understand line-chart categories and spacing
A standard Excel line chart uses a category axis. Its labels may be dates or numbers, but the chart generally spaces the categories evenly. This is appropriate for regularly spaced observations, such as one value for every month. It can be misleading when dates are irregular or when the numeric distance between x-values matters, because a line chart can make widely separated observations look as close together as neighboring ones.
For instance, suppose measurements were taken on January 1, January 2, and January 20. A category line chart may place those three labels at equal intervals, even though the last gap is much longer. A trendline on that chart follows the plotted category sequence, not necessarily the real elapsed time. If the x-values are measurements or dates with meaningful, unequal spacing, consider an XY (Scatter) chart instead. A scatter chart positions points according to their numeric x-values and is often a better choice for analyzing a relationship between two measured variables.
Changing to a scatter chart is not just a cosmetic choice: it changes how point spacing is represented. Use a line chart when the emphasis is on an ordered sequence with regular categories; use a scatter chart when actual numeric intervals on the horizontal axis are important.
Extend a trendline and interpret the forecast
In the Format Trendline pane, use Forecast Forward or Forecast Backward to extend the line beyond the observed data. The amount is expressed in units along the chart’s x-axis sequence. On a regular monthly line chart, a forward extension of three units represents three category intervals, so readers may interpret it as three months. With irregular dates, however, equal category steps do not necessarily mean equal calendar time.
An extension is a mathematical projection of the selected trendline, not a promise about future results. It assumes that the pattern represented by that model continues. A sudden market change, a seasonal cycle, a policy change, or a limit on possible growth can make that assumption unsuitable. Excel’s displayed trendline does not by itself provide a prediction interval that communicates the full uncertainty around future values.
Use forecasts cautiously, particularly when there are few observations or when the data vary widely. A practical chart should identify projected portions clearly and explain the assumptions behind them. If the series has seasonal peaks, a single straight line may extend through those peaks without modeling the repeating cycle.
Show the equation and R-squared
The Format Trendline pane can display the trendline equation and the R-squared value on the chart. The equation describes the fitted model, while R-squared indicates how closely that model accounts for variation in the data used to fit it. A value closer to 1 generally indicates a closer fit for that dataset and model, but it does not prove the model is correct, establish causation, or guarantee accurate forecasts.
Use R-squared to compare candidate fits only with care. A more flexible polynomial can often fit existing points more closely than a straight line, but that does not mean it will describe new observations better. Check whether the curve has a reasonable shape and whether it matches what is known about the process. A high R-squared can still accompany a misleading trendline if the data contain outliers, a structural break, or a pattern the chosen model cannot represent.
For a presentation, move the equation and R-squared label away from the data so they do not cover important points. Select and drag the label, or format it from the chart. If the chart is small, the equation may be difficult to read; it is often clearer to report the model and fit statistic in a note or accompanying text rather than crowding the plot.
Make the chart easier to read
A trendline should clarify the visual story without disguising the original observations. Use a distinct but restrained color, and make sure it contrasts with the data series. If the chart has multiple lines, distinguish each series and its trendline consistently. Too many trendlines can turn a simple comparison into a tangle, so consider showing only the series relevant to the question.
- Keep the chart title specific, such as Monthly orders and fitted linear trend, rather than using a generic title.
- Retain axis labels and units so readers know what the trend describes.
- Use markers or a lighter line style for observations if a strong trendline otherwise dominates them.
- State the period covered and identify any forecast extension as a projection.
- Do not remove unusual points just to make the trendline look smoother; investigate and explain them instead.
A moving-average line can be a helpful visual companion when the goal is to smooth noisy observations. Set the period with care: a short period removes little noise, while a long period can hide meaningful changes and respond slowly to a new direction. It is not automatically a better trendline than a linear fit; it answers a different visual question.
Common problems and practical checks
If the Trendline command is unavailable, confirm that the selected chart is a supported two-dimensional chart and that the chart itself or a data series is selected. Excel does not support trendlines for every chart type; examples of unsupported types include pie, doughnut, radar, and three-dimensional charts. A standard two-dimensional line chart is supported.
If the trendline appears to slope the wrong way, check the source range, series selection, and category order. Also check whether the first row or column was interpreted as labels. A line chart can show categories in an order that differs from chronological order if the source data are sorted incorrectly. The chart reflects the selected data and sequence; it does not automatically determine the intended time order.
If Excel will not fit a chosen model, inspect the values for zeros or negatives that the model cannot use. Exponential trendlines cannot be fitted to data containing zero or negative y-values, and power models require positive x- and y-values. Logarithmic models require positive x-values. Rather than altering or deleting real observations to force a fit, choose a model that suits the data or reconsider the chart type.
Finally, compare the trendline with a simple view of the observations. A dramatic outlier can pull a fitted line, while a smooth curve can make small samples appear more certain than they are. Note the number of observations, the date range, and any known events that changed how the data were collected or generated.
Frequently Asked Questions
Can I add a trendline to an Excel line chart?
Yes. Select the chart, then choose Chart Design > Add Chart Element > Trendline. Choose a type, or select More Trendline Options to adjust the model and display settings.
Why can’t I add a trendline in Excel?
Check that you selected a supported two-dimensional chart, such as a standard line chart, rather than a pie, radar, or three-dimensional chart. Also select the chart or the data series and check that Excel has a usable series of values.
Which trendline should I use?
Use a linear trendline for a broadly steady increase or decrease, and consider other models only when the data shape and context support them. A moving average is useful for smoothing short-term fluctuation, but it is not the same as a model of the overall rate of change.
What does R-squared mean on an Excel trendline?
It summarizes how closely the fitted model accounts for variation in the observations used to fit it. A higher value does not prove causation, validate the model, or guarantee that an extension will forecast future values accurately.
Can an Excel line-chart trendline predict future values?
You can extend it with the Forecast Forward setting in the Format Trendline pane. The result is a projection based on the selected model and the chart’s x-axis sequence, not a certainty; irregular date spacing and seasonal patterns can make it especially misleading.
Related
- Excel Not Responding? Causes and Fixes
- How to Enter a Page Break in Excel and Control Printing
- Excel Data Validation Lists Based on Criteria
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- How to Sort an Excel Pie Chart from Largest to SmallestTo sort an Excel pie chart from largest to smallest, sort the chart’s source data by its value…
- Excel Consolidate Pie Charts: Methods and LimitsTo consolidate data for a pie chart in Excel, combine the category totals into one summary table, select…
- How to Adjust Histogram X-Values in ExcelTo adjust a histogram’s x-values in Excel for Microsoft 365 on Windows, select the horizontal axis, open Format…
- Dot Progress Chart in Excel: Create One Step by StepExcel does not include a built-in chart type called a dot progress chart, but you can create the…
- How to Make a Chart in Excel From a Table: Steps That WorkTo make a chart from a table in Excel, click a cell in the table, choose Insert >…
- Excel Pie Chart: Group Small Categories into OtherTo group data in an Excel pie chart, first summarize the values you want to show, then chart…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.