Paste your x and y data to find the least-squares parabola y = ax² + bx + c, or switch to a cubic, quartic, quintic or degree-6 polynomial. You get the equation, R², residuals, a prediction for any x and a scatter plot with the fitted curve.
Last updated:
Data format
One point per line, x and y separated by a comma, space or tab. Paste straight from a spreadsheet.
Enter your values to see the result.
Advertisement
Advertisement
How to use the Quadratic Regression Calculator
Enter your data as x, y pairs (one per line) or as two separate lists.
Pick the degree: 2 for a quadratic (parabola), up to 6 for higher-order curves.
Optionally enter an x value to predict its y.
Read the equation and R², then check the graph and residuals.
Compare degrees in the table to see whether a higher degree really improves the fit, and download the CSV.
Quadratic regression formula
For n points (xi, yi) the least-squares parabola y = ax² + bx + c minimises Σ(yi − axi² − bxi − c)². Setting the partial derivatives to zero gives three normal equations:
Equation
a term
b term
c term
= right side
1
Σx⁴ · a
Σx³ · b
Σx² · c
Σx²y
2
Σx³ · a
Σx² · b
Σx · c
Σxy
3
Σx² · a
Σx · b
n · c
Σy
Higher degrees work the same way with more powers of x (in matrix form, (XᵀX)β = Xᵀy). Fit quality is measured with R² = 1 − SSres / SStot, where SSres = Σ(y − ŷ)² and SStot = Σ(y − ȳ)², and the standard error of the estimate is √(SSres / (n − k − 1)) for a degree-k polynomial.
Choosing the polynomial degree
Degree
Name
Shape
Minimum points
Typical use
1
Linear
Straight line
2
Steady trends
2
Quadratic
Parabola, one turning point
3
Projectile paths, profit vs price, acceleration
3
Cubic
Up to two turning points, S-shape
4
Growth that speeds up then slows
4
Quartic
Up to three turning points
5
More complex calibration curves
5–6
Quintic, sextic
Up to 4–5 turning points
6–7
Smooth interpolation of many points; risk of overfitting
Tip: if moving from one degree to the next barely changes the adjusted R², keep the simpler model. Always look at the residuals: a curved pattern in the residuals means the model is missing part of the shape.
Frequently asked questions
What is quadratic regression?
Quadratic regression finds the parabola y = ax² + bx + c that best fits a set of points by minimising the sum of the squared vertical distances (residuals) between the points and the curve. It is used when data rises and then falls, or curves upward, instead of following a straight line.
How many data points do I need?
At least three points with different x values for a quadratic, and in general degree + 1 points for a polynomial of that degree. With exactly that many points the curve passes through all of them (R² = 1), so use more points to get a meaningful fit.
What does R² mean?
R² (the coefficient of determination) is the share of the variation in y that the model explains: R² = 1 − SSres/SStot. A value of 1 is a perfect fit and 0 means the curve explains nothing beyond the average of y. Adjusted R² penalises extra coefficients, which helps when comparing degrees.
Should I always use a higher degree?
No. A higher degree always raises R² on the data you have, but it can overfit and swing wildly between and beyond your points. Choose the lowest degree that captures the shape; the degree comparison table and adjusted R² help with that.
How is the quadratic fit calculated?
The coefficients solve the normal equations: Σx⁴a + Σx³b + Σx²c = Σx²y, Σx³a + Σx²b + Σxc = Σxy and Σx²a + Σxb + nc = Σy. This tool shows those sums with your numbers and solves the system with a numerically stable QR decomposition.
Can I trust predictions outside my data range?
Be careful. Predicting beyond the smallest or largest x (extrapolation) assumes the curve keeps the same shape, which polynomials often do not. The calculator flags predictions that are outside your data range.
Is my data uploaded anywhere?
No. All calculations run in your browser and the data never leaves your device.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.