Quadratic Equation Solver

Solve ax^2 + bx + c = 0. Gives real or complex roots, the discriminant and the vertex.

How it works

Enter a, b and c from ax^2 + bx + c = 0. The tool computes the discriminant D = b^2 - 4ac. If D is positive there are two real roots, if zero one repeated root, if negative two complex roots. It also gives the vertex of the parabola, the sum and product of the roots, and the factored form when the roots are whole numbers.

A stable formula is used, so very large or very small coefficients keep their accuracy.

The formula

x = (-b plus or minus square root of (b^2 - 4ac)) / (2a)

Worked example

x^2 - 5x + 6 = 0: D = 25 - 24 = 1, roots x = (5 plus or minus 1) / 2 = 3 and 2. Sum of roots 5, product 6, factored form (x - 2)(x - 3).

Good to know

Common questions

What does a negative discriminant mean?
No real roots. The parabola does not cross the x-axis. The roots are complex numbers.
How do I solve by factoring?
Find two numbers that multiply to c and add to b (when a is 1).
Can I enter decimals or fractions?
Decimals yes. For a fraction, type its decimal value.

More in Utilities.