=Calculator Hub

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.

Root x₁2
Root x₂1
Discriminant (b² − 4ac)1

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

For x² − 3x + 2 = 0: D = 9 − 8 = 1 > 0, so x = (3 ± 1)/2, giving x₁ = 2 and x₂ = 1. Check by factoring: (x − 1)(x − 2) = 0.

What the discriminant tells you

DiscriminantRootsParabola & x-axis
D > 0Two distinct real rootsCrosses the axis twice
D = 0One repeated real rootTouches the axis at the vertex
D < 0Complex conjugate pairNever 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.

Frequently asked questions

What if a is zero?
Then there is no x² term and the equation is linear: bx + c = 0 with the single root x = −c/b. The solver handles this automatically.
What are complex roots?
When the discriminant is negative, no real number squared can produce it, so the roots involve i = √−1. They come as a conjugate pair of the form p ± qi, and the parabola never crosses the x-axis.
How do I check my roots are right?
Substitute them back into ax² + bx + c, or use Vieta's formulas: the sum of the roots must equal −b/a and their product c/a.
Why does D = 0 give only one root?
The ± in the formula adds and subtracts √D. When D = 0 both signs give the same value, x = −b/2a — a repeated (double) root where the parabola just touches the axis.
This tool is provided for general information only. Verify important figures independently. · Last reviewed: August 25, 2026