Quadratic Formula Calculator

In short: for x² − 5x + 6 = 0 the discriminant is 1, the roots are x = 3 and x = 2, and the vertex of the parabola is at (2.5, −0.25). Enter any a, b and c and this calculator shows the discriminant, both roots, the vertex and every step of the working.

One formula that solves every quadratic

A quadratic equation — anything of the form ax² + bx + c = 0, with a not zero — describes a parabola, and its roots are the points where that parabola crosses the x-axis. Some quadratics surrender to factorising: x² − 5x + 6 splits neatly into (x − 2)(x − 3), and the roots 2 and 3 fall out. Most do not split neatly, and a few do not cross the axis at all. The quadratic formula, x = (−b ± √(b² − 4ac)) / 2a, is the method that works regardless. It is not a trick or an approximation; it is what you get by completing the square once, carefully, on the general equation with letters instead of numbers, and then reusing the result forever. Every root of every quadratic is already inside that one line, waiting for the three coefficients to be substituted in.

This calculator does more than hand back the roots, because the roots alone hide most of what an equation is telling you. The discriminant — the b² − 4ac inside the square root — announces in advance whether you will find two crossings, one touching point, or none. The vertex gives the parabola's turning point, its minimum or maximum value, which is often the quantity a real problem actually asks for: the lowest cost, the highest point of a flight, the best price. The axis of symmetry and the y-intercept complete the sketch of the graph. And the step-by-step working is printed in full, so a student can compare each line against their own attempt and find the exact line where a sign went wrong — which, in quadratic work, is very nearly always where it went wrong.

How the calculation works

First, the discriminant: D = b² − 4ac. If D is positive, its square root is a real number and the ± in the formula produces two different roots. If D is zero, the square root vanishes, the ± makes no difference, and both branches land on the same value — a repeated root, where the parabola's vertex sits exactly on the axis. If D is negative, the square root is taken of a negative number and the roots emerge as a complex pair, p ± qi, built from −b/2a and √|D|/2a. The vertex uses the same −b/2a: that is the x coordinate of the axis of symmetry, halfway between the roots whenever roots exist, and substituting it back into the original equation gives the vertex's y coordinate. The y-intercept is the simplest figure of all — set x to zero and the equation returns c.

Worked examples

Two real roots: x² − 5x + 6, so a = 1, b = −5, c = 6. Discriminant D = 25 − 24 = 1. Roots: x = (5 ± 1) / 2, giving x = 3 and x = 2. Vertex: x = 5/2 = 2.5, and substituting back gives y = 6.25 − 12.5 + 6 = −0.25, so the vertex is (2.5, −0.25) — exactly halfway between the roots, as it must be.

A repeated root: x² + 4x + 4. D = 16 − 16 = 0, so there is a single double root at x = −4/2 = −2. The equation is (x + 2)² in disguise, and its parabola touches the axis at its vertex, (−2, 0), without crossing.

A complex pair: x² + 2x + 5. D = 4 − 20 = −16, so the roots are x = (−2 ± 4i) / 2 = −1 ± 2i. The parabola's vertex is at (−1, 4), entirely above the axis, which is the geometric reason no real crossing exists.

The discriminant decides the story

DiscriminantRootsWhat the graph does
D > 0Two distinct real rootsCrosses the x-axis at two points
D = 0One repeated (double) rootTouches the axis at the vertex
D < 0A complex conjugate pairNever reaches the x-axis

Checking the discriminant before reaching for the full formula is the professional habit this table encourages: one short calculation tells you which of the three stories you are in, and a wrong-sign error in D is far easier to catch at that stage than after two roots have been computed from it.

Rules and honest notes

Get the equation into standard form first — everything on one side, zero on the other, terms in descending order — and read a, b and c off with their signs attached. The commonest error in all of quadratic work is dropping the minus sign on b or c during that transcription; the second commonest is forgetting that a missing term means a coefficient of zero (x² − 9 has b = 0, not no b), and a missing x² term means the equation is not quadratic at all. If a = 0, this calculator says so and explains the linear equation you actually have. Finally, verify roots by substitution when it matters: a genuine root returns the equation to zero, and that ten-second check catches nearly every slip the working might contain.

Frequently asked questions

What is the quadratic formula?

x equals (minus b, plus or minus the square root of b squared minus 4ac), all divided by 2a. It gives the solutions of any equation in the form ax² + bx + c = 0. The formula is derived by completing the square on the general equation, which is why it never fails: every quadratic, factorable or not, has its two roots sitting inside it.

What does the discriminant tell you?

The discriminant, b² − 4ac, is the part under the square root sign, and its sign decides everything before you finish the calculation. Positive: two distinct real roots, and the graph crosses the x-axis twice. Zero: one repeated root, and the graph touches the axis at its vertex. Negative: no real roots — the solutions are a complex pair, and the graph never reaches the axis at all.

What if a equals zero?

Then the equation is not quadratic. With no x² term it collapses to bx + c = 0, a linear equation with the single solution x = −c/b, and the quadratic formula cannot be used because it would divide by 2a — by zero. This calculator detects that case and tells you, rather than printing an error or a meaningless number.

How do I find the vertex of a parabola?

The vertex sits on the axis of symmetry, x = −b/2a. Substitute that x value back into the equation to get the y coordinate. For x² − 5x + 6, the axis is x = 2.5 and the vertex is (2.5, −0.25) — note how the vertex always lies exactly halfway between the two roots when roots exist, here between 2 and 3, because the formula's plus-or-minus is symmetric around −b/2a.

What are complex roots, in plain terms?

When the discriminant is negative, the formula asks for the square root of a negative number, which no real number provides. The roots are then written with the imaginary unit i, where i² = −1, and they always arrive as a conjugate pair such as −1 + 2i and −1 − 2i. They are genuine solutions — substituting them back satisfies the equation — they simply do not appear as crossings on a real graph.

Related tools

Formulas and worked examples last verified: 24 November 2026. Everything is calculated in your browser — nothing you type is sent anywhere.