Quadratic Regression Calculator
Quadratic regression fits a parabola to your data in the form y = ax² + bx + c. Enter your paired x and y values to get the equation, the R² goodness of fit, and the full working shown step by step.
A quadratic regression calculator finds the parabola that best fits your data and returns the equation y = ax² + bx + c along with the R² value. Type your x and y values into the tool above, hit Calculate, and you get the full equation, the coefficients, and every sum worked out so you can check the math by hand.
Below you will find four fully solved examples using real datasets people search for, plus a plain breakdown of the formula, the normal equations, and when a quadratic model beats a straight line.
What Is Quadratic Regression?
Quadratic regression is a way to fit a curved line, a parabola, through data that does not follow a straight path. Instead of the straight-line equation y = mx + b, it produces a second-degree equation: y = ax² + bx + c. The curve bends, which lets it track data that rises to a peak and then falls, or drops to a low point and then climbs.
You reach for it when a straight line clearly misses the pattern. Think of a ball thrown in the air, revenue that grows then tapers off, or crop yield that improves with fertilizer up to a point and then drops. All three trace a curve, and a straight line would badly misread them.
The tool above uses the least squares method, the same math a graphing calculator or linear regression calculator uses, except it solves for three coefficients instead of two.
What Do a, b, and c Mean?
Each coefficient in y = ax² + bx + c controls a different part of the curve. Here is what each one does:
| Term | What it controls | What to watch for |
|---|---|---|
| a | The curvature, how sharply the parabola bends | If a is positive the curve opens up (has a minimum). If a is negative it opens down (has a maximum). If a is near zero, your data is nearly linear. |
| b | The tilt and horizontal position of the curve | Works with a to set where the peak or dip sits. |
| c | The y-intercept | The value of y when x is 0. |
The turning point of the curve, the vertex, sits at x = -b / (2a). That single formula tells you where your data peaks or bottoms out, which is often the whole reason people run a quadratic fit.
The Quadratic Regression Formula
To find a, b, and c, quadratic regression solves three equations at the same time. These are called the normal equations:
aΣx⁴ + bΣx³ + cΣx² = Σx²y
aΣx³ + bΣx² + cΣx = Σxy
aΣx² + bΣx + cn = Σy
Here n is the number of data points, and each Σ (sigma) means “add up.” So Σx⁴ means square every x, square it again, then total the column. Feed the six sums into the three equations, solve the system, and you have your coefficients.
With even five data points that is 35 separate multiplications before you start solving. This is exactly why the work gets done with a calculator, and why the tool above prints every column sum so you can verify your own table.
How Do You Do Quadratic Regression by Hand?
The full process comes down to five steps:
- List your data as x and y pairs.
- Build a table with columns for x, y, x², x³, x⁴, xy, and x²y.
- Total each column to get the six sums.
- Drop those sums into the three normal equations.
- Solve the system for a, b, and c, then write the equation.
The worked examples below show this end to end using real numbers. Every equation and R² here was solved and checked, so you can match your answer against them. One check worth running first: if a straight line gives you almost the same R² as the curve, the squared term is not earning its place, and the simpler slope intercept form is the more honest model to report.
Quadratic Regression Worked Examples
These four datasets are the exact ones students paste into search. Round to the place your assignment asks for. Each answer below is rounded to three decimals.
Example 1: x = 15, 17, 21, 27, 35, 40 and y = 201, 276, 388, 465, 499, 462
This data climbs, levels off near x = 35, then dips, a clear downward parabola. Running the fit gives:
y = -0.928x² + 61.003x – 496.962
The R² is 0.9951, so the curve explains about 99.5% of the variation. Since a is negative, the parabola opens down and peaks near x = 32.9.
Example 2: x = 7, 8, 10, 13, 16, 18 and y = 199, 242, 334, 371, 367, 328
Values rise, top out around x = 13 to 16, then fall. The quadratic fit:
y = -3.658x² + 102.933x – 341.829
R² comes out to 0.9903. The peak sits near x = 14.1, and a being negative confirms the downward curve.
Example 3: x = 15, 17, 21, 28, 35, 42, 47 and y = 31, 37, 54, 69, 75, 69, 57
Seven points this time, rising to a maximum around x = 35 before easing back down:
y = -0.115x² + 8.013x – 64.220
With R² of 0.997, the fit is very strong. The vertex is near x = 34.7, which matches where the data tops out.
Example 4: x = 7, 8, 9, 11, 13, 14 and y = 14, 20, 24, 29, 29, 30
A gentler curve that rises and starts to flatten:
y = -0.5x² + 12.616x – 49.334
R² is 0.9883. The small negative a means a shallow downward bend, with the turning point near x = 12.6.
Quadratic Regression vs Linear Regression
The difference is the shape of the model. Linear regression draws the best straight line. Quadratic regression draws the best curve. Which one you use depends entirely on your data.
| Linear Regression | Quadratic Regression | |
|---|---|---|
| Equation | y = mx + b | y = ax² + bx + c |
| Shape | Straight line | Parabola (curve) |
| Best for | Constant rate of change | A rate that speeds up, slows down, or reverses |
| Has a peak/dip? | No | Yes, one turning point |
A quick test: plot your points. If they trend steadily in one direction, use linear regression. If they curve, bend, or have a clear high or low point, quadratic will fit far better. You can also compare R² from both, the higher value wins, though a quadratic will almost always score slightly higher because it has an extra coefficient to play with.
When Should You Use Quadratic Regression?
Use it when your data shows a real curve, not just noise around a straight line. Good signs:
- The values rise and then fall, or fall and then rise (a U shape or upside-down U).
- There is an obvious peak or lowest point in the middle of your range.
- A straight line leaves clear patterns in the leftover errors.
Common places it shows up: projectile motion in physics, profit that grows then declines as costs catch up, braking distance versus speed, and dose-response curves in biology.
Common Mistakes to Avoid
Three errors trip people up most:
- Forcing a curve on straight data. If your points are basically linear, a quadratic adds complexity for no gain. Check whether a simple line already fits.
- Overfitting. A parabola can hug random data and look impressive while meaning nothing. A high R² on scattered, patternless data is a red flag, not a win.
- Reading too much into the coefficients. a, b, and c describe the shape of the curve. They are not proof that x causes y.
Try these next
- Point Slope Form Calculator to write the equation of a straight line from a point and slope.
- Correlation Coefficient Calculator to measure how tightly two variables move together.
- Scatter Plot Maker to plot your points and eyeball the shape before you fit.
- Covariance Calculator to check the direction of the relationship between x and y.