Home · Statistics · Correlation & Regression · Polynomial Regression Calculator

Polynomial Regression Calculator

Polynomial regression of y on x at a degree you choose: fits ŷ = a₀ + a₁x + … + aₖxᵏ by least squares; the headline result is the highest-degree coefficient.

Your figures

Example result — edit the figures to make it yours

-0.0119

Coefficients (constant first)1.142857, 1.630952, -0.011905
Leading coefficient (x^2)-0.011905
R-squared0.895995
Pairs (n)7

What this calculator does

Polynomial regression of y on x at a degree you choose: fits ŷ = a₀ + a₁x + … + aₖxᵏ by least squares; the headline result is the highest-degree coefficient. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

ŷ = Σ aᵢ·xⁱ for i = 0…degree, fitted by least squares; headline = a_degree

The degree is an input (default 2, the quadratic); the fit minimises the sum of squared residuals for that degree.

Raising the degree can only improve the in-sample fit, so choose it from the shape of the process and out-of-sample checks, not from R² alone.

The headline reports the leading coefficient, a_degree, which governs the curve's behaviour at large |x|.

Worked example

With the example inputs this page opens with (polynomial degree 2), the result is -0.0119. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying polynomial degree
Polynomial degreeResult
11.5357
2-0.0119
3-0.1111
4-0.0606

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How do I pick the degree?

Start with the science: constant rate suggests 1, one bend 2, an S-shape 3. Then check that each added degree visibly improves the residuals and, ideally, held-out predictions — not just the fit on the points used to build it.

Why does the headline show only the top coefficient?

It is the requested summary of the fit's highest-order behaviour, matching how the fixed-degree pages (quadratic, cubic, quartic) report theirs. The full coefficient set comes out of the same least-squares fit.

How does the Polynomial Regression Calculator work?

Polynomial regression of y on x at a degree you choose: fits ŷ = a₀ + a₁x + … + aₖxᵏ by least squares; the headline result is the highest-degree coefficient. X values · y values · Degree → Highest-degree coefficient. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Polynomial Regression Calculator need?

X values · y values · Degree → Highest-degree coefficient. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.