About the Quadratic Regression Calculator
This quadratic regression calculator fits the parabola y = ax² + bx + c that best matches your data using the method of least squares. Paste your x values and y values (same order, same count) and it returns the coefficients a, b and c, the coefficient of determination R², the adjusted R², the standard error of the fit, the vertex (the turning point of the curve) and a predicted y for any x you choose.
Quadratic models suit data that rise and then fall, or fall and then rise: projectile height over time, profit as a function of price, crop yield against fertilizer, fuel economy against speed, or the stopping distance of a car. Students use it to check graphing-calculator QuadReg output; analysts use it to find the optimum of a curved relationship. The chart overlays the fitted curve on your data so you can judge the fit at a glance.
You need at least three points with at least three distinct x values. R² is computed as 1 − SSE/SST on the original y values. A high R² does not prove the relationship is truly quadratic, and predictions far outside the range of your x data can be unreliable because the parabola keeps curving.
How to use the quadratic regression calculator
- 1Paste your x values into the first box.
- 2Paste the matching y values into the second box, in the same order.
- 3Optionally enter an x value to predict.
- 4Read the best-fit equation, the coefficients and R².
- 5Check the vertex for the maximum or minimum, and the chart to judge the fit.
Formula and method
Least squares chooses a, b and c to minimise the sum of squared vertical distances between the data and the curve. Setting the partial derivatives of that sum to zero gives three linear "normal equations" in a, b and c, built from sums of powers of x up to x⁴. The calculator centres and scales x before solving them with Gaussian elimination, which avoids rounding problems when x values are large (such as years), and then converts the coefficients back to the original x.
R² is the share of the total variation in y explained by the curve. Adjusted R² and the standard error use n − 3 degrees of freedom because three parameters are estimated. The vertex at x = −b/(2a) is the maximum when a < 0 and the minimum when a > 0.
- a, b, c
- Fitted coefficients of x², x and the constant
- n
- Number of data points
- ŷ
- Value predicted by the fitted curve
- ȳ
- Mean of the observed y values
- R²
- Coefficient of determination
Worked examples
Ball height over time
Solving the normal equations for these seven points gives y ≈ −4.1548x² + 25.6071x + 2.1905. The negative a means the curve opens downward; the peak height of about 41.65 occurs at x ≈ 3.08, the curve explains 99.93% of the variation, and at x = 2.5 it predicts a height of about 40.24.
Exact parabola y = 2x² − 3x + 1
All six points lie exactly on y = 2x² − 3x + 1, so least squares recovers a = 2, b = −3, c = 1 with R² = 1. The minimum is at x = 3/4 with y = −0.125, and at x = 4 the curve predicts 2(16) − 12 + 1 = 21.
Fuel economy vs speed
The fit is mpg ≈ −0.011607·speed² + 1.213929·speed − 1.9357. Fuel economy peaks at about 29.8 mpg near 52.3 mph and falls off on both sides; R² ≈ 0.998 shows the parabola describes the pattern well, and at 55 mph it predicts about 29.7 mpg.
Frequently asked questions
What is quadratic regression?+
Quadratic regression fits a second-degree polynomial, y = ax² + bx + c, to a set of points by least squares. It captures curved relationships with one bend, such as a rise followed by a fall, that a straight line cannot.
How many points do I need for quadratic regression?+
At least three points with three different x values. With exactly three the parabola passes through every point and R² is 1, so you need more points to judge how well a quadratic really fits.
How do I know whether a quadratic fits better than a line?+
Compare adjusted R² and the residual pattern with a linear fit. If the linear residuals form a U or an arch and the quadratic raises adjusted R² noticeably, the curvature is real. Also check whether a turning point makes sense for your data.
What does the vertex tell me?+
The vertex at x = −b/(2a) is where the fitted curve reaches its maximum (when a is negative) or minimum (when a is positive). It is often the answer you want, such as the price that maximises profit or the speed that maximises fuel economy.
Is this the same as QuadReg on a TI-84?+
Yes. QuadReg on TI calculators uses the same least-squares method, so the coefficients a, b, c and R² should match what this calculator reports for the same data.