Quadratic Equation Solver (ax² + bx + c = 0)

Enter a, b and c to get the roots, the discriminant and the vertex, with every step shown.

Quadratic Equation Solver

Your result will appear hereFill in the fields and press “Solve”.

Formula

  • x = (−b ± √(b² − 4ac)) ÷ 2a
  • discriminant D = b² − 4ac
  • vertex = (−b ÷ 2a, f(−b ÷ 2a))
  • D > 0: two different real roots
  • D = 0: one repeated real root
  • D < 0: two complex roots (no real roots)

The discriminant tells you how many real roots there are; the quadratic formula finds them.

Worked examples

x² − 5x + 6 = 0

a (coefficient of x²)
1
b (coefficient of x)
−5
c (constant)
6

Roots

x₁ = 2, x₂ = 3

Nature of roots: Two distinct real roots

Exact form: x = 3 or x = 2

Discriminant (b² − 4ac): 1

x² + 2x + 5 = 0 (complex roots)

a (coefficient of x²)
1
b (coefficient of x)
2
c (constant)
5

Roots

x = −1 ± 2i

Nature of roots: Two complex conjugate roots (no real roots)

Discriminant (b² − 4ac): −16

Vertex: (−1, 4)

How it works

A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. The quadratic formula gives its roots, and the part under the square root, D = b² − 4ac, decides their nature: positive means two real roots, zero means one repeated root and negative means the roots are complex numbers and the graph never crosses the x-axis.

For x² − 5x + 6 = 0 the discriminant is 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving 2 and 3, and the equation factors as (x − 2)(x − 3). When the coefficients are whole numbers the calculator also shows the exact form, for example (−3 ± √5) ÷ 2, because decimals hide that structure. The roots are computed in a way that avoids losing precision when b is much larger than the others.

The vertex is the turning point of the parabola y = ax² + bx + c. If a = 0 the equation is not quadratic — use the Linear Equation Solver. To check a result by plugging it back in, or to work with powers and roots on their own, see the Exponent Calculator and Square Root Calculator.

Assumptions and limits

  • Coefficients are real numbers. Complex roots are shown in the form p ± qi.
  • a must not be zero.

Common questions

What does a negative discriminant mean?
The equation has no real solutions. It has two complex conjugate roots, and the parabola does not touch the x-axis.