Skip to content
Statculator
Correlation & Regression

Quadratic Regression Calculator

Free quadratic regression calculator and solver with steps. Fit y = ax² + bx + c to your data and get a, b, c, exact fractions, R², the vertex and a graph.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try
Data points (x, y)
#xyRemove row
1
2
3
4
5
6
7
8
9
10
Tip: paste rows straight from a spreadsheet.

You need at least 4 points with at least 3 different x values.

Optional. Gives ŷ with a 95% confidence interval and prediction interval.

Fitted by ordinary least squares on the columns x and x², the same fit as the TI-84 QuadReg command and Excel’s order-2 polynomial trendline. Coefficients follow y = ax² + bx + c.

Results

Quadratic equation
ŷ = −0.002538x² + 0.3613x + 3.8382
R²
0.9849
Straight line: R² = 0.0819
Predicted y at x = 65
16.6033
95% PI 15.8607 to 17.3459

Parabola opens downward (∩ shape)

The maximum of the fitted curve is at x = 71.191, where ŷ = 16.7006. R² rises from 0.0819 for a straight line to 0.9849 with the x² term.

a (x² coefficient)
-0.002538
b (x coefficient)
0.3613
c (constant)
3.8382
Exact equation (fractions)
ŷ = −(67/26400)x² + (23849/66000)x + 2111/550
Adjusted R²
0.9805
Residual standard error, s
0.2853
F statistic (2, 7)
227.8501
p-value for F
4.26 × 10⁻⁷
Number of points, n
10
Vertex (maximum)
(71.191, 16.7006)

Interpretation: y rises and then falls as x increases, turning at x ≈ 71.191. The curve explains 98.49% of the variation in y, compared with 8.19% for a straight line.

Scatter plot of 10 points with fitted line1011121314151617y30405060708090100110120x(30, 12.1)(40, 14.3)(50, 15.8)(60, 16.6)(70, 16.9)(80, 16.4)(90, 15.6)(100, 14.2)(110, 12.8)(120, 11)R² = 0.985
Fitted parabola; its maximum is at x = 71.19.

Coefficients

TermEstimateStd. errortp-value
a (x²)-0.0025380.0001242-20.44051.68 × 10⁻⁷
b (x)0.36130.0188919.13222.65 × 10⁻⁷
c (constant)3.83820.64725.93090.0006

t-tests use n − 3 = 7 degrees of freedom.

Prediction at x = 65

QuantityEstimateLowerUpper
95% CI for the mean of y16.603316.292916.9137
95% prediction interval for one new y16.603315.860717.3459

Fitted values and residuals

#xyŷResidual
13012.112.3945-0.2945
24014.314.23150.0685
35015.815.56090.2391
46016.616.38270.2173
57016.916.6970.203
68016.416.5036-0.1036
79015.615.8027-0.2027
810014.214.5942-0.3942
911012.812.8782-0.0782
101201110.65450.3455

Step-by-step solution

  1. 1

    Compute the sums needed for the normal equations

    n = 10, Σx = 750, Σx² = 64500, Σx³ = 6075000, Σx⁴ = 606930000
    Σy = 145.7, Σxy = 10768, Σx²y = 902440
  2. 2

    Set up the three normal equations

    Least squares requires these three equations to hold simultaneously.

    Σy = c·n + b·Σx + a·Σx² → 145.7 = 10c + 750b + 64500a
    Σxy = c·Σx + b·Σx² + a·Σx³ → 10768 = 750c + 64500b + 6075000a
    Σx²y = c·Σx² + b·Σx³ + a·Σx⁴ → 902440 = 64500c + 6075000b + 606930000a
  3. 3

    Solve for a, b and c

    a = −0.002538, b = 0.3613, c = 3.8382
    Exact: a = −67/26400, b = 23849/66000, c = 2111/550
    ŷ = −0.002538x² + 0.3613x + 3.8382
  4. 4

    Measure the fit

    SSE = Σ(y − ŷ)² = 0.5698, SST = Σ(y − ȳ)² = 37.661
    R² = 1 − SSE / SST = 1 − 0.5698 / 37.661 = 0.9849
    s = √[SSE / (n − 3)] = 0.2853
  5. 5

    Test the curvature term (H₀: a = 0)

    t = a / SE(a) = −0.002538 / 0.0001242 = −20.4405, df = 7
    p = 1.68 × 10⁻⁷
  6. 6

    Find the vertex (the maximum)

    x = −b / (2a) = −0.3613 / −0.005076 = 71.191
    y = c − b² / (4a) = 16.7006
  7. 7

    Predict at x = 65

    ŷ = −0.002538(65)² + 0.3613(65) + 3.8382 = 16.6033
    95% CI for the mean: 16.6033 ± 2.3646 × 0.1313 = (16.2929, 16.9137)
    95% prediction interval: 16.6033 ± 2.3646 × 0.314 = (15.8607, 17.3459)

