Quadratic Roots Calculator

Solve ax² + bx + c = 0 with the quadratic formula: see the discriminant and both real roots, or learn when the roots are complex.

Calculator

Discriminant1
x13
x22

Method and variables

Quadratic Roots Calculator

Formula: x = (-b +/- sqrt(b^2 - 4ac)) / 2a

Assumption: The coefficient a cannot be zero.

Worked example

Quadratic Roots Calculator

For x^2 - 5x + 6 = 0, the roots are 2 and 3.

What the discriminant tells you

Equationa, b, cDiscriminant b² − 4acRoots
x² − 5x + 6 = 01, −5, 612 and 3
x² − 6x + 9 = 01, −6, 903 (double root)
2x² + 3x − 2 = 02, 3, −2250.5 and −2
x² + 2x + 5 = 01, 2, 5−16no real roots (−1 ± 2i)

A positive discriminant gives two real roots, zero gives one repeated root and a negative value gives two complex roots. You can check any answer by substituting it back: for 2x² + 3x − 2 with x = 0.5, 2 × 0.25 + 1.5 − 2 = 0. When b is very large compared with a and c, the formula can lose precision on a calculator; computing one root as c / (a × other root) avoids that.

Common mistakes

  • Dropping the sign of b: in x² − 5x + 6, b is −5, so −b is +5.
  • Dividing only the square-root term by 2a: the whole numerator, −b ± √(b² − 4ac), is divided by 2a.

Important limits