Solve ax² + bx + c = 0 with step-by-step solution
Built & maintained by Pappu Venkata Subbi Reddy, founder of Clacify · Updated August 2026
The Quadratic Equation Solver finds the roots of any equation in the form ax² + bx + c = 0. Enter the three coefficients a, b, and c, and it shows the discriminant (b² − 4ac), classifies the roots as two distinct real roots, one repeated real root, or two complex (imaginary) roots, and computes them using the standard quadratic formula. It also correctly handles the edge case where a = 0, in which case the equation isn't quadratic at all — it's linear — and the tool solves bx + c = 0 for that single root instead of trying to force a quadratic formula onto an equation that no longer has an x² term.
The discriminant Δ = b² − 4ac is calculated first, and it determines which of three branches the solver takes. If Δ > 0, there are two distinct real roots: x = (−b ± √Δ) ÷ 2a, computed as x₁ with the + sign and x₂ with the − sign. If Δ = 0, the two roots coincide at a single repeated value: x = −b ÷ 2a. If Δ < 0, the roots are a complex-conjugate pair — the square root of a negative number isn't real, so the solver computes the real part as −b ÷ 2a and the imaginary part as √(−Δ) ÷ 2a, and displays both roots in the form "real ± imaginary·i" (e.g. "1.5000 + 2.3979i" and "1.5000 − 2.3979i") rather than throwing an error. Separately, if a = 0 the equation has no x² term and is really linear (bx + c = 0), so the solver switches formula entirely and returns x = −c ÷ b — or flags "no solution" if b is also 0 and c isn't, since 0 = c is then a contradiction for any x.
| Discriminant (b² − 4ac) | Root type | What it looks like graphically |
|---|---|---|
| Positive (Δ > 0) | Two distinct real roots | The parabola crosses the x-axis at two points |
| Zero (Δ = 0) | One repeated real root | The parabola just touches the x-axis at its vertex |
| Negative (Δ < 0) | Two complex conjugate roots | The parabola never touches the x-axis at all |
This is why the discriminant is worth checking first: its sign alone tells you the nature of the answer before you compute a single root.
With a=1, b=−5, c=6 (the tool's own default), the discriminant is (−5)² − 4(1)(6) = 25 − 24 = 1, which is positive, so there are two distinct real roots. √1 = 1, so x = (5 ± 1) ÷ 2, giving x₁ = 3 and x₂ = 2. Checking: (3)² − 5(3) + 6 = 9 − 15 + 6 = 0, and (2)² − 5(2) + 6 = 4 − 10 + 6 = 0 — both correct. Factored, this is the same as (x − 2)(x − 3) = 0, which is exactly what two clean integer roots imply.
A negative discriminant doesn't mean the equation is unsolvable — it means the solutions aren't real numbers. Graphically, this is a parabola that never crosses the x-axis (it stays entirely above or entirely below it). Complex roots come in conjugate pairs (a + bi and a − bi) and are genuinely useful outside pure algebra — they show up in electrical engineering (AC circuit analysis), control systems, and signal processing, wherever the underlying physical system is described by a differential equation whose characteristic polynomial happens to be quadratic with no real roots.
The quadratic formula solves ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ 2a. The ± gives two roots. The discriminant (b² − 4ac) determines root type: positive = two distinct real roots, zero = one repeated real root, negative = two complex (imaginary) roots.
Example: 2x² − 7x + 3 = 0. a=2, b=−7, c=3. Discriminant = (−7)² − 4(2)(3) = 49 − 24 = 25. √25 = 5. x = (7 ± 5) ÷ 4. Root 1: x = 12/4 = 3. Root 2: x = 2/4 = 0.5. Check: 2(9)−7(3)+3 = 18−21+3 = 0 ✓.