What is a Quadratic Regression Calculator?

A quadratic regression calculator fits the parabola y = ax² + bx + c that best matches a set of (x, y) points by least squares. Enter your data and this quadratic regression solver returns a, b and c (as decimals, and as exact fractions when the data allow), R² next to the straight-line R², a test of whether the curve is needed, the vertex where y peaks or bottoms out, and a graph, with every step of the normal equations shown.

What the Quadratic Regression Calculator does

Enter (x, y) points and the calculator fits y = ax² + bx + c, the second-degree polynomial with the smallest sum of squared residuals. You get the three coefficients with standard errors and t-tests, R² and adjusted R², the F-test, the vertex (the maximum when a < 0, the minimum when a > 0), fitted values and residuals, and a prediction with 95% confidence and prediction intervals at any x you choose. When your data are whole numbers or short decimals, it also gives the exact fraction form of the equation, which is what most textbook answers use.

Use it when a scatter plot rises and then falls (or falls and then rises): fuel economy against speed, crop yield against fertilizer, profit against price, or the height of a thrown ball over time. If the data keep curving upward at an increasing rate rather than turning, try exponential regression; if they look straight, a linear regression or line of best fit is simpler.

How to use the Quadratic Regression Calculator

  1. Enter your points in Data points (x, y), one per row, or paste two columns from Excel or Google Sheets. You need at least 4 points and 3 different x values. The example buttons load a ∩-shaped, a ∪-shaped and an exact-fraction data set.
  2. Optionally type a value in Predict y at x = to get ŷ with its 95% confidence and prediction intervals.
  3. Read the equation, R² and the vertex. Compare the quadratic R² with the straight-line R² shown underneath to see how much the curve adds.
  4. Check the p-value for the a (x²) term in the coefficient table: a small p-value means the curvature is real, not noise.
  5. Open Step-by-step solution to see the sums, the three normal equations, the solved coefficients and the vertex for your own data.

How to do quadratic regression by hand

Quadratic regression by hand comes down to seven sums and three linear equations. These are the same steps the calculator shows for your data:

  1. Build the sums. From your n points, compute Σx, Σx², Σx³, Σx⁴, Σy, Σxy and Σx²y. A table with columns x, y, x², x³, x⁴, xy and x²y keeps this tidy.
  2. Write the three normal equations. Σy = cn + bΣx + aΣx², Σxy = cΣx + bΣx² + aΣx³ and Σx²y = cΣx² + bΣx³ + aΣx⁴. They come from setting the derivatives of the squared error with respect to a, b and c to zero.
  3. Solve for a, b and c. Substitute and eliminate one unknown at a time, or use Cramer’s rule or a matrix inverse. Keeping fractions until the end gives the exact coefficients.
  4. Write the equation ŷ = ax² + bx + c.
  5. Check with the residuals. Compute each residual y − ŷ. They should sum to zero (up to rounding) and show no pattern; then R² = 1 − SSE / SST.

Quadratic regression formula

The quadratic regression formula is a multiple regression of y on two columns, x and x². Writing out the least-squares conditions gives three normal equations, which are solved together for a, b and c.

Model
ŷ = ax² + bx + c
Least-squares criterion
minimize SSE = Σ(y − ax² − bx − c)²
Normal equations
Σy = cn + bΣx + aΣx²; Σxy = cΣx + bΣx² + aΣx³; Σx²y = cΣx² + bΣx³ + aΣx⁴
Vertex
x_v = −b / (2a), y_v = c − b² / (4a)
Goodness of fit
R² = 1 − SSE / SST, R²adj = 1 − (1 − R²)(n − 1) / (n − 3)
Formula symbols
SymbolMeaning
acurvature: negative opens downward (∩), positive opens upward (∪)
bslope of the curve at x = 0
cvalue of ŷ at x = 0
x_v, y_vlocation and height of the turning point
n − 3residual degrees of freedom (three coefficients estimated)

Some software labels the constant first (b₀ + b₁x + b₂x²). The values are the same: b₂ = a, b₁ = b and b₀ = c.

