Quadratic equation solver with the discriminant shown
Enter any quadratic and get both roots, the discriminant that predicted them, the factored form when the roots are rational, and a substitution check, rather than a bare pair of numbers.
Part of SolveStep's algebra solver. For equations with no x² term, use the equation solver.
Every quadratic, in whatever form you have it
A quadratic is any equation where the highest power of x is 2. The solver first rearranges whatever you type into the standard form ax² + bx + c = 0, collecting terms from both sides and expanding brackets on the way, because the quadratic formula only applies once the equation is in that shape.
Then it computes the discriminant, Δ = b² − 4ac. This is the part most step-by-step tools skip straight past, and it is the single most useful number in the problem: its sign tells you how many real solutions exist before you calculate any of them.
Two distinct real roots
Δ > 0
The parabola crosses the x-axis twice. Both roots are returned, and if Δ is a perfect square they are rational, so the factored form is shown too.
One repeated root
Δ = 0
The parabola touches the x-axis at exactly one point. It is reported as a single value, which is a common place for solvers to print the same number twice instead.
Complex roots
Δ < 0
No real solution; the parabola never crosses the axis. The complex pair is given in a ± bi form.
Not in standard form yet
3(x + 2) = x² − 4
Brackets are expanded and terms collected from both sides before a, b and c are identified.
Two quadratics, solved in full
A factorable quadratic
x² − 5x + 6 = 0- Identify the coefficients in standard form: a = 1, b = −5, c = 6.
- Compute the discriminant: Δ = (−5)² − 4(1)(6) = 25 − 24 = 1. It is positive and a perfect square, so expect two rational roots.
- Apply the quadratic formula: x = (5 ± 1) / 2.
- Because the roots are rational, the factored form (x − 3)(x − 2) exists, and that is often faster to spot by eye next time.
- Check by substituting both values back into the original equation.
A repeated root
x² − 6x + 9 = 0- Coefficients: a = 1, b = −6, c = 9.
- Discriminant: Δ = 36 − 36 = 0. Exactly one real root, so the parabola touches the axis rather than crossing it.
- The formula collapses to x = −b / 2a = 6 / 2.
- The factored form is a perfect square: (x − 3)².
Quadratic equation FAQ
What is the discriminant and why does it matter?
The discriminant is b² − 4ac, the part of the quadratic formula under the square root. Its sign tells you the number of real solutions before you do any further work: positive means two, zero means one repeated root, negative means none (a complex pair instead).
Does it factor the quadratic as well as solve it?
When the roots are rational, yes. The factored form is shown alongside the formula solution. When they are irrational or complex, no integer factorisation exists, so only the roots are given.
Do I have to rearrange into ax² + bx + c = 0 first?
No. Type the equation however you have it. Brackets are expanded and terms are collected from both sides automatically before the coefficients are identified.
Why does x² − 6x + 9 = 0 give only one answer?
Because it genuinely has one. The discriminant is zero, so both branches of the ± give the same value. Reporting it twice would be wrong, even though many calculators do.
Can it handle quadratics with no real solution?
Yes. When the discriminant is negative the roots are complex, and they are returned in a ± bi form rather than the solver simply reporting failure.
Is completing the square supported?
The solution path shown uses the discriminant and the quadratic formula, which works for every quadratic. Completing the square reaches the same roots by a different route; the factored form shown for rational roots is the most useful part of that method in practice.