Skip to content

Quadratic Equation Solver

ax² + bx + c = 0

Roots

x₁ = 2, x₂ = 1

Two real roots (discriminant > 0)
Step-by-step
  1. Start: 1x² + -3x + 2 = 0
  2. discriminant = b² − 4ac = 9 − 8 = 1
  3. discriminant > 0 → two real roots
  4. √1 = 1
  5. x₁ = (−b + √disc) / 2a = 2
  6. x₂ = (−b − √disc) / 2a = 1

Estimates for educational purposes — not financial, medical, or legal advice. See terms.

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.

Frequently asked questions

What is the discriminant?

It's the expression b² − 4ac — the part under the square root in the quadratic formula. It tells you the nature of the roots before you bother computing them. Positive discriminant means two distinct real roots (the parabola crosses the x-axis twice). Zero means one real root, also called a double root (the parabola just touches the x-axis at one point). Negative means two complex roots (the parabola doesn't cross the x-axis at all; the roots are conjugate complex numbers). The tool shows the discriminant value and the interpretation alongside the roots themselves.

What does a 'double root' mean?

It means the quadratic has exactly one value of x that makes it zero, but that value counts twice in the factored form. The equation x² − 2x + 1 = 0 factors as (x − 1)² = 0, so x = 1 is a single root that appears with multiplicity two. Geometrically, the parabola's vertex sits exactly on the x-axis — it touches but doesn't cross. Algebraically, plugging x = 1 back in gives zero, same as with two distinct roots, just written once.

What are complex conjugate roots?

A pair of complex numbers of the form p + qi and p − qi — same real part, opposite imaginary parts. Quadratics with real coefficients always produce complex roots in conjugate pairs (if one is a root, so is its conjugate), which is a consequence of the conjugate root theorem. The tool displays them as '1 + 2i' and '1 − 2i', with i standing for the imaginary unit √−1. They're still valid roots — plug them into the original equation and you get zero (in complex arithmetic) — just not ones you can plot on a real number line.

What happens when a = 0?

The equation isn't really quadratic anymore — it reduces to bx + c = 0, which is linear. The tool detects this and solves it as a linear equation instead, reporting 'Linear — not truly quadratic (a = 0)' as the root kind. If b is also zero, the equation collapses further: if c is nonzero it's a contradiction (no solution), and if c is also zero it's the identity 0 = 0 (infinite solutions). The tool handles all three degenerate cases rather than throwing or returning NaN.

Why does the quadratic formula work?

It comes from completing the square on the general form ax² + bx + c = 0. Divide by a, move c/a to the other side, add (b/2a)² to both sides to complete the square on the left, then take the square root and isolate x. Out pops x = (−b ± √(b² − 4ac)) / 2a. The ± reflects that taking a square root gives two solutions. The derivation is in every intro algebra textbook, and the formula is the compact packaging of that derivation for mechanical use.