FireCADCalc

Quadratic (Second-Order Polynomial) Regression

Least-squares quadratic y = a + bx + cx² through up to eight points, with the coefficient of determination R², the vertex and the predicted y at a chosen x.

Inputs

Examples: Illustrative six pointsPump head curve, 5 pointsEfficiency peak, 8 points

Accepted: 3 to 8
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9
Accepted: -1E+9 to 1E+9

Results

The coefficients minimise the sum of squared residuals: the normal equations [Σ1 Σx Σx²; Σx Σx² Σx³; Σx² Σx³ Σx⁴]·[a b c]ᵀ = [Σy Σxy Σx²y]ᵀ, solved here by Gaussian elimination. R² = 1 − SS_res/SS_tot. Extrapolating a quadratic beyond the data range is risky; the vertex (maximum or minimum) is meaningful only if it lies within the data. Vertex shows 0 when c = 0.

Constant term1.2000
Linear coefficient0.30714
Quadratic coefficient0.53571
Coefficient of determination0.99977
Vertex x (−b/2c)-0.28667
Predicted y at x₀29.600

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: Illustrative six points. The inputs, in the units selected above:

InputValue
Number of points used (3–8)6.0000 -
Point 1: x1.0000 -
Point 1: y2.1000 -
Point 2: x2.0000 -
Point 2: y3.9000 -
Point 3: x3.0000 -
Point 3: y6.8000 -
Point 4: x4.0000 -
Point 4: y11.200 -
Point 5: x5.0000 -
Point 5: y16.100 -
Point 6: x6.0000 -
Point 6: y22.300 -
Point 7: x0 -
Point 7: y0 -
Point 8: x0 -
Point 8: y0 -
x for prediction7.0000 -

Applying the formula below gives:

ResultValue
Constant term1.2000
Linear coefficient0.30714
Quadratic coefficient0.53571
Coefficient of determination0.99977
Vertex x (−b/2c)-0.28667
Predicted y at x₀29.600

Open this example in the calculator and change any input.

Formula

\(\min\sum(y_i - a - bx_i - cx_i^2)^2, \quad R^2 = 1 - \frac{SS_{res}}{SS_{tot}}\)

Variables

Symbol Meaning SI unit
\(n\) Number of points used (3–8) -
\(x_1\) Point 1: x -
\(y_1\) Point 1: y -
\(x_2\) Point 2: x -
\(y_2\) Point 2: y -
\(x_3\) Point 3: x -
\(y_3\) Point 3: y -
\(x_4\) Point 4: x -
\(y_4\) Point 4: y -
\(x_5\) Point 5: x -
\(y_5\) Point 5: y -
\(x_6\) Point 6: x -
\(y_6\) Point 6: y -
\(x_7\) Point 7: x -
\(y_7\) Point 7: y -
\(x_8\) Point 8: x -
\(y_8\) Point 8: y -
\(x_0\) x for prediction -
\(a\) Constant term -
\(b\) Linear coefficient -
\(c\) Quadratic coefficient -
\(R^2\) Coefficient of determination -
\(x_v\) Vertex x (−b/2c) -
\(\hat y(x_0)\) Predicted y at x₀ -

Method and standards

Quadratic fit.

Where it is used

  • Fitting pump, fan and efficiency curves.
  • Calibration curves.

Common mistakes

  • Extrapolating far beyond the data.
  • Too few points for three coefficients.

Assumptions and limits

  • Errors in y only; equal weights.

References

  • Least-squares polynomial regression

Questions and answers

When should I use a quadratic instead of a straight line?

When residuals of a straight-line fit curve systematically, as in pump curves or efficiency against load.

Is a higher R² always better?

Adding terms always raises R²; check that the extra term has a physical reason and improves predictions.

What do the defaults represent?

Six illustrative points rising with curvature, predicted at x = 7.

Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Sources

Montgomery and Runger, Applied Statistics and Probability for Engineers, 6th ed. (Wiley, 2014)

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.