About Polynomial Regression Calculator
This polynomial regression calculator fits a curve y = c0 + c1x + c2x² and so on, up to degree 6, by least squares. It opens on the height of a thrown ball over time, which is a parabola. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The model is linear in its coefficients, so it is solved exactly from the normal equations. Choose the degree with the picker and the curve, equation and residuals update.
Every extra degree can only raise R², even when it just follows noise. Compare adjusted R², which penalises extra terms, and keep the lowest degree that fits well.
How to use Polynomial Regression Calculator
- Paste two columns from a spreadsheet or type one x, y pair per line. A text first line is used as the axis names.
- Choose the model: linear, polynomial, exponential or logarithmic. For a polynomial, pick the degree.
- Read the equation and the statistics table. For the line, the slope p-value tests whether x helps predict y at all.
- Type an x value in the prediction box to get the predicted y and, for the linear model, its intervals.
- Check the residual plot. Residuals should scatter randomly around zero. A curve or a funnel means the model is wrong or the spread changes.
- Open the comparison table to see which model has the highest R², and look at adjusted R² before trusting a high degree.
Features
- Least squares line with slope, intercept, r, r², standard error of the estimate and of the slope.
- t test and p-value for the slope, with confidence intervals for slope and intercept.
- Prediction interval for one new point and confidence interval for the mean response.
- Polynomial regression of degree 2 to 6, exponential y = a·e^(bx) and logarithmic y = a + b·ln x.
- Model comparison table with R² and adjusted R².
- Equation in KaTeX, scatter plot with fitted curve and prediction band, and PNG download.
- Residual plot and a residuals table with fitted values.
- Step by step working for the least squares line, copyable as LaTeX.
Polynomial model
A polynomial of degree k has k + 1 coefficients, found by solving the normal equations.
y = c0 + c1·x + c2·x² + ... + ck·x^k
A·c = b, where A[i][j] = Σ x^(i+j) and b[i] = Σ x^i · yWorked examples
Ball height against time, degree 2 (9 points) gives y = 2.01 + 20.03x − 5.008x^2
R² = 0.9997 for the curve against 3.451e-7 for a straight line.
Privacy: how it works
- Everything is calculated by code running in your browser tab. Your data is not sent to Ulkaa or to any other server, and there is nothing to sign in to.
Tips
- A high R² does not prove a good model. Look at the residual plot as well.
- Prefer the lowest degree that fits. Adjusted R² drops when an extra term adds nothing.
- For the exponential model, R² is measured on the original y, so it can be compared fairly with the line.
- If the points form a curve that rises and levels off, try the logarithmic model.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your data are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your data are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What degree should I choose?
Use the lowest degree whose curve follows the trend and whose residuals look random. Compare adjusted R² between degrees.
Why can a high degree be a bad idea?
A high degree can wiggle through every point and still predict badly between or beyond them. That is called overfitting.
How many points do I need?
More than the degree. A degree 6 fit needs at least 7 points, and many more for a trustworthy curve.
More Linear Regression Calculator pages
- Linear Regression CalculatorPaste x, y data to fit a least squares line and compare it with polynomial, exponential and logarithmic models.
- Least Squares Regression Line CalculatorPaste x, y data to get the line y = b + mx that minimises the squared errors.
- Line of Best Fit CalculatorPaste your points to see the best fit line on a scatter plot, with its equation and predictions.
- Exponential Regression CalculatorPaste x, y data to fit y = a·e^(bx) and see the growth factor per step.