Quadratic Equation Solver
Enter the coefficients a, b and c of ax² + bx + c = 0 and get the roots instantly — real roots when they exist, the complex pair when they don't, plus the discriminant that tells you which case you are in.
How this calculation works
The quadratic formula gives both roots directly: x = (−b ± √(b² − 4ac)) ÷ 2a.
The discriminant D = b² − 4ac decides the nature of the roots: D > 0 gives two distinct real roots, D = 0 one repeated real root, and D < 0 a pair of complex conjugate roots.
If a = 0 the equation is not quadratic but linear (bx + c = 0), and the solver returns its single root x = −c/b.
Worked example
What the discriminant tells you
| Discriminant | Roots | Parabola & x-axis |
|---|---|---|
| D > 0 | Two distinct real roots | Crosses the axis twice |
| D = 0 | One repeated real root | Touches the axis at the vertex |
| D < 0 | Complex conjugate pair | Never touches the axis |
Three ways to solve a quadratic
Factoring is fastest when the roots are neat integers: x² − 3x + 2 factors as (x − 1)(x − 2). Completing the square rewrites the equation as (x + b/2a)² = … and is how the quadratic formula is derived. The formula itself always works, whatever the coefficients — that is what this solver uses.
Two handy checks from Vieta's formulas: the roots add up to −b/a and multiply to c/a. If your computed roots fail either, something went wrong.
Where quadratics show up
Projectile motion (height vs time is a parabola), profit maximisation in business, areas and optimisation problems, braking distances, and the shape of satellite dishes and headlights are all governed by quadratic equations — which is why the formula is one of the most-used results in school mathematics.