To add a trendline to a data series in Excel for Microsoft 365 on Windows, select the chart, then choose Chart Design > Add Chart Element > Trendline > More Trendline Options. Select the series you want to analyze, choose a trendline type in the Format Trendline pane, and adjust its settings. A trendline summarizes the pattern in that series; it does not prove that the pattern will continue or explain what caused it.
What an Excel series trendline means
An Excel trendline is a fitted line or curve drawn over the values in one chart series. It gives a compact view of the direction or shape of the data: for example, whether monthly sales tend to rise, whether a measured quantity levels off, or whether observations fluctuate around a relatively stable average. Excel calculates the trendline from the chart’s plotted data rather than simply connecting each point to the next.
A series is a related set of values plotted as one group, such as revenue by month or temperatures from one sensor. If a chart contains several series, a trendline applies to the series you select; it does not automatically summarize every series in the chart. A chart can have a trendline for more than one series, and you can choose different models for different series, but those choices should reflect the data rather than just make the chart look smoother.
This feature is useful for visual analysis and communication. It is not the same as a forecast report, a statistical test, or a guarantee about future values. The model is fitted to the observations included in the chart, and its usefulness depends on the data, chart setup, and question being asked.
How to add a trendline to a series
- Select the chart. If it has multiple series, click a data point in the series you want. Excel should highlight that series; check the legend or the selection label if the series are close together.
- On the ribbon, choose Chart Design > Add Chart Element > Trendline. Choose a listed type, or select More Trendline Options to open the Format Trendline pane and inspect the available models and controls.
- In the pane, choose a trendline type. Excel adds it to the selected series. Use the pane to adjust options such as polynomial order, moving-average period, forecast distance, intercept, or display settings when those controls apply to the chosen model.
- To show the model’s equation or its R-squared value on the chart, select Display Equation on chart or Display R-squared value on chart in the pane. Move the text label if it covers data or other chart elements.
You can also select the series, right-click it, and choose Add Trendline when that command is available in the context menu. In Excel for Mac, the comparable ribbon route is usually Chart Design > Add Chart Element > Trendline; names and pane layout can vary slightly by release. Excel for the web may expose fewer chart-formatting controls than the desktop app. If you cannot find a particular model or equation option, open the workbook in desktop Excel.
Choose a chart that matches the data
Chart choice affects what Excel treats as the horizontal values. An XY scatter chart is usually the clearest choice when each observation has a meaningful numeric x-value, such as elapsed time in days, distance, or temperature. Scatter charts plot points according to both their x and y values, so unequal gaps between x-values remain unequal on the chart.
A line chart is often appropriate when the horizontal positions are categories, such as months or product names. Its category axis commonly spaces categories evenly. If dates are treated as categories, a gap of one month and a gap of six months may appear equally wide, which can make the visual slope misleading. For a trendline based on genuinely numeric spacing, use an XY scatter chart and verify that the date or measurement values are recognized as numbers.
Excel does not offer trendlines for every chart form. Trendlines are generally intended for supported two-dimensional charts; stacked, three-dimensional, pie, doughnut, and radar charts are not suitable for adding one. If the command is unavailable, changing to a supported chart type may solve the issue. For comparisons between groups, avoid stacking values when the goal is to inspect each group’s individual trend.
Understand the available trendline types
Excel provides several models. The right choice depends on the observed pattern and the meaning of the measurements, not simply on which option produces the highest R-squared value.
- Linear: A straight line for a roughly constant increase or decrease per x-unit. It is a useful starting point for a trend that looks approximately straight.
- Exponential: A curved model for change that grows or shrinks in proportion to the current level. It requires positive y-values for Excel’s usual exponential fit; zero or negative observations can prevent a valid fit.
- Logarithmic: A curve that changes quickly at first and then tends to flatten, or the reverse, depending on direction. Its x-values must be positive.
- Polynomial: A curve that can represent bends in the data. Excel lets you set the order, from 2 through 6. Higher orders can follow the sample closely but may create artificial wiggles and unreliable extensions beyond the observed range.
- Power: A relationship in which y changes according to a power of x. The x- and y-values used for the fit must be positive.
- Moving Average: A smoothed line based on averages of adjacent observations. Its period controls how many points contribute to each average. A larger period smooths more fluctuation but can conceal short-lived changes.
For example, suppose a scatter chart shows output against machine speed. If output rises by approximately the same amount for each increase in speed, a linear model may be sensible. If it rises rapidly at first and then levels off, a logarithmic curve might describe the visible shape better, provided the values and domain meet the model’s requirements. The curve alone cannot establish the physical mechanism; that requires subject knowledge and suitable evidence.
Read the equation and R-squared carefully
The equation option places the fitted model on the chart. A linear trendline is commonly shown in the form y = mx + b, where m is the estimated slope and b is the estimated intercept. The slope describes the model’s change in y for a one-unit change in x. Its units depend on the data: if y is dollars and x is months, the slope is dollars per month. The intercept is the model’s estimated y-value at x = 0, which may have no practical meaning if zero is outside the observed range.
The displayed equation is rounded for readability. Do not assume that its visible coefficients reproduce Excel’s plotted line exactly when copied into a calculation; small rounding differences can matter, especially for large x-values or higher-order models. If you need a precise model for analysis, use an appropriate statistical method with adequate precision rather than relying on the chart label as a data-export tool.
R-squared, often written as R², describes how closely the fitted model accounts for variation in the plotted observations under the model’s calculation. A value nearer 1 indicates a closer fit to those points, but it does not prove that the model is appropriate, that its assumptions are satisfied, or that it will predict new data well. A high-order polynomial can achieve a high R² by following irregularities in a small sample. A high R² also does not establish cause and effect. Check the plot, the sample size, the measurement process, and whether the model makes sense for the subject.
Forecast settings and their limits
The Format Trendline pane includes forward and backward forecast settings for applicable trendline types. These extend the fitted line or curve by a specified number of horizontal-axis units. The units are not automatically a promise of a particular calendar duration: they depend on how the chart represents its x-values. On an XY chart with dates stored as Excel date serials, a forecast distance of 10 means 10 serial-number units, normally 10 days. On a category chart, the extension can instead relate to category positions.
Forecasting by extending a chart trendline is a simple extrapolation: Excel continues the selected mathematical shape beyond the observed points. That can be useful for illustrating a short, clearly labeled extension, but it can fail when the underlying conditions change, when the pattern is seasonal, or when the chosen curve behaves implausibly outside the sample. An exponential curve may rise sharply; a polynomial may turn unexpectedly. Do not treat the drawn extension as a confidence interval or as a complete forecasting analysis.
For a time series with recurring seasonal patterns, a single trendline may miss the central feature of the data. Consider a time-series method that models seasonality and checks forecast errors, or compare predictions with later observations that were not used to fit the model. Keep historical values, fitted values, and forecast values visually distinguishable so readers can tell what was observed and what was extrapolated.
Common problems and practical checks
If the trendline points the wrong way or looks oddly flat, first inspect the series and its axes rather than immediately changing the model. A text value in a numeric column, a mistaken series range, dates treated as labels, or a hidden data point can alter what the chart displays. Check whether the chart includes the intended observations and whether its horizontal axis represents the scale you expect.
- Trendline command is unavailable: Confirm that a data series, not just the chart background or title, is selected. Check whether the chart type supports trendlines; a stacked or 3-D chart may need to be changed.
- Excel rejects a model or shows no useful curve: Check the model’s domain requirements. Logarithmic fits need positive x-values; exponential fits need positive y-values; power fits need positive x- and y-values.
- The curve looks too wavy: Lower the polynomial order or compare with a linear model. A curve that follows every fluctuation is not necessarily a better explanation.
- The equation does not match a hand calculation: Check which series and x-values are plotted, and remember that the equation on the chart is rounded. Also make sure the chart has not treated numeric x-values as evenly spaced categories.
- The line covers points or the equation: Format the trendline’s color, width, or dash style, and reposition the equation label. Keep the observations easy to see.
For a defensible comparison, examine the same observations with plausible candidate models and consider residuals: the differences between observed values and model-fitted values. A residual plot can reveal systematic curvature or changing spread that a single R² number hides. If the chart is for a report, state the model type, the range of data used, and whether any extension beyond that range is a forecast rather than an observation.
Frequently Asked Questions
Can I add a trendline to only one series in Excel?
Yes. Select a point in the intended series before adding the trendline. If a chart contains several series, confirm that the selected series is highlighted; each trendline is associated with a particular series.
Why can’t I add a trendline to my chart?
The chart type may not support trendlines, or the chart rather than a data series may be selected. Try a supported two-dimensional chart such as a line or scatter chart, then select the series and add the trendline again. Stacked, 3-D, pie, doughnut, and radar charts are common obstacles.
Should I choose the trendline with the highest R-squared?
Not automatically. A complex model can fit the existing observations closely and still perform poorly on new data. Choose a model that matches the data’s shape and domain, and consider whether its assumptions and predictions make sense.
What is the difference between a trendline and a moving average?
A trendline fits a selected mathematical relationship, such as a straight line or polynomial curve. A moving average smooths nearby observations using a chosen period. Smoothing can help reveal broad movement, but it does not mean that the data follow a regression equation.
Does an Excel trendline prove that values will keep changing this way?
No. It describes a fitted pattern in the plotted data and can be extended as a simple extrapolation. Future results may differ because of seasonality, changing conditions, measurement error, or other factors not represented by the chart.
Related
- Remove Spaces in an Excel Column: Step-by-Step
- How to Remove Spaces and Dashes in Excel Without Errors
- How to Remove Double Spaces in Excel Without Losing Data
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Does Excel Online Have Sparklines? Setup and LimitsYes. Excel for the web—often called Excel Online—can create and format sparklines, the small charts that fit inside…
- Enable Power Pivot in Excel: Windows Steps and OptionsTo enable Power Pivot in Excel for Microsoft 365 on Windows, go to File > Options > Add-ins.…
- Excel Pivot Table: Percentage of Two ColumnsTo show one PivotTable column as a percentage of another in Excel for Microsoft 365 on Windows, add…
- Excel Pie Chart With Breakdown of Slices: How to Make OneTo show the detail behind one slice in Excel, create a Pie of Pie or Bar of Pie…
- Build a Gantt Chart in Excel: Step-by-Step GuideTo build a Gantt chart in Excel for Microsoft 365 on Windows, list each task with a start…
- Excel Line Chart Tutorial: Create and Format OneTo make a line chart in Excel for Microsoft 365 on Windows, arrange your categories in one column…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.