Solve any quadratic equation of the form ax² + bx + c = 0 using the quadratic formula. Enter the three coefficients, and the tool computes the discriminant, interprets it, and returns the roots — two real, one real, or two complex conjugates depending on the discriminant’s sign.
The quadratic formula
For ax² + bx + c = 0 with a ≠ 0, the roots are:
x = (−b ± √(b² − 4ac)) / 2a
The expression b² − 4ac is called the discriminant and determines the nature of the roots:
- Discriminant > 0: two distinct real roots. The parabola crosses the x-axis at two different points.
- Discriminant = 0: one real root (a “double root”). The parabola’s vertex sits on the x-axis.
- Discriminant < 0: two complex conjugate roots. The parabola doesn’t cross the x-axis; the roots are p ± qi where i is the imaginary unit √−1.
The tool evaluates the discriminant first and reports which case you’re in before computing the roots, so you can tell at a glance whether you’re dealing with real or complex arithmetic.
Example: two real roots
x² − 3x + 2 = 0. Enter a = 1, b = −3, c = 2. Discriminant = 9 − 8 = 1 > 0, so two real roots. √1 = 1, so x = (3 ± 1) / 2, giving x = 2 or x = 1. The equation factors as (x − 1)(x − 2) = 0 — which is another way to see the roots, and confirms them.
Example: one real (double) root
x² − 2x + 1 = 0. Enter a = 1, b = −2, c = 1. Discriminant = 4 − 4 = 0, so one double root. x = 2/2 = 1. The equation is a perfect square: (x − 1)². The parabola y = x² − 2x + 1 touches the x-axis at x = 1 and bounces back up rather than crossing.
Example: two complex roots
x² + 1 = 0. Enter a = 1, b = 0, c = 1. Discriminant = 0 − 4 = −4 < 0, so two complex conjugates. x = ±√−4 / 2 = ±2i / 2 = ±i. The parabola y = x² + 1 sits entirely above the x-axis (minimum value 1 at x = 0), so there are no real solutions — but there are still two complex solutions, and the tool shows them as 0 + 1i and 0 − 1i.
Example: degenerate (a = 0)
Set a = 0, b = 2, c = 4. Since a is zero, the equation reduces to 2x + 4 = 0, which is linear. The tool solves it as x = −2 and flags the result as “Linear — not truly quadratic (a = 0)” so you know you’ve fallen out of quadratic territory — the linear equation solver gives a step-by-step walkthrough for that case. This is occasionally useful for code that hands you coefficients and you’re not sure in advance whether a is zero.
Where this formula comes from
The quadratic formula is the packaged result of completing the square on the general form. Start with ax² + bx + c = 0, divide both sides by a, move c/a to the right, and add (b/2a)² to both sides to make the left side a perfect square:
(x + b/2a)² = (b/2a)² − c/a = (b² − 4ac) / 4a²
Take the square root of both sides, get x + b/2a = ±√(b² − 4ac) / 2a, then isolate x. The ± comes from the fact that √ of anything non-negative has two values, and the whole thing collapses into x = (−b ± √(b² − 4ac)) / 2a.
The formula works even when the discriminant is negative — you just end up taking the square root of a negative number, which gives you an imaginary number times a real coefficient. The ± still applies, so you get two roots that are complex conjugates.
What this tool does not do
It doesn’t factor the quadratic. For “find (x − r₁)(x − r₂) form” problems, you can derive the factors from the roots manually — but the tool just returns roots, not factored expressions.
It doesn’t solve higher-degree polynomials. Cubics and quartics have closed-form formulas too (Cardano’s and Ferrari’s), but they’re messy. Quintic and higher equations generally don’t have closed forms — you need numerical root-finding. This tool handles only degree-2 polynomials.
It doesn’t plot the parabola. You can eyeball the shape from the roots and the leading coefficient (concave up if a > 0, concave down if a < 0), but there’s no graph view.
It doesn’t handle symbolic coefficients. Every input must be a number. You can’t type “π” or “√2” — compute the numeric value first.
It doesn’t simplify radicals in the answer. If the roots involve irrational numbers (like √5), the tool shows them as decimal approximations, not in surd form. For exact-symbolic answers, use a computer algebra system. For raw square roots of the discriminant, the exponent calculator computes $x^{1/2}$ directly.