Quadratic Formula Calculator

Enter a, b and c from ax² + bx + c = 0. The discriminant decides whether there are two real roots, one repeated root or two complex roots.

Also called: Quadratic equation solver · Quadratic solver

  • Last updated
  • Formula tested against reference values

Your numbers

Result

Solutions
—

Calculating…

Type of roots
—
Discriminant (b² − 4ac)
—
x₁
—
x₂
—
Vertex of y = ax² + bx + c
—

How to use this calculator

  1. Enter or choose a (coefficient of x²).
  2. Enter or choose b (coefficient of x).
  3. Enter or choose c (constant).
  4. The solutions updates as you type. Use Copy result or Share to keep it.

Method

x = (−b ± √(b² − 4ac)) ÷ 2a; Discriminant D = b² − 4ac; Vertex = (−b ÷ 2a, c − b² ÷ 4a)

a, b, c
the coefficients, with a ≠ 0
D
discriminant: > 0 two real roots, = 0 one repeated root, < 0 two complex roots

Worked example

  1. D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1.
  2. x = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2, so x = 3 or x = 2.
  3. Check: (x − 3)(x − 2) = x² − 5x + 6.

x² − 5x + 6 = 0 has two real solutions, x = 3 and x = 2.

What the result means

The real roots are where the parabola y = ax² + bx + c crosses the x-axis. Complex roots mean it never crosses; the vertex is then the closest it gets.

Assumptions and limits

  • Coefficients are real numbers and a is not 0.
  • Roots are shown to 10 significant digits. The calculator uses the numerically stable form of the formula, so a tiny root next to a huge one is still accurate.

Questions

What if a is 0?

Then there is no x² term and the equation is linear: bx + c = 0 gives x = −c ÷ b.

What does i mean in the answer?

i is the imaginary unit, √−1. A negative discriminant gives two complex roots p + qi and p − qi, which are conjugates of each other.