What quartic regression does
Quartic regression fits a fourth-degree polynomial to your data:
y = ax⁴ + bx³ + cx² + dx + e
Given a set of (x, y) observations, the calculator finds the five coefficients a, b, c, d, and e that make the curve pass as close as possible to every point. "As close as possible" has a precise meaning: it minimizes the sum of squared residuals, ∑(yᵢ − ŷᵢ)², where ŷᵢ is the value the fitted curve predicts at xᵢ. This is the ordinary least-squares criterion, the same one used for straight-line and quadratic regression — only the model here has more curvature.
How the coefficients are found
Because the polynomial is linear in its unknown coefficients, the least-squares solution is exact, not iterative. Setting the partial derivatives of the squared-error sum to zero gives a system of five linear equations in a, b, c, d, e — the normal equations. Their coefficients are power sums of x (from ∑x⁰ up to ∑x⁸) and cross sums ∑yxʲ. This calculator builds that 5×5 system and solves it by Gaussian elimination with partial pivoting, then reports the coefficients, the reconstructed equation, and R².
Reading R²
The coefficient of determination R² = 1 − SSres/SStot reports the fraction of the variation in y that the fitted curve explains, from 0 (no better than a horizontal line at the mean) to 1 (the curve hits every point). Note that adding polynomial terms can only raise R², so a high R² alone never proves that a quartic is the right model — five points always give R² = 1 regardless of the underlying process.
When a quartic is the right choice
A quartic can bend up to three times (it has up to three turning points and up to two inflection points), so it is useful when data shows an M- or W-shaped pattern, or a rise-fall-rise trend that a line, parabola, or cubic cannot capture. It is common in curve-fitting for calibration curves, empirical physics and engineering data, and interpolating tabulated values. If your data has only one bend, prefer a quadratic; if it is monotonic, prefer a line — fewer terms generalize better.