Enter a, b and c to find the roots of a quadratic equation — including complex roots when needed.
How the quadratic formula calculator works
This calculator solves any quadratic equation ax² + bx + c = 0 using the quadratic formula. Enter the three coefficients and it returns the discriminant and both roots.
If the discriminant is negative, it gives the complex roots rather than failing.
Try it with these numbers
On the values this calculator opens with, the roots is x = 2, 1. Underneath, Discriminant comes out at 1 and Root 1 at 2. Change any field and every figure updates as you type.
Step by step
- Enter coefficient a (the x² term).
- Enter b and c.
- Read the discriminant and the two roots.
Formula reference
discriminant = b² − 4ac
x = (−b ± √discriminant) ÷ 2a
Common questions
What is the discriminant?
The part under the square root, b² − 4ac. Positive gives two real roots, zero gives one, negative gives two complex roots.
What if a = 0?
Then it isn’t quadratic — it’s linear. The tool solves the linear case bx + c = 0 instead.
Can it give complex roots?
Yes — when the discriminant is negative, it returns roots in the form p ± qi.