Maths & numbers

Quadratic through three points calculator

Recover the coefficients of the polynomial through three points with distinct x-coordinates.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Substitute all three x-values into the recovered polynomial to verify the fit. Coincident x-values do not uniquely determine the coefficients.

THE FORMULAUse divided differences to interpolate a polynomial of degree at most two

A worked example

(0,1), (1,4), (2,9) lie on x²+2x+1.

Good to know

If the points are collinear, the quadratic coefficient is zero.

Use divided differences to recover the coefficients

The default points are (0,1), (1,4) and (2,9). The first two-point slope is (4 − 1)/(1 − 0) = 3, and the second is (9 − 4)/(2 − 1) = 5. Their difference divided by the full x span gives the quadratic coefficient a = (5 − 3)/(2 − 0) = 1.

Next b = 3 − 1 × (0 + 1) = 2. Substituting the first point gives c = 1. The resulting polynomial is x² + 2x + 1. Evaluating it at x = 0, 1 and 2 returns exactly 1, 4 and 9, checking all three observations.

A quadratic curve passes through zero comma one, one comma four and two comma nine(0, 1)(1, 4)(2, 9)y = (x + 1)²
The three points determine y = x² + 2x + 1. Each highlighted point checks one supplied observation.

Separate interpolation from evidence about a wider trend

Three distinct x-coordinates determine a unique polynomial of degree at most two. Collinear points give a = 0 and therefore a linear polynomial. Repeated x-coordinates are rejected because the divided differences would divide by zero and the three inputs would fail the distinct-x requirement.

Interpolation exactly fits the supplied points. Additional measurements can still lie away from the fitted curve, particularly when the observations contain error or the relationship changes outside the measured interval. The Quadratic finite difference extrapolation calculator makes a similar degree-two assumption for equally spaced sequence terms. When x-coordinates are very close, small measurement changes can substantially alter the fitted coefficients.

A few questions, answered

Must the x values be equally spaced?

No. Divided differences work with arbitrary distinct x-coordinates. The equal spacing in the default example only simplifies the arithmetic.

How can I check the output?

Compute ax² + bx + c at each entered x-coordinate and compare it with the corresponding supplied y value.

Find your calculator

Start typing to explore the library.