In Excel, a polynomial trendline order is its degree: choose order 2 for a quadratic curve, up to order 6 for a sixth-degree curve. To set it in Microsoft 365 for Windows, select the chart, go to Chart Design > Add Chart Element > Trendline > More Trendline Options, then choose Polynomial and enter the order in the Format Trendline pane.
What polynomial order means
A polynomial trendline models a relationship between an x-value and a y-value with powers of x. A second-order trendline has the form y = ax² + bx + c. It can curve once, so it is often described as a quadratic trendline. A third-order model adds an x³ term, and higher orders add further powers. The order is the largest exponent included in the model; it is not the number of data points or the number of bends you ask Excel to draw.
Excel’s Polynomial option uses orders from 2 through 6. If you want a straight-line fit, select Linear rather than Polynomial and try to enter order 1. The linear model is a separate trendline type in Excel. The chart trendline is a fitted curve displayed over a data series; it does not replace or modify the original values in your worksheet.
How to set the order in Excel
These steps apply to Excel for Microsoft 365 on Windows. First make a chart that contains the data series you want to fit. Select the chart, then use Chart Design > Add Chart Element > Trendline > More Trendline Options. In the Format Trendline pane, select Polynomial under Trendline Options. Use the Order box to choose a value from 2 to 6.
You can also select the plotted data series, right-click it, and choose Add Trendline, then select Polynomial in the pane. If the chart has several series, make sure you selected the intended one: trendlines are added to individual series, not automatically to every series in the chart. To add a polynomial curve to another series, repeat the process for that series.
To show the fitted equation or the coefficient of determination on the chart, use the corresponding checkboxes in the Format Trendline pane: Display Equation on chart and Display R-squared value on chart. The names and arrangement of options can vary slightly between releases. Excel for Mac has comparable chart and trendline controls, though ribbon placement can differ. Excel for the web may have fewer chart-formatting controls; if you cannot set the polynomial order there, open the workbook in the desktop app.
Choose a chart that represents the data
For a polynomial fit, an XY (Scatter) chart is usually the clearest choice when the x-values are numeric measurements, such as time in days, temperature, or distance. A scatter chart positions points according to their actual x and y values. This matters if the gaps between x-values are unequal: observations at x = 1, 2, and 10 are not evenly spaced, and the curve should reflect that spacing.
A Line chart is useful for categories or regularly spaced observations, but its horizontal axis is generally a category axis. The positions can represent the order of categories rather than the numeric distance between their labels. For example, labels 1, 2, and 10 on a category axis can be spaced evenly, even though the numeric gaps are different. If those labels are real x-values, consider changing to an XY (Scatter) chart before interpreting the trendline. Check the axis and chart type when the curve seems to fit in an unexpected way.
How to choose an order
Start with the simplest curve that reflects a pattern you can justify, not the highest order Excel permits. A higher-order polynomial has more coefficients and can bend more often. That flexibility may match the observed points closely, but it can also follow random variation rather than a meaningful relationship. This is overfitting: a curve looks impressive on the data used to fit it but performs poorly on new observations.
- Order 2: Consider it when the pattern has one broad bowl-shaped or arch-shaped bend, such as a measured response that rises and then falls.
- Order 3: It can describe a more complex curve with additional changes in direction, but those bends should make sense in the subject being measured.
- Orders 4 to 6: Use these only when the data volume and a sound reason for the extra curvature support them. A high order can create sharp swings, especially near the ends of the observed range.
- Linear or another model: If the points show a steady increase or decrease, a Linear trendline may be easier to explain. If growth is proportional or levels off, another trendline type may be more suitable.
For instance, suppose a scatter chart shows measurements at six times, with values rising and then declining gradually. An order-2 curve is a reasonable first polynomial to inspect. If an order-5 curve snakes through every point, that does not by itself show that the fifth-order relationship is real. Compare the curve with the data, the context, and—where possible—observations not used to fit it.
Use R-squared and the equation carefully
Excel can display an R-squared value, which summarizes how closely the fitted trendline corresponds to the data in the chart. It is useful as one diagnostic, but it does not prove that a chosen order is appropriate, explain why the relationship exists, or guarantee accurate predictions. For a fixed dataset, adding polynomial terms generally gives a model more flexibility and can raise ordinary R-squared even when the added curvature is not useful. Excel’s displayed value is not an adjusted R-squared measure that penalizes extra terms.
The displayed equation is also a fitted approximation. Excel formats the equation label to a limited number of decimal places by default, so copying its rounded coefficients into a calculation can produce noticeably different results, especially at large x-values or with high-order powers. You can format the trendline label to show more decimal places, but extra displayed digits do not make a weak model trustworthy. Keep the original x-values and y-values, and use a more suitable analysis method if precise prediction or statistical inference matters.
Limits and risks of polynomial trendlines
A polynomial curve can behave very differently outside the range of the observations. This is called extrapolation. A high-order curve that fits the data between the smallest and largest x-values may shoot upward, downward, or oscillate beyond them. Even an order-2 curve can imply implausible values if extended too far. Treat a chart trendline as a description of the observed range unless you have independent evidence that it predicts beyond that range.
Polynomial models are also sensitive to outliers and to how x-values are scaled. A single unusual point can pull the curve, and high powers of large x-values can make coefficients difficult to interpret numerically. If your x-values are calendar dates or large measurements, a chart can still display a trendline, but do not infer that the fitted coefficients have a useful real-world meaning without checking the model and units. A trendline is not a causal explanation: two variables can curve together without one causing the other.
Common problems and practical checks
- The order box is missing: Confirm that you added or selected a trendline and that the trendline type is Polynomial. The order control appears for that type.
- The curve looks like it ignores the x-values: Check whether the chart is a Line chart with categories. Use an XY (Scatter) chart when numeric spacing matters.
- The curve has surprising loops or spikes: Try a lower order and inspect the points, especially at the range ends. A complex shape may be overfitting rather than revealing a real pattern.
- The equation does not reproduce the curve exactly: The equation label may be rounded. Increase its displayed precision and remember that a rounded equation is not a substitute for the full fitted calculation.
- The trendline appears on the wrong data: Select the intended series before adding it. In a chart with multiple series, each series has its own trendline settings.
- There are too few observations: A model with many coefficients needs enough informative data to support it. With a small dataset, a high-order curve can fit the points while providing little dependable insight.
Polynomial compared with other Excel trendlines
Excel offers several trendline types, and polynomial is only one option. Linear fits a straight relationship. Exponential and logarithmic trendlines describe different curved patterns and have restrictions on the values they can model. A power trendline is another nonlinear option. Moving Average smooths a series rather than fitting a polynomial equation in the same sense. Choose based on the shape and meaning of the data, not simply which option produces the most attractive chart.
If the purpose is forecasting, a chart trendline may not be the right tool on its own. Consider whether the series has seasonality, repeated cycles, changing conditions, or a physical limit. A polynomial does not automatically account for any of those features. For a simple visual summary, a chart trendline can be convenient; for decisions that depend on forecast accuracy, compare performance on held-out data and use a method appropriate to the question.
Frequently Asked Questions
What is the highest polynomial order in Excel?
Excel’s polynomial trendline supports orders 2 through 6, so the highest selectable order is 6. A linear fit is available separately as the Linear trendline type.
What does order 2 mean on an Excel chart?
Order 2 means the trendline is quadratic and includes an x-squared term. It can form a broad U shape or inverted U shape, depending on the fitted coefficients.
Which polynomial order should I use?
Use the lowest order that represents a defensible pattern in the data. Begin with order 2 if a smooth single bend is plausible, then compare higher orders cautiously rather than choosing one just because it raises R-squared.
Can I use order 1 for a polynomial trendline?
In Excel, choose Linear for a first-degree straight-line fit. The Polynomial order control is intended for orders 2 through 6.
Why does a higher order fit my points better but look worse?
A higher-order curve has more flexibility and can pass closer to the existing observations while adding unrealistic bends. That is a common sign of overfitting; inspect the pattern and test predictive performance rather than relying on visual closeness alone.
Does an Excel polynomial trendline predict future values?
It can be extended visually, but that does not make its extrapolations reliable. Polynomial curves can change rapidly outside the data range, so predictions beyond observed x-values need independent validation and a sound reason to trust the model.
Related
- Excel Page Break Preview: Add and Move Page Breaks
- Excel Page Break Preview: How to View and Adjust Pages
- Excel Page Break Not Moving? Causes and Fixes
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Google Sheets Chart Editor: Create and Customize ChartsThe Google Sheets Chart editor is the sidebar for creating and changing charts in a spreadsheet. Select the…
- Excel Chart Types: How to Choose the Right Chart for DataThere is no single best Excel chart type: choose the one that makes your data’s main message easiest…
- Proper Excel Chart Creation: A Step-by-Step GuideTo create a proper chart in Excel for Microsoft 365 on Windows, arrange your data in a clear…
- How to Remove a Trendline from an Excel ChartTo remove a trendline from an Excel chart in Microsoft 365 for Windows, click the trendline to select…
- Add a Trendline to an Excel PivotChart (Workarounds)Excel for Microsoft 365 on Windows does not let you add a trendline directly to a PivotChart. Create…
- Excel Chart Slicers: How They Work and How to Add ThemAn Excel chart slicer is a clickable control that filters chart data, so a reader can focus on…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.