Fit a quadratic curve y = a + bx + cx² to your data using least squares regression.
Last updated: March 2026
Quadratic regression is a method for fitting a second-degree polynomial curve to a dataset. Unlike linear regression which assumes a straight-line relationship (y = a + bx), quadratic regression captures curved relationships using the equation y = a + bx + cx².
This calculator uses the least squares method to find the best-fitting parabola. The least squares approach minimizes the sum of squared vertical distances between observed data points and the predicted curve, ensuring an optimal fit. Quadratic relationships appear frequently in physics, economics, and engineering—such as the trajectory of projectiles, cost functions in business, or distance-time relationships with constant acceleration.
The quality of the fit is measured by R² (coefficient of determination), which ranges from 0 to 1. An R² close to 1 indicates that the quadratic model explains most of the variation in the data, while an R² close to 0 suggests a poor fit. Additionally, RMSE (root mean square error) quantifies the average prediction error in the same units as your y-data.
Quadratic regression fits data to the parabolic equation:
Where: a is the intercept (value when x = 0), b is the linear coefficient, and c is the quadratic coefficient. The sign of c determines the parabola's direction: positive means opens upward, negative means opens downward.
An object thrown upward follows a parabolic path (distance vs. time):
R² (coefficient of determination) is a measure of fit quality ranging from 0 to 1. R² = 0.95 means the model explains 95% of the variance in your data. Higher R² indicates a better fit, though context matters—sometimes lower values are still acceptable.
Root Mean Square Error measures the average prediction error. It's in the same units as your y-data. For height data in feet, an RMSE of 2.5 means predictions are off by about 2.5 feet on average. Smaller RMSE indicates better predictions.
Use linear regression if your data shows a straight-line trend. Use quadratic regression when data shows curvature—U-shaped or inverted-U patterns. Plot your data first: if it curves, quadratic is likely better. The higher R² will typically confirm this.
Yes! The calculator works with any real numbers. However, ensure your data makes physical sense. For example, negative temperatures are fine (Fahrenheit, Celsius). Negative heights or counts usually don't make sense depending on your application.
No, the x and y values can be in any order. The regression algorithm calculates sums regardless of order. However, it's your responsibility to pair them correctly: the i-th x-value must correspond to the i-th y-value.
With 2 points, you can fit a line perfectly (R² = 1), but not a parabola reliably. Quadratic regression needs at least 3 points. With exactly 3 points, the fit is perfect but potentially unreliable for prediction. Aim for 5+ points for stability.
Yes! Once you have the equation, substitute any x-value to predict the corresponding y. However, predictions outside your data range (extrapolation) are risky—the relationship may not hold beyond observed data. Interpolation (predicting within your data range) is generally safer.
This calculator uses the least squares method, which minimizes the sum of squared residuals (differences between observed and predicted values). Coefficients are found by solving the normal equations using Gaussian elimination with partial pivoting for numerical stability.
Related Tools
Linear relationship strength.
Linear correlation coefficient.
Rank correlation.
Regression fit quality.
Third-degree polynomial fit.
Higher degree curve fit.