Life Calculator

Quadratic Equation Solver

Enter a, b and c from ax² + bx + c = 0 and get the roots, plus everything the discriminant tells you before you solve.

Last reviewed: Written and checked by the Life Calculator editorial team

The quadratic formula

For any equation of the form ax² + bx + c = 0 where a ≠ 0:

x = (−b ± √(b² − 4ac)) ÷ 2a

The formula comes from completing the square on the general equation, which is worth doing once by hand because it explains every part of it. The −b/2a is the axis of symmetry; the square root term is the distance from that axis out to each root.

Worked example for x² − 3x − 10 = 0: the discriminant is 9 + 40 = 49, and √49 = 7. So x = (3 ± 7) ÷ 2, giving x = 5 and x = −2. Check by factorising: (x − 5)(x + 2) = 0.

What the discriminant tells you

The expression under the square root, b² − 4ac, determines the nature of the roots before you compute them:

DiscriminantRootsGraph
PositiveTwo distinct real rootsCrosses the x-axis twice
ZeroOne repeated real rootTouches the x-axis once
NegativeTwo complex conjugate rootsNever meets the x-axis

A positive discriminant that is also a perfect square means the roots are rational and the quadratic factorises neatly over the integers — useful to know before attempting to factorise by inspection.

Vertex, symmetry and practical uses

Every quadratic graphs as a parabola. Its turning point sits at:

x = −b ÷ 2a y = a(−b/2a)² + b(−b/2a) + c

If a is positive the parabola opens upwards and the vertex is a minimum; if negative, it opens downwards and the vertex is a maximum. This is why quadratics appear wherever something is being optimised: the revenue-maximising price, the launch angle giving maximum range, the dimensions giving the largest area for a fixed perimeter.

Two useful checks from Vieta's formulas: the roots always sum to −b/a and multiply to c/a. If your answers fail either, you have made an arithmetic slip.

Frequently asked questions

What if a is zero?

Then the x² term vanishes and it is a linear equation, bx + c = 0, with the single solution x = −c/b. The quadratic formula breaks down because it divides by 2a.

What are complex roots used for?

A great deal. In electrical engineering they describe oscillating circuits; in control theory they indicate an oscillatory response; in signal processing they underpin the Fourier transform. A negative discriminant is not a failure — it tells you the system oscillates rather than settling.

Should I factorise instead?

If it factorises easily, yes — it is faster and less error-prone. Try factorising when a is 1 and you can find two numbers multiplying to c and summing to b. When that search takes more than a few seconds, the formula always works.