Quadratic Regression Calculator
Fit the parabola y = a + bx + cx² to your data. Get the equation, R², the vertex and roots, a test of whether the curve beats a straight line, and a scatter plot with the fitted curve.
Enter at least 3 points with 3 different x values
Paste two columns from a spreadsheet (x, then y), or enter the x list and y list separately. The calculator uses ordinary least squares and accepts up to 1,000 points.
Quadratic regression equation
—
a (constant)
—
value of y at x = 0
b (linear term)
—
slope at x = 0
c (x² term)
—
—
R²
—
—
Scatter Plot and Parabola
—
How it was calculated
Fit and curve details
Notes on this fit
Fitted Values and Residuals
| # | x | y | ŷ (fitted) | Residual | Residual² |
|---|
How to Use This Calculator
- Paste your data as two columns (x, then y), or switch to Two lists and enter them separately. You need at least 3 points with 3 different x values; 6 or more gives a meaningful fit.
- Optionally enter an x to predict y, or a target y to find the x values where the curve reaches it.
- Press Calculate Regression.
- Read the equation and R², then check the plot and the residuals. Look at the p-value for the x² term and the R² of a straight-line fit to see whether the curve is really needed.
What Is Quadratic Regression?
A quadratic regression calculator finds the best-fitting quadratic equation for a dataset using the least squares method. The equation is y = ax² + bx + c, where a, b, and c are regression coefficients. Enter paired x and y values to calculate the coefficients, model curved relationships, and predict values based on a parabolic trend.
Quadratic regression is used when the data bend instead of following a straight line: crop yield against fertilizer, braking distance against speed, or the height of a thrown ball over time. This page writes the same equation in the order y = a + bx + cx², so here a is the constant term and c is the coefficient of x². The fit chooses all three to make the sum of squared residuals as small as possible.
Although the curve is not a line, the model is still a linear regression, because it is linear in the coefficients a, b, and c. That is why it can be solved exactly with three linear equations, with no iteration.
c > 0
The parabola opens upward and has a minimum at the vertex.
c < 0
The parabola opens downward and has a maximum at the vertex.
c = 0
The curve collapses to a straight line.
Model reference: Wikipedia — Polynomial regression.
Quadratic Regression Formulas
Model
ŷ = a + bx + cx²
a, b, and c are the coefficients to estimate.
Normal equations
Σy = na + bΣx + cΣx²
Σxy = aΣx + bΣx² + cΣx³
Σx²y = aΣx² + bΣx³ + cΣx⁴
Three equations, three unknowns.
Coefficient of determination
R² = 1 − SSE ÷ SST
SSE = Σ(y − ŷ)², SST = Σ(y − ȳ)².
Vertex
x = −b ÷ (2c)
Put this x back into the equation for the turning-point y.
Roots
x = (−b ± √(b² − 4ac)) ÷ 2c
Real roots exist only if b² − 4ac ≥ 0.
Test of the x² term
t = c ÷ SE(c), df = n − 3
SE(c) comes from s = √(SSE ÷ (n − 3)).
R² definition: Wikipedia — Coefficient of determination.
Worked Example 1: Four Points
Fit a parabola to (4, 5), (3, 6), (2, 4), and (1, 8).
- Sums: n = 4, Σx = 10, Σx² = 30, Σx³ = 100, Σx⁴ = 354, Σy = 23, Σxy = 54, Σx²y = 158.
- Solve the normal equations: a = 11.25, b = −4.45, c = 0.75.
- Equation: ŷ = 11.25 − 4.45x + 0.75x². At x = 4 it gives 5.45, close to the observed 5.
- With 4 points and 3 coefficients, only one degree of freedom is left, so treat this as a drill and not as evidence of a curve.
Worked Example 2: Fertilizer and Crop Yield
Fertilizer (kg per hectare) against yield (tonnes per hectare): x = 0, 20, 40, 60, 80, 100, 120, 140 and y = 2.1, 3.5, 4.4, 4.7, 4.9, 4.1, 3.2, 1.9.
- Fit: ŷ = 2.1333 + 0.07869x − 0.000577x².
- R² = 0.9932, against only 0.0085 for a straight line. The x² term has t = −26.9, p < 0.0001.
- Vertex: x = −0.07869 ÷ (2 × −0.000577) = 68.1 kg/ha, where the predicted yield peaks at 4.81 t/ha.
- Prediction: at 50 kg/ha the model gives about 4.62 t/ha.
Linear vs. Quadratic Regression
A parabola always fits at least as well as a line, so a higher R² alone does not justify the extra term.
| Feature | Linear | Quadratic |
|---|---|---|
| Equation | y = a + bx | y = a + bx + cx² |
| Coefficients | 2 | 3 |
| Minimum points | 2 | 3 (exact fit); 6 or more for a useful test |
| Shape | Constant rate of change | Rate of change that rises or falls steadily; one turning point |
| R² vs. the other | Never higher than quadratic | Never lower than linear |
| Best check | Residual plot shows a curve | p-value of the x² term is small |
Higher-degree polynomials can chase noise and swing wildly near the ends of the data, which is known as Runge's phenomenon. If a parabola does not describe your data, a different type of model is usually a better choice than adding more powers of x.
On high-degree fits: Wikipedia — Runge's phenomenon.
Reading the Coefficients
Each coefficient shapes the parabola in a different way.
| Coefficient | What it controls | Caution |
|---|---|---|
| a | Height of the curve at x = 0 (the y-intercept) | Only meaningful if x = 0 makes sense for your data |
| b | Slope of the curve at x = 0 | Not the average slope; the slope changes along the curve |
| c | Curvature: its sign sets up or down, its size sets how sharp | Depends on the units of x, so it is hard to compare between data sets |
The slope at any x is b + 2cx. Setting it to zero gives the vertex, x = −b ÷ (2c). If the vertex lies far outside the range of your x values, the data show only one side of the curve and the turning point is an extrapolation.
Frequently Asked Questions
What is quadratic regression?
Quadratic regression fits a parabola, y = a + bx + cx², to paired data: each y-value (the dependent variable) is modeled as a second-degree polynomial function of the x-value (the independent variable). It is the next step up from a straight line, a special case of polynomial regression, and it suits a dataset whose trend rises and then falls, or falls and then rises.
How is the quadratic regression equation calculated?
The calculator uses least squares: it finds the a, b, and c that minimize the sum of squared residuals. This leads to three linear equations (the normal equations) in the sums of x, x², x³, x⁴, y, xy, and x²y, which it solves directly, so you do not need to apply the formula by hand. The input is your list of x and y pairs, and the output is each coefficient of the equation plus the best-fit curve through your points.
How many data points do I need?
At least 3 points with 3 different x values. With exactly 3, the parabola passes through all of them and R² is 1, which says nothing about the quality of the model. In statistics, as in any curve fitting, more data helps: six or more points are needed for the p-value and standard error to mean much.
What does R² tell me in quadratic regression?
R², also called r-squared or the coefficient of determination, is the share of the variation in y that the parabola explains, from 0 to 1. It is calculated as 1 minus the residual sum of squares divided by the total sum of squares. A value near 1 means the curve follows the data closely. It does not prove the model is right: check the residuals on a scatter plot, because a high R² can hide a pattern the parabola misses.
How do I know if a quadratic fits better than a straight line?
Compare the R² of both fits and look at the p-value for the x² term, both of which the calculator reports. A small p-value (below 0.05) means the quadratic model adds real explanatory power. A tiny gain in R² with a large p-value means the straight line is enough. A low linear correlation does not rule out a curve: a symmetric U-shape has a correlation near zero, yet a parabola fits it well.
What do a, b, and c mean?
Each coefficient has a role. a is the intercept, the value of y at x = 0; b is the slope at x = 0; and c controls the curvature. A positive c opens the parabola upward and a negative c opens it downward. Because the slope keeps changing, b alone is not the rate of change at other points.
Can I use the equation to predict outside my data?
Be careful. Inside the range of your x values, predictions are usually reliable. Outside it, a parabola keeps climbing or falling without limit, which real processes rarely do. The calculator flags predictions that fall outside your data range.
What is the vertex and why does it matter?
The vertex is the turning point of the parabola, at x = −b ÷ (2c), and the vertical line through it is the axis of symmetry. It is the estimated maximum when c is negative and the minimum when c is positive, which makes it useful for finding an optimum such as the best dose or the lowest cost. Trust it only if it lies within or close to your data range.
Other Useful Calculators
Residual Calculator
Observed minus predicted for a regression line.
Correlation Coefficient Calculator
Pearson, Spearman, and Kendall with a regression line.
Constant of Proportionality Calculator
Find k = y/x and check proportional tables.
Raw Score Calculator
Convert a z-score or percentile back to a raw score.
Mean Absolute Deviation Calculator
Average distance of each value from the mean.
Empirical Rule Calculator
The 68-95-99.7 rule for normal data.