When |a| is small, keep its full precision when predicting: rounding a = −0.002538 to −0.0025 shifts ŷ at x = 100 by about 0.38.

Sources: Penn State STAT 462, 7.7: Polynomial regression; NIST/SEMATECH e-Handbook, 4.1.4.1: Linear least squares regression; Microsoft Support: LINEST function.

Quadratic regression example

Speed and fuel economy (a close fit with decimal coefficients)

Problem. A test car is driven at steady speeds x of 30, 40, …, 120 km/h and its fuel economy y is recorded as 12.1, 14.3, 15.8, 16.6, 16.9, 16.4, 15.6, 14.2, 12.8 and 11.0 km/L. Fit a quadratic and find the most economical speed.

  1. 01Sums: n = 10, Σx = 750, Σx² = 64500, Σx³ = 6075000, Σx⁴ = 606930000, Σy = 145.7, Σxy = 10768, Σx²y = 902440.
  2. 02Normal equations: 145.7 = 10c + 750b + 64500a; 10768 = 750c + 64500b + 6075000a; 902440 = 64500c + 6075000b + 606930000a.
  3. 03Solving them gives a = −0.002538, b = 0.3613 and c = 3.8382 (exactly −67/26400, 23849/66000 and 2111/550).
  4. 04Equation: ŷ = −0.002538x² + 0.3613x + 3.8382.
  5. 05SSE = 0.5698 and SST = 37.661, so R² = 1 − 0.5698 / 37.661 = 0.9849. A straight line manages only R² = 0.0819.
  6. 06Curvature test: t = −20.4405 with 7 df, p ≈ 1.7 × 10⁻⁷, so the x² term is clearly needed.
  7. 07Vertex: x = −0.3613 / (2 × −0.002538) = 71.191 km/h, where ŷ = 16.7006 km/L.
  8. 08At 65 km/h: ŷ = 16.6033 km/L, with a 95% prediction interval of 15.8607 to 17.3459.

Answer. Fuel economy peaks at about 71 km/h (about 16.7 km/L) and falls off on either side. The parabola explains 98.5% of the variation, while a straight line explains almost none because the rise and fall cancel out.

Finding the vertex of a quadratic regression

The vertex is the turning point of the fitted parabola, and it is often the reason to run a quadratic regression at all: the speed with the best fuel economy, the price with the highest profit, the batch size with the lowest unit cost. It sits at x = −b / (2a), and its height is y = c − b² / (4a).

If a < 0 the parabola opens downward and the vertex is a maximum; if a > 0 it opens upward and the vertex is a minimum. The calculator reports it in the results and warns you when it falls outside your x range, because a turning point you never observed is an extrapolation. A vertex near the middle of your data, with points on both sides of it, is the most trustworthy.

Quadratic regression example with exact fractions: price and profit

A stall owner tries six prices x of $2 to $7 and records weekly profit y of 4, 9, 12, 13, 11 and 7 (hundreds of dollars). Profit rises and then falls, so the data have a clear maximum. Load the Exact fractions: price vs profit example above to run it.

  1. Sums: n = 6, Σx = 27, Σx² = 139, Σx³ = 783, Σx⁴ = 4675, Σy = 56, Σxy = 263, Σx²y = 1353.
  2. Normal equations: 56 = 6c + 27b + 139a; 263 = 27c + 139b + 783a; 1353 = 139c + 783b + 4675a.
  3. Solve exactly: a = −65/56 (−1.1607), b = 443/40 (11.075) and c = −953/70 (−13.6143), so ŷ = −(65/56)x² + (443/40)x − 953/70.
  4. Residuals: 3/28, −23/140, −4/35, 9/35, −1/20 and −1/28. They sum to exactly 0 and alternate in sign with no trend, so the parabola fits well. SSE = 17/140 ≈ 0.1214 and R² = 0.9979, against 0.1206 for a straight line.
  5. Vertex: x = −b / (2a) = 3101/650 ≈ $4.77, where ŷ ≈ 12.80, a weekly profit of about $1,280.

Quadratic regression on a TI-84, Excel, Google Sheets and Desmos

Every tool below fits the same least-squares parabola, so for the same data you get the same a, b, c and R² as this calculator.

