Polynomial Regression Calculator

Fit polynomial curves to your data using least squares method with R² analysis

Polynomial Regression Settings

Higher degrees may overfit with small datasets

Number of decimal places in results

Data Points

#
X
Y
1
2
3
4
5

Need at least 3 points for degree 2 polynomial. Current: 5 points.

Regression Results

Polynomial Equation

y = x^2+1.000000

Coefficient of Determination

R² = 1.000000
Excellent fit

Polynomial Coefficients

a0
1.000000
a1
0.000000
a2
1.000000

Example: Quadratic Growth

Sample Data

Points: (1,2), (2,5), (3,10), (4,17), (5,26)

Pattern: Quadratic relationship y ≈ x² + 1

Degree: 2 (quadratic polynomial)

Expected Results

Equation: y = 1.000000x² + 0.000000x + 1.000000

R² = 1.000000 (perfect fit)

Coefficients: a₀ = 1, a₁ = 0, a₂ = 1

Polynomial Degrees

Linear (Degree 1)
y = a₁x + a₀
Straight line
Quadratic (Degree 2)
y = a₂x² + a₁x + a₀
Parabola
Cubic (Degree 3)
y = a₃x³ + a₂x² + a₁x + a₀
S-shaped curve

R² Interpretation

R² ≥ 0.90Excellent
0.70 ≤ R² < 0.90Good
0.50 ≤ R² < 0.70Moderate
R² < 0.50Poor

Quick Tips

Higher degrees may overfit small datasets

Need at least n+1 points for degree n

R² measures goodness of fit (0 to 1)

Use cross-validation for model selection

Understanding Polynomial Regression

What is Polynomial Regression?

Polynomial regression is a form of regression analysis where the relationship between the independent variable x and dependent variable y is modeled as an nth degree polynomial. It's particularly useful when the relationship between variables is non-linear.

When to Use It?

  • Data shows curved relationships
  • Linear regression doesn't fit well
  • Growth/decay processes
  • Physical phenomena with polynomial behavior

Mathematical Foundation

The general form of a polynomial regression equation is:

y = a₀ + a₁x + a₂x² + ... + aₙxⁿ

Coefficients are found using the least squares method by minimizing the sum of squared residuals.

Matrix Formula

β = (XᵀX)⁻¹Xᵀy

Where X is the design matrix and y is the response vector