# What is the quadratic regression?

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.

- Page: https://www.acalculator.org/statistics/quadratic-regression-calculator
- JSON spec: https://www.acalculator.org/statistics/quadratic-regression-calculator.json
- Version: 7c35a68c8f9c

## Default answer

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.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| x | x values | The x values, in order, separated by commas, spaces, semicolons, or new lines. |
| y | y values | The y values, one for each x value, in the same order. |
| at | New x value | An x value at which to read y from the fitted curve. Leave it empty to skip. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| equation | Quadratic regression equation | The least-squares parabola, each coefficient to 6 significant digits. |
| a | a (x² coefficient) | The coefficient of x². A positive a opens the curve upward. |
| b | b (x coefficient) | The coefficient of x. |
| c | c (constant) | The value of y on the curve where x = 0. |
| r2 | R² | The share of the variation in y that the curve explains, 1 − SSE ÷ SST. It is not shown when every y is the same. |
| vertexX | Vertex x | The x of the turning point, −b ÷ 2a. It is not shown when a is 0. |
| vertexY | Vertex y | The y of the turning point, c − b² ÷ 4a. |
| predicted | Predicted y | The value of y on the curve at the new x value. |
| n | Number of points (n) | How many (x, y) pairs there are. |

## 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 − ȳ)².

## Assumptions

- 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

1. x = -2 or -1, y = 5 or 2, at = 3 gives equation = y = 1.07143x² + 0.1x + 0.957143, a = 1.071429, b = 0.1, c = 0.957143, r2 = 0.998236, vertexX = -0.046667, vertexY = 0.95481, predicted = 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).
2. x = 1 or 2, y = 1 or 4 gives equation = y = x², a = 1, b = 0, c = 0, r2 = 1, vertexX = 0, vertexY = 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).
3. x = 0 or 1, y = 1 or 1.8 gives a = 0.121429, b = 0.844286, c = 0.962857, r2 = 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).

## FAQ

### 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.

## Sources

- NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1 Linear Least Squares Regression: a quadratic β₀ + β₁x + β₁₁x² is linear in its parameters, and least squares minimises the sum of squared deviations. https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm (retrieved 2026-10-05)
- OpenStax, Introductory Statistics 2e, §12.3 The Regression Equation: residuals y − ŷ and the sum of squared errors SSE that least squares minimises. https://openstax.org/books/introductory-statistics-2e/pages/12-3-the-regression-equation (retrieved 2026-10-05)