ToolHow to run itWhat you get
TI-83 / TI-84Enter x in L1 and y in L2, then STAT → CALC → QuadReg (option 5), and press Entery = ax² + bx + c with a, b, c, and R² if DiagnosticOn is set
Excel=LINEST(y_range, x_range^{1,2}) returns a, b and c; or a chart trendline set to Polynomial, order 2LINEST lists the x² coefficient first; the trendline can show the equation and R²
Google Sheets=LINEST(y_range, ARRAYFORMULA(x_range^{1,2})), or a chart trendline set to Polynomial, degree 2The same values as Excel
DesmosType y₁ ~ ax₁² + bx₁ + c under a table with columns x₁ and y₁a, b, c and R², with the curve drawn over the points

Quadratic vs linear vs cubic regression

Choose the model from the shape of your scatter plot, and add a higher power only if its coefficient is significant. Quadratic and cubic regression are both polynomial regression: a linear regression on powers of x.

ModelEquationShapeTurning points
Lineary = b₀ + b₁xStraight lineNone
Quadraticy = ax² + bx + cOne bend (∩ or ∪), symmetric about the vertexOne
Cubicy = ax³ + bx² + cx + dS-shape with two bendsUp to two
Exponentialy = a·bˣGrows or decays by a constant percentageNone

Common use cases

  • Optimization: finding the price, dose, speed or temperature where an outcome peaks or bottoms out.
  • Physics: fitting projectile height against time, where the x² coefficient estimates −g/2.
  • Agriculture: modelling yield against fertilizer or irrigation, which typically rises then declines.
  • Economics: describing cost or revenue curves with diminishing returns.
  • Homework checks: confirming a hand-worked quadratic regression, including the exact fraction answer.
  • Model checking: testing whether a straight-line model is missing curvature (a significant x² term).

Assumptions and limitations

  • Symmetric shape: a parabola is symmetric about its vertex. Data that rise steeply and fall slowly (or the reverse) may need a different model.
  • Extrapolation: outside the observed x range a parabola heads to ±∞, so predictions there are rarely sensible.
  • Correlated terms: x and x² are strongly correlated when x is far from zero, which inflates the standard errors of b and c. The fitted curve, R² and the test for a are unaffected.
  • Usual regression assumptions: independent observations and residuals with constant spread that are roughly normal.
  • Higher degrees: a cubic or higher polynomial will always fit the sample better, but often generalizes worse. Add terms only when the data or theory call for them.

Frequently asked questions

How do I know if quadratic regression is better than linear regression?

Look at the p-value for the x² coefficient (a). If it is small, typically below 0.05, the curvature is statistically significant and the quadratic model is justified. Compare adjusted R² for both models too, and check that the residuals of the straight line show a curved pattern.

What do a, b and c mean in quadratic regression?

In y = ax² + bx + c, a controls the curvature: negative values give a ∩ shape with a maximum, positive values a ∪ shape with a minimum. c is the predicted y at x = 0, and b is the slope of the curve at x = 0. Together, −b / (2a) gives the x value of the turning point.

How do I find the maximum or minimum of a quadratic regression?

The turning point, or vertex, is at x = −b / (2a). Substitute it into the equation (or use y = c − b² / 4a) to get the maximum or minimum y. It is a maximum when a is negative and a minimum when a is positive. Treat it with caution if it falls outside the range of your data.

How many points do I need for quadratic regression?

At least 4 points with 3 or more distinct x values. Three points define a parabola exactly, leaving no residual error to estimate. For a reliable fit and meaningful tests, aim for 10 or more points spread across the region where the curve turns.

Can I get the quadratic regression coefficients as exact fractions?

Yes. When every x and y is a whole number or a short decimal, the calculator also solves the normal equations in exact arithmetic and shows a, b and c as fractions, for example ŷ = −(65/56)x² + (443/40)x − 953/70 for the price and profit example. If the fractions would need denominators of more than six digits, only the decimals are shown.

Is quadratic regression the same as TI-84 QuadReg or Excel’s polynomial trendline?

Yes. The TI-84 QuadReg command, Excel’s order-2 polynomial trendline and LINEST with x and x² columns all fit the same least-squares parabola, so a, b, c and R² match this calculator up to rounding.

Can this calculator do cubic or higher polynomial regression?

No, it fits degree 2 only. For a cubic regression, add columns x² and x³ to your data and run them as predictors in the multiple linear regression calculator, which fits the same least-squares polynomial. Check that the extra term is significant before keeping it.

Cite this page

Statculator. (2026, November 14). Quadratic Regression Calculator. Retrieved November 14, 2026, from https://statculator.com/correlation-regression/quadratic-regression-calculator/