Quadratic Equation Solver
Solve quadratic equations ax² + bx + c = 0 using the quadratic formula. Shows real and complex roots.
ax² + bx + c = 0
Try Examples
About this calculator
Solve ax² + bx + c = 0 for real or complex roots. Enter the three coefficients, or tap an example such as x² − 5x + 6 = 0, and the solver shows the discriminant, both roots, and the sum and product of roots.
Quick example buttons cover the main cases: two real roots, difference of squares, a perfect square with a repeated root, and a complex pair.
How to use it
- Enter a, b and c.
- Press Solve, or use an example button.
- Read the discriminant and roots.
Quadratic formula
For ax² + bx + c = 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant Δ = b² − 4ac decides the type: Δ > 0 gives two real roots, Δ = 0 one repeated root, Δ < 0 two complex roots. The sum of roots is −b/a and the product is c/a. The vertex is at x = −b ÷ 2a.
Worked example
x² − 5x + 6 = 0
| Discriminant | 25 − 24 = 1 |
| Roots | x₁ = 3, x₂ = 2 |
| Sum / Product | 5 / 6 |
| Vertex | (2.5, −0.25) |
Other cases: x² − 2x + 1 = 0 has a repeated root 1, and x² + 1 = 0 has complex roots ±i.
Tips and common mistakes
- If Δ is a perfect square, the roots are rational and the equation factorises.
- Check roots by substituting them back.
- If a = 0 the equation is linear, not quadratic.
- Divide through by a common factor first to keep numbers small.
- The graph is a parabola; real roots are where it crosses the x-axis.
Frequently asked questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) ÷ 2a.
What is the discriminant?
b² − 4ac, which tells you the number and type of roots.
What if the discriminant is negative?
The roots are complex and come as a conjugate pair.
How do I find the vertex?
x = −b/2a, then substitute to find y.
What do the roots mean on a graph?
The x-values where the parabola crosses the x-axis.
Can a be zero?
No. The equation would not be quadratic.