How to use the quadratic equation solver
- Type the equation, for example 2x^2 + 3x - 4 = 0. Terms can be on either side of the equals sign.
- Press Solve. The solver computes the discriminant and picks factoring or the quadratic formula.
- Read both roots, open the steps, and look at the parabola to see where it meets the x-axis.
What is a quadratic equation?
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. Its graph is a parabola, and the solutions are the x-values where that parabola meets the x-axis. There can be two, one or none of them in the real numbers.
Three ways to solve it
This solver tries factoring first, because it is the clearest to read, and falls back to the formula when the equation does not factor over the integers.
- Factoring: fastest when the numbers are small and the roots are whole numbers.
- The quadratic formula: always works. x = (−b ± √(b² − 4ac)) / 2a.
- Completing the square: useful for finding the vertex form of the parabola.
The discriminant tells you what to expect
| Discriminant b² − 4ac | Roots | Parabola |
|---|---|---|
| Positive | Two different real roots | Crosses the x-axis twice |
| Zero | One repeated real root | Touches the x-axis at its vertex |
| Negative | Two complex roots | Never reaches the x-axis |
Example: a repeated root
Solve x² − 6x + 9 = 0
- The discriminant is (−6)² − 4·1·9 = 36 − 36 = 0, so there is one repeated root.
- Recognise a perfect square: x² − 6x + 9 = (x − 3)².
- Set (x − 3)² = 0, so x = 3.
Answer: x = 3 (double root)
Example: complex roots
Solve x² + 2x + 5 = 0
- Discriminant: 2² − 4·1·5 = 4 − 20 = −16.
- Since √(−16) = 4i, the formula gives x = (−2 ± 4i) / 2.
- Simplify: x = −1 ± 2i.
Answer: x = −1 + 2i and x = −1 − 2i
Sum and product of roots
For ax² + bx + c = 0 the two roots add up to −b/a and multiply to c/a. It is a quick way to check an answer: for x² − 5x + 6 = 0 the roots 2 and 3 sum to 5 and multiply to 6, exactly as −b/a and c/a predict.
Frequently asked questions
What if a = 0?
Then the equation is linear, not quadratic. Use the linear equation solver or the general equation solver.
Why does the solver sometimes give decimals?
When the roots are irrational, such as (−3 ± √41)/4, the exact form is shown with a decimal approximation next to it.