Quadratic Formula Calculator
Enter the coefficients of ax² + bx + c = 0 to get both roots and the full working.
The quadratic formula
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. Its solutions are x = (−b ± √(b² − 4ac)) ÷ 2a. The expression under the root, b² − 4ac, is the discriminant, and it decides what kind of roots you get.
Worked example
Solve x² − 5x + 6 = 0. Here a = 1, b = −5 and c = 6. The discriminant is (−5)² − 4(1)(6) = 25 − 24 = 1. The roots are x = (5 ± 1) ÷ 2, so x = 3 and x = 2. Check: 3² − 15 + 6 = 0.
Reading the discriminant
| Discriminant | Roots |
|---|---|
| Greater than 0 | Two different real roots |
| Equal to 0 | One repeated real root |
| Less than 0 | Two complex roots, a ± bi |
When to use another method
If the equation factors easily, such as x² − 5x + 6 = (x − 2)(x − 3), factoring is quicker. Completing the square is the method that produces the formula, and it also gives the vertex of the parabola. The quadratic formula works for every case, which is why it is the safe default.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a.
What does the discriminant tell you?
The discriminant is b² − 4ac. If it is positive there are two real roots, if it is zero there is one repeated root, and if it is negative there are two complex roots.
Can a equal zero?
No. If a is 0 the equation is linear, with the single solution x = −c ÷ b.
How can you check the roots?
Substitute each root back into ax² + bx + c. The result should be zero, allowing for rounding.
More Algebra calculators
Browse every algebra calculator.