What is a Quadratic Regression Calculator?
A quadratic regression calculator fits the parabola y = ax² + bx + c that best matches a set of (x, y) points by least squares. Enter your data and this quadratic regression solver returns a, b and c (as decimals, and as exact fractions when the data allow), R² next to the straight-line R², a test of whether the curve is needed, the vertex where y peaks or bottoms out, and a graph, with every step of the normal equations shown.
What the Quadratic Regression Calculator does
Enter (x, y) points and the calculator fits y = ax² + bx + c, the second-degree polynomial with the smallest sum of squared residuals. You get the three coefficients with standard errors and t-tests, R² and adjusted R², the F-test, the vertex (the maximum when a < 0, the minimum when a > 0), fitted values and residuals, and a prediction with 95% confidence and prediction intervals at any x you choose. When your data are whole numbers or short decimals, it also gives the exact fraction form of the equation, which is what most textbook answers use.
Use it when a scatter plot rises and then falls (or falls and then rises): fuel economy against speed, crop yield against fertilizer, profit against price, or the height of a thrown ball over time. If the data keep curving upward at an increasing rate rather than turning, try exponential regression; if they look straight, a linear regression or line of best fit is simpler.
How to use the Quadratic Regression Calculator
- Enter your points in Data points (x, y), one per row, or paste two columns from Excel or Google Sheets. You need at least 4 points and 3 different x values. The example buttons load a ∩-shaped, a ∪-shaped and an exact-fraction data set.
- Optionally type a value in Predict y at x = to get ŷ with its 95% confidence and prediction intervals.
- Read the equation, R² and the vertex. Compare the quadratic R² with the straight-line R² shown underneath to see how much the curve adds.
- Check the p-value for the a (x²) term in the coefficient table: a small p-value means the curvature is real, not noise.
- Open Step-by-step solution to see the sums, the three normal equations, the solved coefficients and the vertex for your own data.
How to do quadratic regression by hand
Quadratic regression by hand comes down to seven sums and three linear equations. These are the same steps the calculator shows for your data:
- Build the sums. From your n points, compute Σx, Σx², Σx³, Σx⁴, Σy, Σxy and Σx²y. A table with columns x, y, x², x³, x⁴, xy and x²y keeps this tidy.
- Write the three normal equations. Σy = cn + bΣx + aΣx², Σxy = cΣx + bΣx² + aΣx³ and Σx²y = cΣx² + bΣx³ + aΣx⁴. They come from setting the derivatives of the squared error with respect to a, b and c to zero.
- Solve for a, b and c. Substitute and eliminate one unknown at a time, or use Cramer’s rule or a matrix inverse. Keeping fractions until the end gives the exact coefficients.
- Write the equation ŷ = ax² + bx + c.
- Check with the residuals. Compute each residual y − ŷ. They should sum to zero (up to rounding) and show no pattern; then R² = 1 − SSE / SST.
Quadratic regression formula
The quadratic regression formula is a multiple regression of y on two columns, x and x². Writing out the least-squares conditions gives three normal equations, which are solved together for a, b and c.
| Symbol | Meaning |
|---|---|
| a | curvature: negative opens downward (∩), positive opens upward (∪) |
| b | slope of the curve at x = 0 |
| c | value of ŷ at x = 0 |
| x_v, y_v | location and height of the turning point |
| n − 3 | residual degrees of freedom (three coefficients estimated) |
Some software labels the constant first (b₀ + b₁x + b₂x²). The values are the same: b₂ = a, b₁ = b and b₀ = c.
When |a| is small, keep its full precision when predicting: rounding a = −0.002538 to −0.0025 shifts ŷ at x = 100 by about 0.38.
Sources: Penn State STAT 462, 7.7: Polynomial regression; NIST/SEMATECH e-Handbook, 4.1.4.1: Linear least squares regression; Microsoft Support: LINEST function.
Quadratic regression example
Speed and fuel economy (a close fit with decimal coefficients)
Problem. A test car is driven at steady speeds x of 30, 40, …, 120 km/h and its fuel economy y is recorded as 12.1, 14.3, 15.8, 16.6, 16.9, 16.4, 15.6, 14.2, 12.8 and 11.0 km/L. Fit a quadratic and find the most economical speed.
- 01Sums: n = 10, Σx = 750, Σx² = 64500, Σx³ = 6075000, Σx⁴ = 606930000, Σy = 145.7, Σxy = 10768, Σx²y = 902440.
- 02Normal equations: 145.7 = 10c + 750b + 64500a; 10768 = 750c + 64500b + 6075000a; 902440 = 64500c + 6075000b + 606930000a.
- 03Solving them gives a = −0.002538, b = 0.3613 and c = 3.8382 (exactly −67/26400, 23849/66000 and 2111/550).
- 04Equation: ŷ = −0.002538x² + 0.3613x + 3.8382.
- 05SSE = 0.5698 and SST = 37.661, so R² = 1 − 0.5698 / 37.661 = 0.9849. A straight line manages only R² = 0.0819.
- 06Curvature test: t = −20.4405 with 7 df, p ≈ 1.7 × 10⁻⁷, so the x² term is clearly needed.
- 07Vertex: x = −0.3613 / (2 × −0.002538) = 71.191 km/h, where ŷ = 16.7006 km/L.
- 08At 65 km/h: ŷ = 16.6033 km/L, with a 95% prediction interval of 15.8607 to 17.3459.
Answer. Fuel economy peaks at about 71 km/h (about 16.7 km/L) and falls off on either side. The parabola explains 98.5% of the variation, while a straight line explains almost none because the rise and fall cancel out.
Finding the vertex of a quadratic regression
The vertex is the turning point of the fitted parabola, and it is often the reason to run a quadratic regression at all: the speed with the best fuel economy, the price with the highest profit, the batch size with the lowest unit cost. It sits at x = −b / (2a), and its height is y = c − b² / (4a).
If a < 0 the parabola opens downward and the vertex is a maximum; if a > 0 it opens upward and the vertex is a minimum. The calculator reports it in the results and warns you when it falls outside your x range, because a turning point you never observed is an extrapolation. A vertex near the middle of your data, with points on both sides of it, is the most trustworthy.
Quadratic regression example with exact fractions: price and profit
A stall owner tries six prices x of $2 to $7 and records weekly profit y of 4, 9, 12, 13, 11 and 7 (hundreds of dollars). Profit rises and then falls, so the data have a clear maximum. Load the Exact fractions: price vs profit example above to run it.
- Sums: n = 6, Σx = 27, Σx² = 139, Σx³ = 783, Σx⁴ = 4675, Σy = 56, Σxy = 263, Σx²y = 1353.
- Normal equations: 56 = 6c + 27b + 139a; 263 = 27c + 139b + 783a; 1353 = 139c + 783b + 4675a.
- Solve exactly: a = −65/56 (−1.1607), b = 443/40 (11.075) and c = −953/70 (−13.6143), so ŷ = −(65/56)x² + (443/40)x − 953/70.
- Residuals: 3/28, −23/140, −4/35, 9/35, −1/20 and −1/28. They sum to exactly 0 and alternate in sign with no trend, so the parabola fits well. SSE = 17/140 ≈ 0.1214 and R² = 0.9979, against 0.1206 for a straight line.
- Vertex: x = −b / (2a) = 3101/650 ≈ $4.77, where ŷ ≈ 12.80, a weekly profit of about $1,280.
Quadratic regression on a TI-84, Excel, Google Sheets and Desmos
Every tool below fits the same least-squares parabola, so for the same data you get the same a, b, c and R² as this calculator.
| Tool | How to run it | What you get |
|---|---|---|
| TI-83 / TI-84 | Enter x in L1 and y in L2, then STAT → CALC → QuadReg (option 5), and press Enter | y = ax² + bx + c with a, b, c, and R² if DiagnosticOn is set |
| Excel | =LINEST(y_range, x_range^{1,2}) returns a, b and c; or a chart trendline set to Polynomial, order 2 | LINEST lists the x² coefficient first; the trendline can show the equation and R² |
| Google Sheets | =LINEST(y_range, ARRAYFORMULA(x_range^{1,2})), or a chart trendline set to Polynomial, degree 2 | The same values as Excel |
| Desmos | Type y₁ ~ ax₁² + bx₁ + c under a table with columns x₁ and y₁ | a, b, c and R², with the curve drawn over the points |
Quadratic vs linear vs cubic regression
Choose the model from the shape of your scatter plot, and add a higher power only if its coefficient is significant. Quadratic and cubic regression are both polynomial regression: a linear regression on powers of x.
| Model | Equation | Shape | Turning points |
|---|---|---|---|
| Linear | y = b₀ + b₁x | Straight line | None |
| Quadratic | y = ax² + bx + c | One bend (∩ or ∪), symmetric about the vertex | One |
| Cubic | y = ax³ + bx² + cx + d | S-shape with two bends | Up to two |
| Exponential | y = a·bˣ | Grows or decays by a constant percentage | None |
Common use cases
- Optimization: finding the price, dose, speed or temperature where an outcome peaks or bottoms out.
- Physics: fitting projectile height against time, where the x² coefficient estimates −g/2.
- Agriculture: modelling yield against fertilizer or irrigation, which typically rises then declines.
- Economics: describing cost or revenue curves with diminishing returns.
- Homework checks: confirming a hand-worked quadratic regression, including the exact fraction answer.
- Model checking: testing whether a straight-line model is missing curvature (a significant x² term).
Assumptions and limitations
- Symmetric shape: a parabola is symmetric about its vertex. Data that rise steeply and fall slowly (or the reverse) may need a different model.
- Extrapolation: outside the observed x range a parabola heads to ±∞, so predictions there are rarely sensible.
- Correlated terms: x and x² are strongly correlated when x is far from zero, which inflates the standard errors of b and c. The fitted curve, R² and the test for a are unaffected.
- Usual regression assumptions: independent observations and residuals with constant spread that are roughly normal.
- Higher degrees: a cubic or higher polynomial will always fit the sample better, but often generalizes worse. Add terms only when the data or theory call for them.
Frequently asked questions
How do I know if quadratic regression is better than linear regression?
What do a, b and c mean in quadratic regression?
How do I find the maximum or minimum of a quadratic regression?
How many points do I need for quadratic regression?
Can I get the quadratic regression coefficients as exact fractions?
Is quadratic regression the same as TI-84 QuadReg or Excel’s polynomial trendline?
Can this calculator do cubic or higher polynomial regression?
Cite this page
Statculator. (2026, November 14). Quadratic Regression Calculator. Retrieved November 14, 2026, from https://statculator.com/correlation-regression/quadratic-regression-calculator/