← All guides

How to solve a quadratic equation, step by step

The quadratic formula, what the discriminant tells you before you start, and two fully worked examples.

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. Every quadratic can be solved with one formula, and a single number, the discriminant, tells you what kind of answer to expect before you do any of the work.

1. Read off a, b and c

Move everything to one side so the other side is 0, then read the coefficients. For 2x² + 3x − 2 = 0, a = 2, b = 3 and c = −2. Keep the signs: a missing term means its coefficient is 0.

2. Check the discriminant

D = b² − 4ac
  • D > 0: two different real roots.
  • D = 0: one repeated real root.
  • D < 0: no real roots; the two roots are complex numbers.

Here D = 3² − 4 · 2 · (−2) = 9 + 16 = 25. It is positive, so expect two real roots. Because 25 is a perfect square, they will also be rational.

3. Apply the quadratic formula

x = (−b ± √D) / 2a

x = (−3 ± 5) / 4, which gives x = 0.5 and x = −2.

4. Check your answer

Substitute each root back in. For x = −2: 2 · 4 + 3 · (−2) − 2 = 8 − 6 − 2 = 0. ✓ For x = 0.5: 2 · 0.25 + 1.5 − 2 = 0. ✓ Two quick checks catch most sign mistakes.

A second example: when factoring is faster

For x² − 5x + 6 = 0, look for two numbers that multiply to 6 and add to −5: −2 and −3. So (x − 2)(x − 3) = 0 and the roots are 2 and 3. The formula gives the same result: D = 25 − 24 = 1, and x = (5 ± 1) / 2.

Common mistakes

  • Forgetting that −b flips the sign of b, so when b is negative, −b is positive.
  • Dividing only √D by 2a instead of the whole numerator.
  • Squaring a negative b incorrectly: (−5)² is 25, not −25.
Try it in Andulator

Solve → Quadratic equation

  1. Open Solve and choose Quadratic equation.
  2. Enter a, b and c from ax² + bx + c = 0.
  3. Tap Calculate to see both roots and the steps behind them.
Keep reading