Quadratic Equation Solver

This calculator solves quadratic equations for students and anyone who needs the real or complex roots without doing the algebra by hand.

The interactive quadratic equation solver loads right here. If it hasn't appeared, refresh the page.

Write the equation in the form ax² + bx + c = 0, then enter a, b, and c. The value of a cannot be zero, since that would make the equation linear.

The roots are x = (-b ± square root of (b² - 4ac)) / (2a). The value b² - 4ac is the discriminant: positive gives two real roots, zero gives one repeated real root, and negative gives two complex roots.

Worked example

For x² - 5x + 6 = 0, enter a = 1, b = -5, and c = 6. The formula gives x = 2 and x = 3.

Common questions

What if the discriminant is negative?

The equation has no real roots. It has two complex roots containing the imaginary unit i.

Can a be zero?

No. If a is zero, the x² term disappears and the equation should be solved as a linear equation.

Related math tools

More from DoesWhat: free calculators · emoji meanings · quick answers · the DoesWhat blog