Quadratic Equation Solver

Free quadratic equation solver. Solve any quadratic equation ax² + bx + c = 0, showing the discriminant, the nature of the roots, and the roots (real or complex).

AI-ready Use this tool with AI

This tool has a free JSON API. Copy a prompt or skill below to use it with ChatGPT, Claude, or any AI agent — no API key needed.

API docs
Enter a, b, and c above.

How quadratic equation solver works

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. Its solutions come from the quadratic formula x = (−b ± √(b² − 4ac)) / 2a. The expression under the square root, b² − 4ac, is called the discriminant and it tells you the nature of the roots before you solve.

If the discriminant is positive the equation has two distinct real roots. If it is zero the two roots coincide into one repeated real root. If it is negative the roots are complex conjugates, written as p ± qi where i is the imaginary unit. This solver reports the discriminant, classifies the roots, and lists them in exact rounded form.

Enter the coefficients a, b, and c. The calculator applies the quadratic formula and returns the roots and the discriminant. It rejects a = 0 because that would make the equation linear rather than quadratic. Use it for algebra homework, physics problems, and any model involving a squared term.

Frequently asked questions

What is the quadratic formula?
x = (−b ± √(b² − 4ac)) / 2a. Plug in the coefficients a, b, and c from ax² + bx + c = 0 to get the two roots. The ± gives both solutions.
What does the discriminant tell me?
The discriminant is b² − 4ac. Positive means two distinct real roots, zero means one repeated real root, and negative means two complex (non-real) roots. This solver computes and labels it for you.
What happens when a = 0?
The equation is no longer quadratic — it becomes the linear equation bx + c = 0 with the single root x = −c/b. This solver requires a non-zero a and tells you so.
Can the roots be complex?
Yes. When the discriminant is negative the square root is imaginary, so the roots are complex conjugates p ± qi. The solver returns them in that form with i representing the imaginary unit.