About the Quadratic Equation Solver
This quadratic equation solver finds the roots of any equation in the form ax² + bx + c = 0. Enter the three coefficients and it reports the discriminant along with two real roots, one repeated root, or a pair of complex roots. It is meant for algebra and precalculus students checking homework, and for anyone who needs the roots of a parabola quickly.
How it works
The solver first computes the discriminant, D = b² - 4ac. If D is positive, it applies the quadratic formula x = (-b ± √D) / 2a to get two different real roots, rounded to 8 decimal places. If D is zero, both roots coincide at x = -b / 2a. If D is negative, there are no real roots, so the solver returns the complex pair -b/2a ± (√-D / 2a)i, rounded to 3 decimal places.
When a is 0, the x² term disappears and the equation becomes linear: bx + c = 0, so x = -c / b. If b is also 0, what's left is just c = 0. That is true for every x when c is 0 (infinitely many solutions) and never true otherwise (no solution). The answer updates as soon as you change any coefficient.
How to use
- 1
Rearrange your equation so one side is 0, in the form ax² + bx + c = 0.
- 2
Enter the coefficients in the a, b, and c fields, including minus signs.
- 3
Read the discriminant and the roots x₁ and x₂ in the result box.
- 4
Change any value to solve a new equation instantly.
Worked examples
Two real roots
The default equation x² - 3x + 2 = 0.
It factors as (x - 2)(x - 1) = 0.
Repeated root
A perfect square, x² - 6x + 9 = 0.
Complex roots
A parabola that never crosses the x-axis, x² + 2x + 5 = 0.
Irrational roots
Solving x² = 2 as x² - 2 = 0.
Frequently asked questions
What does it mean if the roots are complex numbers?+
It means the equation has no real solutions, which happens when the discriminant, the value under the square root in the quadratic formula, is negative. Graphically, the parabola never touches the x-axis.
What is the discriminant used for?+
It determines the nature of the roots: two distinct real roots when it is positive, one repeated real root when it is zero, and a pair of complex roots when it is negative.
What happens if a is 0?+
The equation is no longer quadratic. The solver treats it as the linear equation bx + c = 0 and gives x = -c/b, or reports no solution or infinitely many solutions if b is also 0.
What is the quadratic formula?+
x = (-b ± √(b² - 4ac)) / 2a. It gives the roots of any quadratic equation ax² + bx + c = 0 with a not equal to 0.
Can I enter decimal or negative coefficients?+
Yes. Any real number works for a, b, and c, including decimals like 0.25 and negative values.