Quadratic Regression Calculator
Fit a quadratic model y = ax² + bx + c to your data using the least squares method. Find coefficients, vertex, R², and make predictions. See also our Linear Regression Calculator, Quadratic Formula Calculator, and R-Squared Calculator.
How to Use the Quadratic Regression Calculator
Quadratic regression fits a parabola (second-degree polynomial) to your data. This is appropriate when the relationship between x and y is curved rather than linear — for example, projectile motion, revenue optimization, or any phenomenon with a maximum or minimum point. The model y = ax² + bx + c has three parameters that define the shape, position, and orientation of the parabola.
Enter at least three data points as x,y pairs. More points give a better fit and more reliable estimates. The calculator uses the normal equations (matrix method) to solve for the coefficients a, b, and c that minimize the sum of squared residuals. It also computes R² to measure goodness of fit and identifies the vertex (the maximum or minimum point of the parabola).
The vertex is located at x = -b/(2a) and represents either the maximum (if a < 0) or minimum (if a > 0) of the fitted curve. This is particularly useful in optimization problems — for example, finding the price that maximizes revenue or the angle that maximizes projectile range. Use the prediction field to estimate y for any x value.
Formula
Quadratic Model:
y = ax² + bx + c
Normal Equations (matrix form):
[n Σx Σx²] [c] [Σy ]
[Σx Σx² Σx³] [b] = [Σxy ]
[Σx² Σx³ Σx⁴] [a] [Σx²y]
Vertex:
x_vertex = -b / (2a)
y_vertex = a(x_vertex)² + b(x_vertex) + c
R² (Coefficient of Determination):
R² = 1 - SS_res / SS_tot
Example Calculation
Data: (-2,4), (-1,1), (0,0), (1,1), (2,4.2)
Fitting y = ax² + bx + c:
a ≈ 1.014, b ≈ 0.050, c ≈ -0.029
Equation: y = 1.014x² + 0.050x - 0.029
Vertex: x = -0.050/(2×1.014) = -0.025
Vertex y = 1.014(0.000625) + 0.050(-0.025) - 0.029 ≈ -0.030
R² ≈ 0.999 (excellent fit)
Prediction at x=3: y = 1.014(9) + 0.050(3) - 0.029 = 9.247
Reference Table
| Shape | Condition | Vertex Type | Example |
|---|---|---|---|
| Upward Parabola | > 0 | Minimum | Projectile height vs time |
| Downward Parabola | < 0 | Maximum | Revenue vs price |
| Wide Parabola | 0 < a < 1 | Shallow curve | Gradual acceleration |
| Narrow Parabola | > 1 | Steep curve | Rapid acceleration |
| Symmetric | = 0 | On y-axis | y = x² |
| Shifted Right | < 0 (a>0) | x > 0 | Delayed minimum |
| Shifted Left | > 0 (a>0) | x < 0 | Early minimum |
| Linear (degenerate) | = 0 | None | Reduces to y = bx + c |
Frequently Asked Questions
What is quadratic regression?
Quadratic regression fits a second-degree polynomial (parabola) y = ax² + bx + c to data. It extends linear regression by adding a squared term, allowing the model to capture curved relationships. The method minimizes the sum of squared residuals between observed and predicted values. It is appropriate when data shows a single curve (one bend) — for two or more bends, consider higher-degree polynomials or splines.
When should I use quadratic instead of linear regression?
Use quadratic regression when: (1) a scatter plot shows a curved pattern, (2) linear regression residuals show a U-shaped or inverted-U pattern, (3) the phenomenon has a known maximum or minimum (optimization), or (4) theory predicts a quadratic relationship (e.g., kinetic energy = ½mv²). Compare R² values — if quadratic R² is substantially higher than linear R², the quadratic model is justified. Be cautious of overfitting with small datasets.
What does the vertex represent?
The vertex is the turning point of the parabola — the maximum (if a < 0) or minimum (if a > 0) of the fitted curve. In practical terms, it represents the optimal point: the price that maximizes profit, the dosage that maximizes effectiveness, or the temperature that minimizes energy use. The vertex x-coordinate is -b/(2a), and the y-coordinate is the function value at that point.
How many data points do I need?
A minimum of 3 points is required to determine a unique parabola (3 unknowns: a, b, c). However, with exactly 3 points, the curve passes through all of them perfectly (R² = 1) regardless of the true relationship. For meaningful regression with reliable estimates, use at least 5-10 points. More data points provide better estimates of the true relationship and allow assessment of goodness of fit.
Can quadratic regression give negative R²?
In theory, R² for quadratic regression should be at least as high as for linear regression (since the linear model is a special case with a=0). However, the R² formula used here (1 - SS_res/SS_tot) can occasionally give values slightly below zero if the model fits worse than a horizontal line at the mean. This would indicate the quadratic model is inappropriate for the data. Always check that R² is positive and meaningful.
What are real-world applications of quadratic regression?
Common applications include: projectile motion (height vs. time), economics (revenue/profit vs. price or quantity), physics (kinetic energy vs. velocity), engineering (stress-strain curves), agriculture (crop yield vs. fertilizer amount), and sports analytics (performance vs. training intensity). Any situation where there's a natural maximum or minimum, or where the rate of change itself changes linearly, is well-suited to quadratic modeling.