CalcWise All calculators

Shapes and algebra

Quadratic equation solver

Type the three numbers a, b and c from your equation ax² + bx + c = 0. If a term is missing, its number is 0.

Press Calculate to see the answer and every step of the working.

How it works

A quadratic equation has an x² term, which is why its graph is a U-shaped curve called a parabola. "Solving" it means finding where that curve crosses the x-axis.

The first thing to check is the discriminant, b² - 4ac. If it is positive, the curve crosses the axis twice and there are two answers. If it is zero, the curve just touches the axis once. If it is negative, the curve never reaches the axis, so there are no real answers, only complex ones that use i, the square root of -1.

The quadratic formula always works, even when the equation will not factor neatly. The calculator also gives the vertex, the curve's turning point.

The formula

  • x = (-b ± √(b² - 4ac)) ÷ 2a
  • Discriminant D = b² - 4ac
  • Vertex: x = -b ÷ 2a, then put that x back in to find y

Worked example

Solve x² - 5x + 6 = 0. Here a = 1, b = -5, c = 6. The discriminant is 25 - 24 = 1, which is positive, so there are two roots: x = (5 ± 1) ÷ 2, giving x = 3 and x = 2. You can check by factoring: (x - 2)(x - 3) = 0.

Now x² + 2x + 5 = 0. D = 4 - 20 = -16, so the roots are complex: -1 ± 2i. The vertex is at (-1, 4), above the axis, which is why the curve never crosses it.

Common questions

What if b or c is missing?

Use 0. For x² - 9 = 0, a = 1, b = 0 and c = -9, which gives x = 3 and x = -3.

Should I factor or use the formula?

Factor when the numbers are small and it is quick to spot two numbers that multiply to c and add to b. Use the formula otherwise. It never fails.

What does a negative a mean?

The parabola opens downward like a hill, so the vertex is the highest point instead of the lowest.