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
| Equation | a, b, c | Discriminant b² − 4ac | Roots |
|---|---|---|---|
| x² − 5x + 6 = 0 | 1, −5, 6 | 1 | 2 and 3 |
| x² − 6x + 9 = 0 | 1, −6, 9 | 0 | 3 (double root) |
| 2x² + 3x − 2 = 0 | 2, 3, −2 | 25 | 0.5 and −2 |
| x² + 2x + 5 = 0 | 1, 2, 5 | −16 | no 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.