What is the quadratic regression?
Paste paired x and y values to fit the parabola of best fit, y = ax² + bx + c. You also get R², the turning point, and the curve's value at a new x.
- Quadratic regression equation
- y = 1.07143x² + 0.1x + 0.957143
The quadratic regression equation through 5 points is y = 1.07143x² + 0.1x + 0.957143.
- a (x² coefficient)
- 1.071429
- b (x coefficient)
- 0.1
- c (constant)
- 0.957143
- R²
- 0.998236
- Vertex x
- −0.046667
- Vertex y
- 0.95481
- Predicted y
- 10.9
- Number of points (n)
- 5
Quadratic regression equation: y = 1.07143x² + 0.1x + 0.957143. The quadratic regression equation through 5 points is y = 1.07143x² + 0.1x + 0.957143.
The parabola of best fit
How to calculate
Fits the least-squares parabola y = ax² + bx + c to paired x and y values and reports a, b, c, R², the vertex, and a prediction at a new x.
Example with the default inputs (x values [−2, −1, 0, 1, 2], y values [5, 2, 1, 2, 5.5], New x value 3): The quadratic regression equation through 5 points is y = 1.07143x² + 0.1x + 0.957143.
Method: Solve the normal equations [n Σx Σx²; Σx Σx² Σx³; Σx² Σx³ Σx⁴] [c b a]ᵀ = [Σy Σxy Σx²y]ᵀ; R² = 1 − Σ(y − ŷ)² ÷ Σ(y − ȳ)².
- The first x value goes with the first y value, and so on, so both lists must be the same length.
- The curve minimises the sum of squared vertical distances from the points (ordinary least squares).
- A parabola needs at least 3 different x values.
Worked examples
Each example is checked against the calculator on every build.
- x values -2, -1, 0, 1, 2, y values 5, 2, 1, 2, 5.5, New x value 3 gives Quadratic regression equation y = 1.07143x² + 0.1x + 0.957143, a (x² coefficient) 1.071429, b (x coefficient) 0.1, c (constant) 0.957143, R² 0.998236, Vertex x -0.046667, Vertex y 0.95481, Predicted y 10.9.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1 Linear Least Squares Regression (a quadratic β₀ + β₁x + β₁₁x² is linear in its parameters; the estimates minimise the sum of squared deviations), https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm (retrieved 2026-10-05)
- x values 1, 2, 3, y values 1, 4, 9 gives Quadratic regression equation y = x², a (x² coefficient) 1, b (x coefficient) 0, c (constant) 0, R² 1, Vertex x 0, Vertex y 0.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1 Linear Least Squares Regression (a quadratic β₀ + β₁x + β₁₁x² is linear in its parameters; the estimates minimise the sum of squared deviations), https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm (retrieved 2026-10-05)
- x values 0, 1, 2, 3, 4, y values 1, 1.8, 3.3, 4.5, 6.3 gives a (x² coefficient) 0.121429, b (x coefficient) 0.844286, c (constant) 0.962857, R² 0.997071.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1 Linear Least Squares Regression (a quadratic β₀ + β₁x + β₁₁x² is linear in its parameters; the estimates minimise the sum of squared deviations), https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm (retrieved 2026-10-05)
How it works
For n pairs (x, y), the parabola ŷ = ax² + bx + c that minimises SSE = Σ(y − ŷ)² solves the normal equations:
- n·c + Σx·b + Σx²·a = Σy
- Σx·c + Σx²·b + Σx³·a = Σxy
- Σx²·c + Σx³·b + Σx⁴·a = Σx²y
The calculator solves them by Cramer's rule: each unknown is a ratio of two 3 × 3 determinants. Then:
- R² = 1 − SSE ÷ SST, with SST = Σ(y − ȳ)². Not shown when every y is the same (SST = 0).
- Vertex x = −b ÷ 2a, y = c − b² ÷ 4a. Not shown when a = 0 (the points lie on a line).
- Predicted y at a new x = ax² + bx + c.
Rules:
- 3 to 1,000 pairs. The first x goes with the first y. Lists of different lengths give no answer, with a message.
- Fewer than 3 different x values give no answer: no single parabola is the best fit.
- All the arithmetic is exact on the decimals you type, and each value is rounded once for display. A value too large or too small to show (beyond about 1.8 × 10³⁰⁸, or a nonzero value below about 5 × 10⁻³²⁴) gives no answer, with a message.
- The equation shows each coefficient to 6 significant digits, rounded half up from its exact value, leaves out a term whose coefficient is 0, writes 1x² as x², and uses a true minus sign.
Assumptions
- The errors are in y, not x, and every point counts equally (ordinary least squares).
Worked examples by hand
x = −2, −1, 0, 1, 2 and y = 5, 2, 1, 2, 5.5 (the default). Σx = 0, Σx² = 10, Σx³ = 0, Σx⁴ = 34, n = 5, Σy = 15.5, Σxy = 1, Σx²y = 46. The middle equation gives 10b = 1, so b = 0.1. The other two give 5c + 10a = 15.5 and 10c + 34a = 46. The first gives c = 3.1 − 2a; then 31 + 14a = 46, so a = 15/14 = 1.071429 and c = 3.1 − 15/7 = 67/70 = 0.957143. The equation is y = 1.07143x² + 0.1x + 0.957143. ȳ = 3.1, SST = 16.2, SSE = 1/35, so R² = 566/567 = 0.998236. The vertex is at x = −0.1 ÷ (2 × 15/14) = −0.046667, y = 0.954810. At x = 3, ŷ = 135/14 + 0.3 + 67/70 = 10.9.
x = 1, 2, 3 and y = 1, 4, 9. Three points fix one parabola, and these are on y = x²: a = 1, b = 0, c = 0, R² = 1, vertex (0, 0).
x = 0, 1, 2, 3, 4 and y = 1, 1.8, 3.3, 4.5, 6.3. The normal equations give a = 17/140 = 0.121429, b = 591/700 = 0.844286, c = 337/350 = 0.962857, and R² = 31317/31409 = 0.997071.
Other questions people ask
What is quadratic regression?
Quadratic regression fits a parabola, y = ax² + bx + c, to a set of points. It picks a, b and c so that the sum of the squared vertical distances from the points to the curve is as small as possible (least squares). Use it when the points rise and then fall, or fall and then rise.
How is the quadratic regression equation calculated?
From the sums n, Σx, Σx², Σx³, Σx⁴, Σy, Σxy and Σx²y, the calculator sets up three normal equations in c, b and a and solves them exactly. For the default points the result is y = 1.07143x² + 0.1x + 0.957143.
What does R² mean for a quadratic fit?
R² is the share of the variation in y that the parabola explains: 1 − SSE ÷ SST, where SSE is the sum of squared residuals and SST the sum of squared deviations of y from its mean. 1 means every point is on the curve.
How many points do I need?
At least 3 points with 3 different x values. With exactly 3 such points the parabola passes through all of them and R² is 1. More points give a fit that averages out the noise.
What is the vertex of the parabola?
It is the turning point of the curve: x = −b ÷ 2a and y = c − b² ÷ 4a. If a is positive, the vertex is the lowest point; if a is negative, the highest.
Is quadratic regression a linear model?
Yes, in the statistical sense. The curve is not a straight line, but it is linear in its unknowns a, b and c, so ordinary least squares solves it directly, as NIST explains.