Two real roots
For x² − 5x + 6 = 0, the discriminant is 1 and the roots are (5 ± 1) / 2, so x = 3 or x = 2.
Values stay on your device
Solve a quadratic equation
Enter the coefficients a, b, and c to find the roots and see what the discriminant says about the solution.
Calculated in your browser
Formula and steps included
No account. No signup.
Formula
For ax² + bx + c = 0 and a ≠ 0: x = (−b ± √(b² − 4ac)) / (2a)
The quadratic formula solves every equation in standard quadratic form when a is nonzero. The plus-or-minus symbol produces up to two roots.
The discriminant b² − 4ac determines the root type. A positive discriminant gives two distinct real roots, zero gives one repeated real root, and a negative value gives two complex conjugate roots.
Move all terms to one side and identify a, b, and c from ax² + bx + c = 0.
Evaluate b² − 4ac before taking the square root.
Use both the plus and minus cases and divide the complete numerator by 2a.
Substitute each root into the original equation; rounding may make an approximate check slightly different from zero.
Worked examples
For x² − 5x + 6 = 0, the discriminant is 1 and the roots are (5 ± 1) / 2, so x = 3 or x = 2.
For 2x² + 4x + 5 = 0, the discriminant is −24 and the roots are x = −1 ± (√6 / 2)i.
Common questions
It tells you how many roots exist in the real numbers: two when positive, one repeated root when zero, and none when negative. A negative discriminant gives two complex roots.
No. If a is zero, the x² term disappears and the equation is linear or constant, so the quadratic formula does not apply.
A quadratic can cross the x-axis at two points. Evaluating both signs finds both roots when they are distinct.
Your coefficients are not saved by default or uploaded. You can opt into Remember on this device or download a local JSON backup.