Quadratic Formula Calculator

Enter a, b and c. Get the roots, exact and in decimals, with every step.

How it works

The formula is x = (−b ± √(b² − 4ac)) / 2a. The part under the root, the discriminant, tells you what to expect: positive means two real roots, zero means one, negative means none. This calculator also handles fractions and decimals, gives complex roots when there are no real ones, and shows the vertex of the parabola.

Example

Solve 2x² − 3x − 5 = 0.

x = 5/2 ≈ 2.5 or x = −1

Factored
(2x − 5)(x + 1)
Vertex
(3/4, −49/8)

Steps

  1. Read off the coefficients of 2x2 − 3x − 5 = 0: a = 2, b = −3, c = −5.
  2. Discriminant: b² − 4ac = (−3)² − 4·2·(−5) = 49.
  3. Quadratic formula: x = (3 ± √49) / 4.
  4. √49 = 7, so x = (3 + 7) / 4 = 5/2 or x = (3 − 7) / 4 = −1.

More examples

Solve x² + 2x + 5 = 0.

x = −1 ± 2i

No real roots
The parabola never crosses the x-axis.
Vertex
(−1, 4)

Steps

  1. Read off the coefficients of x2 + 2x + 5 = 0: a = 1, b = 2, c = 5.
  2. Discriminant: b² − 4ac = 2² − 4·1·5 = −16.
  3. Quadratic formula: x = (−2 ± √(−16)) / 2.
  4. The discriminant is negative, so there are no real roots. √(−16) = 4i.
  5. Simplify: x = −1 ± 2i.

Solve x² − 6x + 9 = 0.

x = 3

Factored
(x − 3)²
Vertex
(3, 0)

Steps

  1. Read off the coefficients of x2 − 6x + 9 = 0: a = 1, b = −6, c = 9.
  2. Discriminant: b² − 4ac = (−6)² − 4·1·9 = 0.
  3. The discriminant is 0, so there is one repeated root: x = −b / 2a = 6 / 2 = 3.

Common mistake

Move everything to one side before reading off a, b and c. In x² = 3x − 2, the values are a = 1, b = −3 and c = 2.

Questions

When should I use the formula instead of factoring?

Factoring is faster when the roots are whole numbers or simple fractions. The formula always works, including roots like (3 ± √7)/2 that no factoring will find.

Why are there two answers?

A parabola can cross the x-axis twice, and the ± gives both crossings. When the discriminant is 0, both are the same point.

Can a be 0?

No. With a = 0 there is no x² term, so the equation is linear. Solve bx + c = 0 instead.

Keep going