Calculators King

Regression and Correlation

Quadratic Regression Calculator

Pairs are fitted as y equals a plus b x plus c x squared by least squares, and the page reports that equation together with its R squared.

Worksheet

Press Calculate to see the result.

Pairs are fitted as y equals a plus b x plus c x squared by least squares, and the page reports that equation together with its R squared.

What this calculator answers

A quadratic fit lets the line bend by adding an x squared column beside the constant and the x column. Least squares then solves a 3 by 3 normal system for the intercept, the linear coefficient, and the squared coefficient. The curve can turn upward or downward depending on the sign of the squared term. R squared compares the residual sum of squares with the total sum of squares around the mean of y. Four pairs are the minimum on this page so the three coefficients are not the entire sample.

The page reports a, b, and c in y = a + b x + c x squared, plus R squared. It does not test the coefficients. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.

The formula, written out

Quadratic least squares uses this relationship.

y = a + b x + c x^2

  • a. Intercept.
  • b. Coefficient of x.
  • c. Coefficient of x squared.
  • R squared. 1 minus SSE over SST on the original y scale.

The design columns are 1, x, and x squared. Setting the derivatives of the residual sum of squares to zero produces the normal equations solved here. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.

A full worked example

Example loaded in the worksheet

The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.

There are 5 pairs. The columns in the fit are 1, x, and x squared. Least squares solves the 3 by 3 normal equations for a, b, and c. a is 1, b is 2, and c is 1.

The equation is y = 1 + (2)x + (1)x^2. At the first x of 0 the curve predicts 1 and the typed y is 1. SSE is 1.1675e−28 and SST is 374.

R squared is 1 minus 1.1675e−28 / 374 = 1. The squared coefficient is not negative, so the fitted parabola opens upward.

Figures from the worked example
Equationy = 1 + (2)x + (1)x^2
R-squared1
a1
b2
c1

A second situation

The last point is lowered from 25 to 20

There are 5 pairs. The columns in the fit are 1, x, and x squared. Least squares solves the 3 by 3 normal equations for a, b, and c. a is 0.5714, b is 3.8571, and c is 0.2857.

The equation is y = 0.5714 + (3.8571)x + (0.2857)x^2. At the first x of 0 the curve predicts 0.5714 and the typed y is 1. SSE is 2.8571 and SST is 254.

R squared is 1 minus 2.8571 / 254 = 0.9888. The squared coefficient is not negative, so the fitted parabola opens upward.

Figures from the worked example
Equationy = 0.5714 + (3.8571)x + (0.2857)x^2
R-squared0.9888
a0.5714
b3.8571
c0.2857

If the points sit on a perfect parabola, SSE is zero and R squared is 1. Moving the last point off that curve creates a residual and lowers R squared. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.

What moves when the input moves

The last y moved from 25 to 22, so the points no longer sit on a perfect square. The headline result went from y = 1 + (2)x + (1)x^2 to y = 0.7429 + (3.1143)x + (0.5714)x^2.

The nudged inputs

There are 5 pairs. The columns in the fit are 1, x, and x squared. Least squares solves the 3 by 3 normal equations for a, b, and c. a is 0.7429, b is 3.1143, and c is 0.5714.

The equation is y = 0.7429 + (3.1143)x + (0.5714)x^2. At the first x of 0 the curve predicts 0.7429 and the typed y is 1. SSE is 1.0286 and SST is 297.2.

R squared is 1 minus 1.0286 / 297.2 = 0.9965. The squared coefficient is not negative, so the fitted parabola opens upward.

Figures from the worked example
Equationy = 0.7429 + (3.1143)x + (0.5714)x^2
R-squared0.9965
a0.7429
b3.1143
c0.5714

How to read the result

Read c as the bend. A positive c opens upward. The linear coefficient b is not the slope everywhere. The slope changes with x. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.

Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.

Assumptions that have to stay true

  • You want a parabola in a single x, not a second measured predictor.
  • At least four pairs are typed.
  • x squared is not a perfect copy of the other columns on these rows.
  • The y values are not all equal.

If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.

Mistakes that change the answer

  • Reading b as a constant slope. On a parabola the slope depends on x.
  • Entering a second predictor in the y column's place. Use the multiple regression page for two measured predictors.
  • Fitting a quadratic to two or three points and treating it as a check. This page asks for four.
  • Comparing this R squared with a linear R squared without saying the curve had an extra term.

Where a different calculator is the honest choice

Use the line of best fit calculator when the shape should stay straight. Use multiple linear regression when the third column is a different measurement, not x squared. Use the exponential regression calculator when y stays positive and the bend is multiplicative. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.

When the job changes, move to a page built for that job: Linear Regression Calculator, Exponential Regression Calculator, Line of Best Fit Calculator.

Check yourself

The curve is y = 1 + 2x + x squared. What is y at x = 3?

y is 1 plus 6 plus 9, which is 16.

Using the result in a sentence

A response that rises and then flattens, or a trajectory with a single bend, is the pattern a quadratic term is meant to follow. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.

A quadratic will bend to chase a few points. R squared near 1 on four points is a weak reason to trust the curve at a new x. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.

Questions people ask next

01What definition does the Quadratic Regression Calculator commit to?

This page uses Quadratic least squares: y = a + b x + c x^2. The design columns are 1, x, and x squared. Setting the derivatives of the residual sum of squares to zero produces the normal equations solved here. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for Pairs, one x y per line, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.

02How should the worked example be read out loud?

In the loaded example the equation is y = 1 + (2)x + (1)x^2. Read c as the bend. A positive c opens upward. The linear coefficient b is not the slope everywhere. The slope changes with x. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.

03What is the fastest way to get a misleading result?

Reading b as a constant slope. On a parabola the slope depends on x. A quadratic will bend to chase a few points. R squared near 1 on four points is a weak reason to trust the curve at a new x. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.

04When should I leave this page for a different calculator?

Use the line of best fit calculator when the shape should stay straight. Use multiple linear regression when the third column is a different measurement, not x squared. Use the exponential regression calculator when y stays positive and the bend is multiplicative. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.

05What belongs in the sentence next to the number?

y is 1 plus 6 plus 9, which is 16. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.