Scientific

Quadratic Equation Calculator

Solve ax² + bx + c = 0 for x using the quadratic formula, including complex roots when the discriminant is negative.

The quadratic formula

x = (−b ± √(b² − 4ac)) ÷ 2a. The expression under the square root, b² − 4ac, is called the discriminant — its sign tells you what kind of roots the equation has before you even finish solving.

What the discriminant tells you

  • Discriminant > 0 — two distinct real roots
  • Discriminant = 0 — exactly one repeated real root
  • Discriminant < 0 — two complex roots (no real solutions)

Worked example

For x² − 3x + 2 = 0 (a=1, b=−3, c=2): the discriminant is (−3)² − 4×1×2 = 9 − 8 = 1, which is positive, so there are two real roots: x = (3 ± 1) ÷ 2, giving x₁ = 2 and x₂ = 1.

Frequently asked questions

What does a complex root actually mean?

It means the equation has no solution among real numbers — the parabola described by ax² + bx + c never crosses the x-axis. Complex roots come in a pair like p + qi and p − qi, where i is the imaginary unit (√−1).

Why can't 'a' be zero?

If a = 0, the x² term disappears and the equation becomes linear (bx + c = 0), which has a different, simpler solution method — a single root, x = −c/b — rather than the quadratic formula.

Related calculators