Wittlo
TodaySign in

← All calculators

Quadratic equation solver

Enter the coefficients a, b and c of ax² + bx + c = 0. You get the roots (real or complex), the discriminant, the vertex of the parabola and the working.

Worked example

With the values shown above when the page opens:

x = 2 or x = 3

  1. Equation: x² − 5x + 6 = 0
  2. Discriminant D = b² − 4ac = -5² − 4 × 1 × 6 = 1
  3. D > 0, so there are two real roots: x = (−b ± √D) ÷ 2a
  4. √D = 1
  5. x = 2 or 3

How it works

  • The quadratic formula gives the roots of ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ 2a.
  • The part under the root, D = b² − 4ac, is the discriminant. If D is positive there are two real roots, if zero one repeated root, and if negative two complex roots.
  • The roots add up to −b/a and multiply to c/a, which is a quick way to check your answer.
  • The vertex of the parabola is at x = −b ÷ 2a.

Questions

What if a is zero?

Then it is not quadratic. The equation becomes bx + c = 0 and has the single solution x = −c/b.

What are complex roots?

When the discriminant is negative there is no real square root, so the roots involve i, where i² = −1. The graph then never crosses the x-axis.

How can I factor instead of using the formula?

Look for two numbers that multiply to ac and add to b. For x² − 5x + 6, the numbers are −2 and −3, giving (x − 2)(x − 3).

Related

Calculators are for learning and quick checks. Check important figures yourself, and do not rely on them for tax, legal or financial decisions.