Math · Algebra Formula verified

Quadratic Formula Calculator

Enter the three coefficients a, b and c to solve ax² + bx + c = 0. Get both real roots, or the complex pair when the parabola never crosses the x-axis, plus the vertex.

ax² + bx + c = 0
-20020
-20020
-20020
On-screen number pad
Tap to type into the highlighted field
Roots
x = 3, 2
x² − 5x + 6 = 0
Discriminant
1
Vertex
(2.5, −0.25)

Step-by-step proofCheck by hand

How the quadratic formula works

Any equation of the form ax² + bx + c = 0 (with a not zero) can be solved directly with the quadratic formula, which comes from completing the square on the general equation. The discriminant, the part under the square root, decides how many real roots there are before the rest of the formula is even evaluated: positive gives two real roots, zero gives one (a repeated root), and negative gives no real roots — the parabola never touches the x-axis, and the two roots form a complex-conjugate pair instead.

The formula

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

Worked example

x² − 5x + 6 = 0: discriminant = (−5)² − 4(1)(6) = 25 − 24 = 1, so x = (5 ± 1) / 2, giving x = 3 and x = 2.

Frequently asked questions

What does the discriminant tell you?
The discriminant, b² − 4ac, decides how many real roots the equation has before you even solve it. A positive discriminant means two distinct real roots; zero means exactly one real root, where the parabola just touches the x-axis; a negative discriminant means the parabola never crosses the x-axis at all, and the two roots are a complex-conjugate pair.
What if a is zero?
If a is zero, the ax² term disappears and the equation is linear, not quadratic — bx + c = 0, solved by x = −c/b instead. The quadratic formula divides by 2a, so it's undefined at a = 0; this calculator requires a nonzero value for a.
How is the vertex related to the roots?
The vertex sits exactly halfway between the two real roots, on the parabola's axis of symmetry, x = −b/2a — the same x-value the quadratic formula's ± splits around. When the roots are complex, the vertex is still real and still marks the parabola's minimum or maximum point; it's just that the curve never reaches y = 0.
Sources and method
  • Standard quadratic formula and discriminant — general published mathematics.
Last reviewed: 20 Sep 2026 Sources last verified: 20 Sep 2026 Results use the assumptions explained on this page. Report an error How we check calculations

Related calculators