ΣCalculator Solver
Algebra

The Quadratic Formula: How to Solve ax² + bx + c = 0

Worked examples for two roots, one root and complex roots, what the discriminant tells you, and the mistakes to avoid.

October 19, 2026 · 6 min read · ← Back to calculator

Any equation of the form ax² + bx + c = 0, with a ≠ 0, can be solved with the quadratic formula:

x = (−b ± √(b² − 4ac)) / 2a

A worked example

Solve x² − 3x − 10 = 0. Here a = 1, b = −3 and c = −10.

  1. Discriminant: b² − 4ac = (−3)² − 4(1)(−10) = 9 + 40 = 49.
  2. √49 = 7.
  3. x = (3 ± 7) / 2, so x = 5 or x = −2.

Check: (x − 5)(x + 2) = x² − 3x − 10. Both roots are correct.

What the discriminant tells you

The value D = b² − 4ac decides the kind of answer before you finish the formula:

  • D > 0: two different real roots, as in the example above.
  • D = 0: one repeated root. For x² − 6x + 9 = 0, D = 36 − 36 = 0 and x = 3.
  • D < 0: two complex roots. For x² + 2x + 5 = 0, D = 4 − 20 = −16, so x = −1 ± 2i.

If D is a perfect square, the roots are rational and the quadratic factors neatly.

When a is not 1

Solve 2x² + 3x − 2 = 0. D = 9 + 16 = 25, so x = (−3 ± 5) / 4, which gives x = 1/2 or x = −2. The factored form is (2x − 1)(x + 2).

The vertex and other shortcuts

  • The vertex of y = ax² + bx + c is at x = −b / 2a. For x² − 3x − 10 it is at x = 1.5, where y = −12.25.
  • The roots add up to −b/a and multiply to c/a. For x² − 3x − 10: 5 + (−2) = 3 and 5 × (−2) = −10.

Common mistakes

  • Forgetting that −b flips the sign: if b = −3, then −b = 3.
  • Squaring a negative b incorrectly: (−3)² is 9, not −9.
  • Dividing only part of the top by 2a. The whole expression −b ± √D goes over 2a.
Try it: Quadratic Equation SolverSolve ax² + bx + c = 0 with the discriminant, real or complex roots, factored form and vertexOpen →

Frequently asked questions

What if a = 0?

Then the equation is linear, not quadratic. Solve bx + c = 0 directly: x = −c / b.

Can the roots be fractions?

Yes. 2x² + 3x − 2 = 0 has the root x = 1/2.

Why is it called the discriminant?

Because it discriminates between the three cases: two real roots, one repeated root, or complex roots.

Keep learning

More guides