To add a polynomial trendline in Excel for Microsoft 365 on Windows, select a chart series, then choose Chart Design > Add Chart Element > Trendline > More Trendline Options. In the Format Trendline pane, select Polynomial and choose an order from 2 to 6; use an XY scatter chart when your x-values are numeric and their spacing matters.
What a polynomial trendline shows
A polynomial trendline is a curve fitted to a set of chart data. Unlike a straight linear trendline, it can bend to follow a pattern that changes direction or steepness. Excel fits the curve using the values in the selected data series, treating the horizontal values as the input and the vertical values as the observations to be explained.
The order controls how flexible the curve is. A second-order polynomial can form a single broad bend, while higher orders can create more bends. Excel displays an equation for the fitted curve if you ask it to, but the curve is a statistical summary of the data, not a line connecting every point. It may not pass through any particular observation.
Polynomial trendlines are useful when a relationship is curved but does not have a simple exponential or logarithmic shape. Examples include a measured response that rises and then falls as a setting increases, or a process whose rate of change itself changes over a limited range. The curve can describe a pattern in the observed data; by itself, it does not explain what caused that pattern.
How to add one in Excel
- Arrange the data in two columns: one for the independent variable, such as time or temperature, and one for the measured value. Include clear headers and exclude totals or blank rows from the chart range.
- Select the data and choose Insert > Insert Scatter (X, Y) or Bubble Chart. Choose a scatter subtype with markers if you want to see the individual observations.
- Click a data point once to select its series. Check that the whole series is selected, rather than just one point.
- Choose Chart Design > Add Chart Element > Trendline > More Trendline Options. In the Format Trendline pane, select Polynomial.
- Set Order to a value from 2 through 6. Begin with a low order, then check whether a more complex curve is justified by the shape and purpose of the data.
- If useful, enable Display Equation on chart and Display R-squared value on chart in the pane. Add axis titles and a descriptive chart title so readers understand what the values represent.
Excel applies the trendline to the selected series only. If the chart has several series, repeat the process for each series that needs its own fit. To edit the curve later, right-click the trendline and choose Format Trendline, or select it and reopen the Format Trendline pane.
Choose the right polynomial order
Order is a modeling choice, not a setting that should automatically be increased until the curve looks attractive. A low-order curve is usually easier to interpret. A higher-order curve can follow more bends, but it can also react strongly to individual points and create oscillations that have little practical meaning, especially near the ends of the observed range.
- Order 2: A reasonable first test for a single broad curve, such as a rise followed by a fall.
- Order 3: Can represent additional change in curvature, but should have a clear data-based reason.
- Orders 4 to 6: More flexible fits that require careful scrutiny and enough well-spread observations to support the extra complexity.
For example, suppose a response rises across the first several settings, reaches a high point, and then declines across later settings. A second-order trendline may summarize that broad shape. If a sixth-order curve swings sharply between nearby observations, that extra movement may be fitting noise rather than a stable feature. Compare the curve with the plotted points and consider whether the bends make sense for the real process.
Do not select an order solely because it produces the largest R-squared value. Adding flexibility will often make a fit to the existing data look closer, but a closer in-sample fit is not proof that the curve will predict new observations well. If the purpose is prediction, compare models using data not used to fit them or consult an appropriate statistical method.
Prepare the chart data correctly
An XY scatter chart is usually the clearest choice for polynomial fitting because it uses numeric x-values and respects the distance between them. For instance, if measurements were taken at days 1, 2, and 10, a scatter chart places day 10 farther from day 2 than day 2 is from day 1. A line chart may instead treat the horizontal labels as evenly spaced categories, which can misrepresent irregular measurement intervals.
Check that the x-values are genuinely numeric. Dates in Excel are stored as numbers and can work as scatter-chart x-values, but text that merely looks like a number may be treated differently. Mixed units, duplicate x-values, missing observations, or accidental text entries can also make a curve confusing or misleading. Decide how to handle missing data based on why it is missing; do not replace missing observations with zero unless zero is the actual measured value.
Keep the two variables conceptually distinct. The x-values should represent the input or explanatory dimension, and the y-values should represent the response. If you select columns in the wrong order, Excel can chart the wrong relationship. Use axis titles, such as elapsed time and measured concentration, rather than relying on a reader to infer the units from the data table.
Read the equation and R-squared carefully
The optional equation label reports the coefficients Excel fitted for the selected polynomial order. It describes the curve Excel drew, and its numerical values depend on the scale and units of the axes. Changing time from days to hours, for example, changes the coefficient values even though the underlying observations describe the same pattern. The coefficients are not automatically evidence of a causal relationship.
The optional R-squared label summarizes how closely the fitted curve accounts for variation in the plotted y-values under the model. A value nearer 1 indicates a closer fit to those observations, but it does not establish that the model is scientifically appropriate, that the inputs are independent, or that predictions will be accurate. A high value can occur when a flexible curve follows noise in a small dataset.
Excel rounds the equation shown on the chart for display. If you copy those rounded coefficients into another calculation, the resulting values may differ from the plotted curve, particularly for high-order polynomials or large x-values. Treat the label as a convenient visual reference, not necessarily as a full-precision source for subsequent analysis. Also make sure the chart axis scales do not hide important deviations among the points.
Extend the curve and understand the limits
In the Format Trendline pane, the Forecast settings can extend the drawn trendline forward or backward by a specified amount along the horizontal axis. The extension is a visual projection of the fitted curve; it does not add forecast values to your worksheet or create new observations. The meaning of the forecast distance depends on the scale of the x-axis. On an axis measured in days, a distance is in day units, not necessarily in worksheet rows.
Polynomial curves can behave badly outside the range of observed x-values. A curve that fits measurements well within a narrow interval may rise or fall rapidly beyond it, or turn in an implausible direction. This is one reason polynomial trendlines are generally more defensible for describing a local pattern than for making long-range forecasts. If a projection matters, validate it against later observations and compare it with a model grounded in the process being studied.
Keep the chart’s purpose visible to readers. If you extend a trendline, label the chart or accompanying text to distinguish measured observations from the projected part of the curve. Avoid presenting the extension as if Excel had measured or verified those future values.
Common problems and practical checks
- Polynomial is unavailable: Confirm that the chart type supports trendlines and that you selected a data series. A 2-D XY scatter chart is a reliable starting point; some chart types, including 3-D charts, do not support trendlines.
- The curve looks wrong: Verify the series selection, x/y column order, numeric values, and chart type. A category-based chart can make unevenly spaced x-values appear evenly spaced.
- The equation is hard to read: Move the equation label, enlarge the chart, or use a simpler order. More terms make the label longer and harder to interpret.
- The curve bends wildly at the edges: Try a lower order and inspect whether the extreme points have unusual influence. Do not remove a point simply because it changes the curve; first check the source and reason for the observation.
- The fit looks excellent but predictions fail: Check for overfitting, extrapolation, and changes in the process. R-squared describes fit to the plotted data, not guaranteed future performance.
A useful check is to make a copy of the chart and compare a linear trendline with polynomial orders 2 and 3. Ask whether each extra bend corresponds to a visible and plausible feature in the observations. If two curves tell essentially the same story, the simpler one is often easier to explain. If the data are sparse or highly noisy, the chart may not support a meaningful high-order fit at all.
Polynomial trendline versus other options
A linear trendline is appropriate when the relationship is reasonably straight over the range being examined. A moving average smooths short-term variation in sequential data, but it serves a different purpose from fitting a polynomial curve. Exponential and logarithmic trendlines impose other specific shapes and are suitable only when those shapes make sense for the data. Excel offers these alternatives in the same Format Trendline pane.
A polynomial trendline is not the same as a smoothed line connecting chart points. A smoothed series changes how the points are joined; a trendline fits a model to the observations. Nor is it the same as a polynomial regression workflow designed to report diagnostics, confidence intervals, or validated forecasts. Excel’s chart feature is convenient for visual exploration, but more formal analysis may require a statistical tool or a carefully designed worksheet model.
Frequently Asked Questions
What is the highest polynomial order in an Excel trendline?
Excel’s polynomial trendline option allows orders from 2 through 6. A higher available order is not necessarily a better choice; use the lowest order that describes a defensible pattern.
Why can’t I select Polynomial in Excel?
First select a supported chart series and open Chart Design > Add Chart Element > Trendline > More Trendline Options. If the chart is an unsupported type, such as a 3-D chart, change it to a 2-D chart such as XY scatter and try again.
Should I use a line chart or scatter chart?
Use an XY scatter chart when the x-values are numeric and spacing matters, especially when observations are taken at uneven intervals. A line chart is more appropriate when the horizontal axis represents ordered categories with equal spacing.
Does a polynomial trendline predict future values?
Excel can extend the curve visually with the Forecast controls, but that is not a guarantee of accurate predictions. Polynomial fits can change sharply outside the measured range, so validate any important projection with new data and appropriate analysis.
How do I show the polynomial equation on the chart?
Open Format Trendline and select Display Equation on chart. Excel adds a label for the fitted curve. The displayed coefficients may be rounded, so do not assume the label provides full-precision values for other calculations.
Related
- How to Make a Visual Cue Poster in PowerPoint Step by Step
- How to Make a Vertical Timeline in PowerPoint Step by Step
- LEGO Inventory Spreadsheet: Track Sets, Parts, and Gaps
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Pareto Chart in Excel: Cumulative Percentage GuideYes. In Excel, a Pareto chart displays categories from largest to smallest and plots their running total as…
- Excel Overlapping Pivot Table Error: How to Fix ItExcel’s overlapping PivotTable error means a PivotTable is trying to occupy cells already used by another PivotTable on…
- Excel Multiple Pivot Tables on One SheetYes, you can place multiple pivot tables on a single worksheet in Excel, and they will work independently…
- How to Combine Pie Charts in Excel: A Practical GuideTo combine pie charts in Excel into one chart, first combine their source data into a single list…
- Power Pivot From Multiple Excel Files: How It WorksYes. In Excel for Microsoft 365 on Windows, use Power Query to import or combine data from multiple…
- Excel Stacked Bar Chart: Add Total LabelsTo add totals to an Excel stacked bar chart, put each bar’s total in worksheet cells, add data…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.