Worked example
Example: Illustrative six points. The inputs, in the units selected above:
| Input | Value |
|---|---|
| Number of points used (3–8) | 6.0000 - |
| Point 1: x | 1.0000 - |
| Point 1: y | 2.1000 - |
| Point 2: x | 2.0000 - |
| Point 2: y | 3.9000 - |
| Point 3: x | 3.0000 - |
| Point 3: y | 6.8000 - |
| Point 4: x | 4.0000 - |
| Point 4: y | 11.200 - |
| Point 5: x | 5.0000 - |
| Point 5: y | 16.100 - |
| Point 6: x | 6.0000 - |
| Point 6: y | 22.300 - |
| Point 7: x | 0 - |
| Point 7: y | 0 - |
| Point 8: x | 0 - |
| Point 8: y | 0 - |
| x for prediction | 7.0000 - |
Applying the formula below gives:
| Result | Value |
|---|---|
| Constant term | 1.2000 |
| Linear coefficient | 0.30714 |
| Quadratic coefficient | 0.53571 |
| Coefficient of determination | 0.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)