Skip to content
School

Quadratic Formula Calculator With Steps

This quadratic formula calculator solves ax² + bx + c = 0 step by step, including the discriminant, real or complex roots, and the parabola vertex.

Coefficient of x². Must not be zero. Fractions such as 1/2 are allowed.

Coefficient of x. Use 0 if there is no x term.

Constant term. Use 0 if there is no constant.

Solution

x² − 5x + 6 = 0

Discriminant
1 (1)
Root type
Two distinct real roots
x₁ exact
3
x₂ exact
2
x₁ decimal
3
x₂ decimal
2
Vertex
(5/2, −1/4)
Vertex decimal
(2.5, −0.25)
Parabola
Opens upward
  1. The equation is x² − 5x + 6 = 0, so a = 1, b = −5, and c = 6.
  2. Discriminant D = b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1.
  3. D is positive, so there are two distinct real roots.
  4. x = [−b ± √D] / (2a).
  5. The exact roots are 3 and 2. Decimals: 3 and 2.
  6. Vertex: x = −b / (2a) = 5/2 and y = −D / (4a) = −1/4, so the vertex is (5/2, −1/4), or (2.5, −0.25) as a decimal. The parabola opens upward.

Exact roots use simplified radicals. Decimals are rounded half up to 10 places. The algebra stays in your browser.

How to use

  1. Enter a, b, and c. Use 0 when a term is missing, and use a fraction such as 1/2 when you need one.
  2. a has to be nonzero. If a is 0, the equation is linear and this page will say so.
  3. Read the discriminant, whether the roots are real, repeated, or complex, and each root as an exact value and a decimal.
  4. Read the vertex and whether the parabola opens upward or downward. Clear empties a, b, and c.

Formula

For ax² + bx + c = 0 with a ≠ 0, the discriminant is D = b² − 4ac and the roots are x = [−b ± √D] / (2a). D > 0 gives two distinct real roots, D = 0 gives one repeated real root, and D < 0 gives complex conjugates written with i√|D|. The vertex is (−b / (2a), −D / (4a)). The parabola opens upward when a is positive and downward when a is negative.

Example. For x² − 5x + 6 = 0, a = 1, b = −5, and c = 6. D = (−5)² − 4(1)(6) = 1, so the exact roots are 3 and 2. The vertex is (5/2, −1/4), or (2.5, −0.25) as a decimal.

Example. x² + 1 = 0 has D = −4, so the roots are i and −i.

Example. x² − 2 = 0 has exact roots √2 and −√2, about 1.4142135624 and −1.4142135624.

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0, with a not equal to 0, the roots are x = [−b ± √(b² − 4ac)] / (2a). For x² − 5x + 6 = 0, that is [5 ± √1] / 2, so the roots are 3 and 2.

What does the discriminant tell you?

The discriminant is D = b² − 4ac. If D is positive, there are two distinct real roots. If D is 0, there is one repeated real root, as in x² + 2x + 1 = 0, where x = −1. If D is negative, the roots are complex.

Can the quadratic formula give complex roots?

Yes. When D is negative, √D is written as i√|D|. For x² + 1 = 0, D = −4 and the roots are i and −i. For x² − 2x + 5 = 0, the roots are 1 + 2i and 1 − 2i.

How do you find the vertex from a, b, and c?

The vertex of y = ax² + bx + c is (−b / (2a), −D / (4a)). For y = x² − 5x + 6, the vertex is (5/2, −1/4), or (2.5, −0.25). The parabola opens upward when a is positive and downward when a is negative.

When should I use the quadratic formula instead of factoring?

Factoring is quick when the polynomial splits into integers, such as (x − 3)(x − 2). The quadratic formula works for every a, b, and c, including fractions, irrational roots such as ±√2, and complex roots. Both describe the same equation when the roots are real.