Skip to main content

Quadratic equation

Solve the equation ax² + bx + c = 0.

ax² + bx + c = 0

Enter value for 'a' and other coefficients.

Solving a quadratic, and what the discriminant tells you first

Every quadratic equation ax² + bx + c = 0 is solved by the same formula. Before applying it, the discriminant tells you how many real solutions exist — which is often the only thing you actually needed to know.

How it works

  • Computes the discriminant b² − 4ac to determine how many real roots there are.
  • Applies the quadratic formula to find them, when they exist.
  • Reports the vertex, which is where the parabola turns and therefore where the minimum or maximum sits.
x = (−b ± √(b² − 4ac)) / 2a

discriminant Δ = b² − 4ac
  Δ > 0   two distinct real roots
  Δ = 0   one repeated root
  Δ < 0   no real roots (two complex ones)

vertex at x = −b / 2a

Worked example

Solving 3x² − 7x + 2 = 0, where a = 3, b = −7, c = 2.

  1. Δ = (−7)² − 4(3)(2) = 49 − 24 = 25
  2. Δ > 0 and 25 is a perfect square, so expect two tidy roots
  3. √25 = 5
  4. x = (7 + 5) / 6 = 2
  5. x = (7 − 5) / 6 = 1/3

Roots at x = 2 and x = 1/3. Substitute back to check: 3(4) − 7(2) + 2 = 0 ✓ and 3(1/9) − 7(1/3) + 2 = 1/3 − 7/3 + 2 = 0 ✓.

Reading the result

  • Check the discriminant before doing anything else. If it is negative there are no real roots and the parabola never crosses the x-axis — worth knowing before you spend effort on the formula.
  • The sign of b trips people up constantly. In 3x² − 7x + 2, b is −7, so −b is +7. Writing the substitution out explicitly rather than doing it mentally prevents most sign errors.
  • If a = 0 this is not a quadratic at all; it is the linear equation bx + c = 0 with the single solution x = −c/b. A calculator that silently divides by 2a would produce a division by zero.
  • Factorising is faster when the roots are rational, but only the formula always works. If the discriminant is not a perfect square, factorisation over the integers is impossible and the formula is the only route.

Common questions

What does it mean when the discriminant is negative?
The equation has no real solutions — the parabola sits entirely above or below the x-axis. There are still two complex roots involving √−1, which matter in engineering and physics but not in most everyday problems.
Why does the vertex sit at −b/2a?
The two roots are symmetric about that point, since the formula adds and subtracts the same square root from −b/2a. Even when there are no real roots the parabola still turns there, which is how you find a maximum or minimum without calculus.