Enter the coefficients a, b and c of ax² + bx + c = 0 to find its roots using the quadratic formula.
Result
This result is an estimate only. Double-check important figures before relying on them.
How it is calculated
Discriminant D = b² − 4ac
If D > 0: x = (−b + √D) ÷ 2a and x = (−b − √D) ÷ 2a
If D = 0: x = −b ÷ 2a (one repeated root)
If D < 0: x = −b ÷ 2a ± (√(−D) ÷ 2a) i
Results are rounded to 6 decimal places. For other maths, use the scientific calculator.
Worked example
x² − 3x + 2 = 0, so a = 1, b = −3, c = 2:
D = (−3)² − 4 × 1 × 2 = 9 − 8 = 1
x = (3 + 1) ÷ 2 = 2
x = (3 − 1) ÷ 2 = 1
x² + 2x + 5 = 0 has D = −16, so the roots are −1 + 2i and −1 − 2i.
Why your number may differ
Roots that go on forever, such as √2, are shown rounded. Very large or very small coefficients may lose precision because computers store numbers with limited digits.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a.
What does the discriminant tell me?
The discriminant is b² − 4ac. If it is positive there are two real roots, if it is 0 there is one repeated root, and if it is negative the roots are complex numbers.
What are complex roots?
When the discriminant is negative, the square root is of a negative number. The roots then have an imaginary part, written with i where i² = −1, and they come as a pair p + qi and p − qi.