Quadratic Regression Calculator

Fit a parabola y = ax² + bx + c to your (x, y) data by least squares, and get the coefficients a, b, c plus the R² goodness-of-fit.

Quick Facts

Method
Ordinary least squares on the 3×3 normal equations for y = ax² + bx + c
Minimizes the sum of squared vertical residuals; needs at least 3 distinct x values.

Your Results

Calculated
Fitted equation
-
y = ax² + bx + c
Coefficient a
-
Curvature (x² term)
Coefficient b
-
Linear term
Coefficient c
-
Intercept
R² (goodness of fit)
-
1.0 = perfect fit
Vertex (turning point)
-
x = -b / 2a

Ready

Enter matching X and Y lists, then press Calculate.

What quadratic regression does

Quadratic regression finds the parabola y = ax² + bx + c that best fits a set of (x, y) data points. "Best fit" has a precise meaning: the calculator chooses the three coefficients a, b, and c so that the sum of the squared vertical distances between each data point and the curve — the residuals — is as small as possible. This is the ordinary least-squares criterion, the same principle behind linear regression, extended to a curve that can bend once.

You reach for a quadratic model instead of a straight line when the data rises then falls (or falls then rises), or when its rate of change speeds up or slows down across the x-range. Projectile height over time, stopping distance versus speed, and revenue versus price are all situations where a single bend describes the relationship far better than a line.

The formula and how it is solved

To minimize the squared error, the least-squares method sets up three "normal equations" — one for each unknown — using sums computed from your data. Writing n for the number of points, they are:

  • a·Σx⁴ + b·Σx³ + c·Σx² = Σx²y
  • a·Σx³ + b·Σx² + c·Σx = Σxy
  • a·Σx² + b·Σx + c·n = Σy

This calculator computes those seven sums (Σx, Σx², Σx³, Σx⁴, Σy, Σxy, Σx²y) from your inputs, then solves the resulting 3×3 system by Gaussian elimination with partial pivoting to return exact a, b, and c.

Reading the coefficients

  • a controls the curvature. If a > 0 the parabola opens upward (a U shape with a minimum); if a < 0 it opens downward (an ∩ shape with a maximum). The larger |a| is, the tighter and steeper the curve.
  • b is the linear term; together with a it locates the turning point.
  • c is the y-intercept — the model's predicted value when x = 0.
  • The vertex (turning point) sits at x = −b / (2a), the input where the fitted quantity is minimized or maximized.

What R² tells you

R² (the coefficient of determination) measures how much of the variation in y the parabola explains, on a scale from 0 to 1. It is defined as R² = 1 − (SSres / SStot), where SSres is the sum of squared residuals and SStot is the total squared variation of y about its mean. An R² of 1.0 means the curve passes exactly through every point; 0 means the parabola does no better than a flat line at the mean. Values above about 0.9 usually indicate a strong quadratic relationship, but always plot the residuals too — a high R² can still hide a systematic pattern the model misses.

Frequently Asked Questions

What is quadratic regression?
Quadratic regression fits a parabola y = ax² + bx + c to your (x, y) data using the method of least squares, choosing a, b, and c to minimize the total squared vertical distance between the curve and the points. It is the right tool when the data has a single bend or turning point rather than a straight-line trend.
How many data points do I need?
At least 3, and they must have at least 3 distinct x values. But with exactly 3 points the parabola passes through all of them and R² is always 1, so it says nothing about fit quality. Use 8 or more points spread across the x-range for a regression whose R² is actually informative.
When should I use a linear model instead?
If a straight line already fits well — the data has no bend and the rate of change is roughly constant — a linear regression is simpler and less prone to overfitting. A tell-tale sign that quadratic is unnecessary is a fitted coefficient a that is very close to 0, meaning the x² term barely contributes.
Can I use the fitted curve to predict outside my data range?
Be cautious. A parabola always turns around eventually, so extrapolating past the edges of your data can produce values that shoot up or down unrealistically fast. Predictions are most trustworthy within the range of x values you actually measured (interpolation), not far beyond them.