The quadratic equation solver finds the roots of ax² + bx + c = 0. Enter a, b and c to get both roots — real or complex — along with the discriminant, the vertex and axis of symmetry of the parabola, and the quadratic formula with your numbers in it. It's accurate even for awkward coefficients and runs in your browser.
| b² − 4ac | Roots |
|---|---|
| > 0 | Two different real roots |
| = 0 | One repeated real root |
| < 0 | Two complex roots |
x = (−b ± √(b² − 4ac)) / 2a.
There are no real roots; the two roots are complex, shown as a ± bi.
The x-coordinate is −b/2a; substitute it back for the y-coordinate. The solver shows both.
Then it's a linear equation. Switch to the linear option.
No. It runs in your browser.
The discriminant b² − 4ac decides the roots: positive gives two real roots, zero one repeated root, negative two complex conjugate roots −b/2a ± (√(4ac − b²)/2a)i. Real roots are computed with the numerically stable form q = −½(b + sign(b)√(b² − 4ac)), x₁ = q/a and x₂ = c/q, which avoids the catastrophic cancellation the usual formula suffers when b² is much larger than 4ac — so a root like −0.00000001 isn't lost. The vertex of the parabola is (−b/2a, c − b²/4a) and the axis of symmetry is x = −b/2a. If a is 0 the equation isn't quadratic, and you're told so. The same solver also handles linear and cubic equations and systems.