To add a quadratic trendline in Excel for Microsoft 365 on Windows, create an XY scatter chart, select a data series, then choose Chart Design > Add Chart Element > Trendline > More Trendline Options. In the Format Trendline pane, select Polynomial and set Order to 2. You can also display the fitted equation and R-squared value on the chart to inspect the curve.
Add a quadratic trendline in Excel
Start with two columns: one for the independent variable (the x-values) and one for the measured response (the y-values). Include a clear header in each column, and make sure the data rows contain numbers rather than text that looks like numbers. Then:
- Select the x- and y-value columns, including their headers.
- Choose Insert > Insert Scatter (X, Y) or Bubble Chart, then select a scatter chart with markers. A scatter chart is a good choice because it treats the horizontal values as numeric x-coordinates.
- Select a marker in the series so Excel selects the data series, not just an individual point. Choose Chart Design > Add Chart Element > Trendline > More Trendline Options.
- In the Format Trendline pane, choose Polynomial and enter 2 for Order. The order is the degree of the polynomial; order 2 is the quadratic option.
- To show the calculation on the chart, select Display Equation on chart. Select Display R-squared value on chart if you also want that fit statistic.
Another route is to right-click the data series and choose Add Trendline, then select Polynomial and set the order to 2 in the pane. The wording and layout can shift slightly between Excel updates, but the trendline settings are in the Format Trendline pane. You can change the line color, width, and other appearance settings there as well.
Prepare the data and chart
A quadratic trendline is fitted to paired x and y observations. Each x-value must correspond to the y-value on the same row; sorting one column without the other breaks those pairs and changes the analysis. If the x-values are dates, Excel may use the dates’ underlying serial numbers as x-values. That is usually suitable for fitting over time, but the coefficients then use Excel’s date-number scale, so they may not be easy to interpret directly.
Use an XY scatter chart when the horizontal values represent measured quantities, dates, or unevenly spaced numbers. A standard Line chart treats its horizontal axis as categories and spaces categories evenly, even if labels look numeric. That can make a fitted curve misleading when x-values are irregularly spaced. For example, observations at 1, 2, and 20 are not equally spaced, so a scatter chart is the safer choice for modeling their numeric relationship.
Check for blank cells, text entries, duplicate observations, and outliers before fitting. An outlier can pull a least-squares curve toward itself. Do not remove an unusual point simply because it makes the curve less attractive; investigate whether it is an error, a valid exceptional case, or evidence that the relationship changes across the range.
What a quadratic trendline represents
A quadratic model has a squared x-term, a linear x-term, and a constant. Excel estimates the three coefficients from the selected observations using least squares: it chooses the curve that minimizes the sum of squared vertical differences between the observed y-values and the curve’s predicted values. The result is a parabola, which can bend upward or downward and has at most one turning point.
The squared-term coefficient determines the curve’s overall direction: a positive value makes the parabola open upward, while a negative value makes it open downward. The other coefficients affect its slope and vertical position. These are descriptive features of the fitted model, not proof that the underlying process is literally governed by a quadratic law.
For a simple illustration, suppose the observations are x-values 0, 1, 2, 3, and 4, paired with y-values 5, 4, 7, 14, and 25. They fall exactly on a curve with coefficients 2, -3, and 5, so a quadratic trendline should reproduce those points apart from any display rounding. This example is useful for checking the chart setup; real measurements rarely follow a perfect curve.
Read the equation and calculate predictions
The equation displayed on the chart gives the fitted coefficients. Excel may round the displayed numbers, however, and those rounded values can give slightly different predictions from the full-precision fit used to draw the line. To improve readability and precision, select the equation label, open Format Trendline Label, and adjust the Number format and decimal places. A label with more decimal places is more useful for calculation, though it can take up more chart space.
You can use the displayed coefficients in a worksheet formula to calculate fitted values, provided you understand that copied, rounded coefficients produce approximate predictions. For the illustrative data above, assume x-values are in A2:A6 and y-values are in B2:B6, with x = 4 in A6. Using the exact example coefficients, enter =2*A6^2-3*A6+5 in another cell; it returns 25. Replace the numbers with the coefficients from your own chart equation to calculate predictions for your data. If the equation label is rounded, consider displaying more decimal places before copying the coefficients.
The turning point can also help explain the curve: it is where the slope changes direction. If the fitted squared-term coefficient is not zero, the x-coordinate of the turning point is negative the linear coefficient divided by twice the squared-term coefficient. Use caution if that point lies outside the observed x-range; it is then an extrapolated feature of the fitted curve, not a turning point supported by nearby data.
Interpret R-squared carefully
R-squared summarizes how much of the variation in the observed y-values is accounted for by the fitted model in the data used to fit it. A value closer to 1 indicates a closer fit by this measure, but it does not establish that the model is appropriate, that the relationship is causal, or that forecasts will be accurate. A flexible curve can fit a small dataset closely, especially when there are few observations.
Use the plotted points as well as the statistic. Look for systematic patterns in the vertical gaps between points and the curve: for example, a sequence of residuals that stays positive, then negative, then positive may signal that the chosen form misses structure. Excel does not add a residual plot automatically when you add a trendline, but you can calculate residuals as observed y minus predicted y and chart them separately.
Do not treat a higher R-squared as an automatic reason to choose a quadratic over a linear model. Adding a squared term can improve the in-sample fit even when the bend is mostly noise. Compare the plots, consider whether a curved relationship makes sense in context, and, when prediction matters, check performance on observations not used to fit the model.
Choose between linear, quadratic, and other fits
A linear trendline is simpler and is often preferable when the data show a roughly constant rate of change. A quadratic is reasonable when a single bend or turning point is plausible and supported by the observations. A higher-order polynomial can create multiple bends, but those extra changes may follow noise rather than a stable pattern. Choose the least complicated model that answers the question adequately, rather than selecting a curve solely because it looks smooth.
Other trendline types may be more suitable for specific patterns. Excel offers exponential, logarithmic, and power trendlines, among others, but their assumptions and restrictions differ; for example, logarithmic and power models require suitable positive x-values, and an exponential model has particular behavior for y. If the process has a known mechanism, use that knowledge to guide the model choice. A quadratic line is not a general-purpose fix for every nonlinear relationship.
Common problems and fixes
- The Polynomial option is missing: Confirm that you selected a supported two-dimensional data series. Start with an XY scatter chart and select its series rather than a chart title or axis. Some chart types do not support trendlines.
- The curve looks wrong: Verify that the x and y ranges are paired correctly and that the chart is an XY scatter chart. Check whether the x-values are being interpreted as numbers and whether one unusual observation is exerting strong influence.
- The equation does not match a worksheet prediction exactly: The chart label may round its coefficients. Show more decimal places or expect small differences when using rounded values.
- The trendline does not appear to pass through every point: A least-squares curve generally does not pass through each observation. It minimizes the total squared vertical error rather than interpolating every point.
- The chart reports a very high R-squared: This can happen with a small sample or a curve that is too flexible. Inspect the data and validate predictions beyond the points used for the fit.
Excel for Mac and Excel for the web
In Excel for Mac, the chart workflow is similar: select the chart series and use the Chart Design tab’s trendline controls, or open the trendline options from the series context menu. Ribbon placement and wording can vary by release, but the relevant settings are Polynomial, Order 2, and the equation and R-squared display options. On a Mac, Control-click or right-click can open the context menu, depending on the mouse or trackpad settings.
Excel for the web has a more limited and changing chart-editing interface than the desktop app. If the web version does not expose polynomial order or the equation-label options in your workbook, open it in the Excel desktop app to configure the trendline. The chart can still be viewed in the browser afterward, but check the result there before sharing.
Frequently Asked Questions
How do I make a quadratic trendline in Excel?
Select an XY scatter chart series, choose Chart Design > Add Chart Element > Trendline > More Trendline Options, then select Polynomial and set Order to 2.
Is a polynomial trendline order 2 the same as a quadratic trendline?
Yes. A polynomial of order 2 includes a squared term, so it is a quadratic model.
Can a quadratic trendline pass through every data point?
Usually not. Excel fits a least-squares curve, which aims to minimize squared vertical errors. It passes through every point only in special cases, such as when the observations exactly follow a quadratic model.
Should I use a quadratic trendline for forecasting?
Only when the curved pattern is plausible and supported by the data. Predictions far beyond the observed x-values are extrapolations and can become unrealistic quickly, so test forecasts against new observations where possible.
Why does my trendline equation show different values from my calculations?
The chart equation may display rounded coefficients. Increase the equation label’s decimal places and remember that a calculation based on rounded coefficients may still differ slightly from Excel’s full-precision fitted curve.
Related
- Excel Import CSV with Line Breaks Without Splitting Rows
- Excel CSV Import Options: Which Method to Use
- Excel CSV Import Settings: Delimiters and Data Types
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Histogram Formulas: Calculate Bin CountsTo apply a formula to histogram data in Microsoft Excel for Microsoft 365 on Windows, put your numeric…
- DAX in Excel Power Pivot: How It Works and When to Use ItDAX in Excel Power Pivot is the formula language used to create calculations in an Excel data model,…
- Pivot Chart Secondary Axis: How to Add and Format OneYes. In Excel for Microsoft 365 on Windows, select the PivotChart series you want to rescale, open Format…
- Traffic Light Chart in Excel: Build a Status DashboardA traffic light chart in Excel is a visual status indicator that uses green, yellow, and red symbols…
- Excel Pivot Table Unique Values: Count or List ThemTo list unique values in Excel, put the field in a PivotTable’s Rows area; repeated labels appear once.…
- Conditional Progress Circle Chart in Excel: Build OneYes. In Excel for Microsoft 365 on Windows, you can make a conditional progress circle with a doughnut…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.