Fit polynomial curves to your data and calculate the best-fit equation with R² goodness of fit.
Last updated: March 2026
Polynomial regression is a form of regression analysis that models the relationship between an independent variable x and a dependent variable y as an nth degree polynomial. Unlike simple linear regression which fits a straight line, polynomial regression can capture curved, non-linear relationships in data.
The general form of a polynomial regression equation is: y = a₀ + a₁x + a₂x² + a₃x³ + ... + aₙxⁿ, where n is the degree of the polynomial and the coefficients (a₀, a₁, a₂, etc.) are determined through least squares fitting. A degree of 1 produces linear regression, degree 2 produces a parabola, and higher degrees produce increasingly complex curves.
This technique is widely used in fields like economics, physics, engineering, and data science when the relationship between variables is known or suspected to be non-linear. The R² statistic measures how well the polynomial fits the data, with values closer to 1 indicating better fit.
Follow these steps to fit a polynomial to your data:
Fitting a parabola to projectile motion data:
R² (coefficient of determination) measures how well the polynomial fits your data. Values range from 0 to 1, where 1 means perfect fit. R² > 0.9 is generally considered excellent, 0.7-0.9 good, and below 0.5 indicates poor fit.
You need at least n+1 data points for a polynomial of degree n. For example, degree 2 (quadratic) requires at least 3 points. More points generally produce more reliable results and better ability to detect the true relationship.
Overfitting occurs when you use too high a polynomial degree, making the curve pass through all points but creating wild oscillations. The model fits the noise in your data rather than the underlying pattern, hurting predictions for new data.
Use polynomial regression when you see clear curvature in a scatter plot of your data. If the relationship looks roughly straight, stick with linear (degree 1). Try degree 2 or 3 first before higher polynomials.
Extrapolation with polynomials is risky, especially with higher degrees. Polynomials can diverge rapidly outside the range of your data. Only extrapolate if you have strong theoretical reasons to believe the polynomial relationship continues.
Polynomial regression uses powers of a single variable (x, x², x³). Multiple regression uses multiple different variables (x₁, x₂, x₃). Polynomial regression is for modeling non-linear single-variable relationships.
Compare R² values for different degrees, but beware of overfitting. Also consider: (1) domain knowledge, (2) simplicity (prefer lower degrees), (3) cross-validation if you have enough data, and (4) visual inspection of the fitted curve.
Least squares finds coefficients that minimize the sum of squared differences between observed Y values and predicted values. This calculator uses Gaussian elimination to solve the normal equations for the least squares solution.
Related Tools
Linear relationship strength.
Linear correlation coefficient.
Rank correlation.
Regression fit quality.
Parabolic curve fit.
Third-degree polynomial fit.