📊 Polynomial Regression Calculator
Fit a polynomial curve (degree 2 or 3) through your data points using least squares regression.
What polynomial regression does
Polynomial regression fits a curved line through your data by finding the best-fitting polynomial of a chosen degree, rather than a straight line. A degree-2 polynomial fits a curve with one bend (a parabola), while a degree-3 polynomial can fit a curve with up to two bends.
How this calculator works
Enter your x,y data points (at least degree+2 complete pairs are needed) and choose degree 2 or 3. The calculator sets up and solves the least-squares normal equations using Gaussian elimination to find the coefficients that minimize the total squared error between the curve and your data, then reports the R-squared value showing how well the curve fits.
Higher-degree polynomials can fit training data very closely but may not generalize well to new points (overfitting), especially with few data points. Provided for general educational and planning purposes.