Fit y = ax³ + bx² + cx + d to data that bends twice, with R², the turning points, the inflection point where the bend changes direction, and predictions.
y = ax³ + bx² + cx + d · inflection at x = −b ÷ 3a
Cubic regression fits a third-degree polynomial, y = ax³ + bx² + cx + d, to data whose curve changes direction of bending. Where a parabola bends one way, a cubic can bend one way and then the other.
That S-like flexibility suits cost curves (cheaper per unit at first, then dearer), learning curves that start slow, speed up and plateau, and dose-response data over a moderate range.
The inflection point is where the bending flips. On a cost curve it marks the output with the lowest extra cost per unit; on a growth curve, the moment growth was fastest.
Least squares as in the NIST/SEMATECH e-Handbook, section 4.4.3. See Sources.
This leads to four normal equations, solved together. The calculator centres X first so large values like years don't cause rounding problems.
If 4b² − 12ac is negative, the curve has no peaks or troughs: it just keeps rising or falling.
Below that, extra output gets cheaper as the factory settles into rhythm; above it, overtime and congestion make each extra unit dearer. With no turning points, total cost rises throughout, as it should.
The slope of the fitted cost curve, 3ax² + 2bx + c: the cost of one more thousand units at each output level.
| Output (000) | Fitted cost (£00) | Marginal cost (£00) |
|---|---|---|
| 0 | 99.4 | 70.8 |
| 1 | 151.8 | 36.7 |
| 2 | 178.4 | 19.2 |
| 3 | 195.8 | 18.4 |
| 4 | 220.8 | 34.3 |
| 5 | 269.9 | 66.8 |
| 6 | 359.9 | 116 |
At least 4 different X values, but ideally 10 or more so the fit can be judged.
When the curve rises or falls the whole way, its slope never reaches zero. It still has an inflection point.
It always fits at least as closely, but that doesn’t make it better. Use adjusted R² and the shape of the residuals to decide.
The point where the rate of change is at its fastest or slowest. On a cost curve, that’s the lowest marginal cost.
Add a polynomial trendline of order 3, or use =LINEST(y, x^{1,2,3}).
Yes, with the polynomial regression calculator, but higher orders wiggle more and generalise worse.
Raising large numbers like 2024 to the third power loses precision. Centring keeps the arithmetic accurate; the equation shown is converted back to your original X.
Each coefficient carries Y units divided by X units to the matching power, so they only make sense together, not one at a time.
Related Tools
Linear relationship strength.
Linear correlation coefficient.
Rank correlation.
Regression fit quality.
Parabolic curve fit.
Higher degree curve fit.