The quadratic formula explained step by step

The quadratic formula solves any equation of the form ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) / 2a. Substitute the three coefficients and it gives both solutions, whether or not the equation factorises. The quadratic equation solver shows every step, and this guide walks through what each part means.

The formula

A quadratic equation has a squared term and nothing higher. Before using the formula, rearrange the equation so one side is zero and read off the coefficients: a multiplies x², b multiplies x, and c is the constant. The signs belong to the coefficients, so in x² − 3x + 2 = 0, a = 1, b = −3 and c = 2. If a is 0 the equation is not quadratic at all but linear, and the solver says so and solves the simpler version.

The ± means there are usually two answers: one using the plus sign and one using the minus sign.

Using it step by step

Take 2x² + 3x − 2 = 0, so a = 2, b = 3 and c = −2.

  • Work out the discriminant, b² − 4ac: 3² − 4 × 2 × (−2) = 9 + 16 = 25.
  • Take its square root: √25 = 5.
  • Divide by 2a for each sign: x = (−3 + 5) / 4 = 0.5 and x = (−3 − 5) / 4 = −2.
  • Check by substituting: 2(0.5)² + 3(0.5) − 2 = 0.5 + 1.5 − 2 = 0.

Most errors come from signs. Squaring a negative b gives a positive number, and −4ac becomes positive when a and c have opposite signs, as here. Writing the substitution out in brackets avoids both traps.

What the discriminant tells you

The expression under the square root, b² − 4ac, is called the discriminant, and it decides what kind of answers you will get before you finish:

  • Positive: two different real solutions. x² − 3x + 2 = 0 has discriminant 1 and solutions 1 and 2.
  • Zero: one repeated solution. x² − 6x + 9 = 0 has discriminant 0 and the single solution 3.
  • Negative: no real solutions, because a negative number has no real square root. x² + 2x + 5 = 0 has discriminant −16, and its solutions are the complex pair −1 ± 2i, which the complex number calculator can work with further.

If the discriminant is a perfect square, like 25, the solutions are rational and the equation could have been factorised. If it is not, like 8 in x² − 2 = 0, the solutions are irrational: ±√2.

Where the formula comes from

The formula is just completing the square done once, in general. Divide ax² + bx + c = 0 by a, move the constant across, and add (b/2a)² to both sides so the left side becomes a perfect square: (x + b/2a)² = (b² − 4ac) / 4a². Taking the square root of both sides and subtracting b/2a gives the formula. Two useful facts drop out on the way: the solutions always add up to −b/a and multiply to c/a.

Factoring and other methods

The formula always works, but it is not always the fastest route. If you can spot two numbers that multiply to c and add to b, factoring is quicker: x² − 3x + 2 = (x − 1)(x − 2), so x = 1 or 2. If b is 0, you can solve directly: x² = 9 gives x = ±3. If c is 0, take out x as a factor. Use the formula when none of those shortcuts is obvious, and for real-world equations with decimal coefficients, where factoring is rarely possible.

A physics example: a ball thrown upward at 20 m/s from 1.5 m has height h = −4.9t² + 20t + 1.5. Setting h = 0 gives t ≈ 4.155 s or t ≈ −0.074 s. Only the positive answer makes sense, so the ball lands after about 4.2 seconds. For cubic equations there is the cubic equation solver, and How to find the roots of a polynomial covers higher degrees.

Reading it on a graph

The graph of y = ax² + bx + c is a parabola, and the solutions are the points where it crosses the x-axis. Two real roots mean two crossings, a zero discriminant means the curve just touches the axis, and a negative discriminant means it never reaches it. The turning point, or vertex, is always at x = −b/2a, exactly halfway between the roots. The solver reports the vertex and whether it is a minimum (a positive) or a maximum (a negative), and the graphing calculator lets you see the curve itself.

Sources and further reading

The claims in this guide rest on these references, which were checked when the guide was last updated. Spotted an error? The contact page says how to report it.

  1. Quadratic formula — Wikipedia (derivation by completing the square)
  2. Discriminant — Wikipedia
  3. Quadratic Formula — Wolfram MathWorld

Try the tool

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) / 2a, which solves any equation of the form ax² + bx + c = 0.

What does the discriminant tell you?

Positive means two real solutions, zero means one repeated solution, and negative means no real solutions, only a complex pair.

Can the quadratic formula solve every quadratic?

Yes. It works for every quadratic equation, including ones that cannot be factorised.

Why are there two answers?

Because of the ± sign: a parabola can cross the x-axis in two places, and each crossing is a solution.