Quadratic Regression Calculator

This quadratic regression calculator fits the best parabola through your x and y values. Example: x = 0 to 5 and y = 1, 2.8, 6.1, 10.8, 17.2, 24.5 give ŷ = 0.7125 · x² + 1.16321 · x + 0.960714 with R² = 0.999876.

Source: Wikipedia – Polynomial regression. Updated: .

Separate with spaces or semicolons; commas also separate values, so use a decimal point (2.5), not a comma.
Separate with spaces or semicolons; commas also separate values, so use a decimal point (2.5), not a comma.
Leave empty if you do not want a prediction.
My ToolboxYour inputs are saved in this browser only.

Result

Result
Parabola ŷ = 0.7125 · x² + 1.16321 · x + 0.960714 (R² = 0.999876, n = 6)
Key figures
QuantityValue
Coefficient a (x²)0.7125
Coefficient b (x)1.16321
Constant c0.960714
Coefficient of determination R²0.999876
Sum of squared residuals SSE0.0509286
Vertex(-0.816291 | 0.485954) – minimum
Prediction at x = 633.59
Data and fit
xyFitted ŷResidual y − ŷ
010.9607140.0392857
12.82.83643-0.0364286
26.16.13714-0.0371429
310.810.8629-0.0628571
417.217.01360.186429
524.524.5893-0.0892857
Calculation steps
  • Model y = a · x² + b · x + c; normal equations from the sums: n = 6, Σx = 15, Σx² = 55, Σx³ = 225, Σx⁴ = 979, Σy = 62.4, Σxy = 238.7, Σx²y = 1,012.1.
  • The 3×3 system gives a = 0.7125, b = 1.16321, c = 0.960714.
  • Vertex: x = −b / (2a) = -0.816291, y = 0.485954.
  • Prediction: ŷ(6) = 0.7125 · 6² + 1.16321 · 6 + 0.960714 = 33.59.
A prediction outside the range of your x values (extrapolation) is uncertain because a parabola soon becomes steep there. An R² near 1 does not prove a relationship; it only shows the fit.

How it is calculated

Quadratic regression fits a parabola y = a · x² + b · x + c to data points when the relationship is curved and a straight line is not enough.

Method and working

The task is to find a, b and c so that the sum of squared distances between the measured y and the parabola is as small as possible (least squares). The sums Σx, Σx², Σx³, Σx⁴, Σy, Σxy and Σx²y give a system of three equations in three unknowns, which the calculator solves. The coefficient of determination R² = 1 − SSE / SST shows what share of the variation in y the parabola explains. The vertex lies at x = −b / (2a).

Worked example

For x = 0, 1, 2, 3, 4, 5 and y = 1, 2.8, 6.1, 10.8, 17.2, 24.5 the sums are n = 6, Σx = 15, Σx² = 55, Σx³ = 225 and Σx⁴ = 979. The system gives a = 0.7125, b = 1.16321 and c = 0.960714, so ŷ = 0.7125 · x² + 1.16321 · x + 0.960714 with R² = 0.999876. The prediction at x = 6 is 0.7125 · 36 + 1.16321 · 6 + 0.960714 = 33.59. The vertex is at x = −0.816291 with y = 0.485954; because a > 0 it is a minimum.

Frequently asked questions

How do you calculate a quadratic regression?

Find a, b and c so that the sum of squared deviations is minimal. This means solving the system built from the sums Σx to Σx⁴, Σy, Σxy and Σx²y.

When is quadratic better than linear regression?

When the residuals of the line form a curve or the data are visibly curved, for example braking distances or projectile paths.

What does the vertex mean?

It is the lowest or highest point of the parabola at x = −b / (2a). In our example it lies at x = −0.816291, outside the measured values.

Sources and legal basis

As of: · Editorial policy

Related tools