Enter the three coefficients — the discriminant decides whether you get two real roots, one repeated root, or a complex pair.
For any equation in the form ax² + bx + c = 0 (with a ≠ 0), the solutions are x = (−b ± √(b² − 4ac)) / (2a). It works for every quadratic equation, unlike factoring, which only comes out cleanly when the roots happen to be nice whole numbers.
The discriminant is the part under the square root, b² − 4ac. If it's positive, there are two distinct real roots. If it's exactly zero, there's exactly one repeated real root — the parabola just touches the x-axis at a single point. If it's negative, there are no real roots at all; the two solutions form a complex conjugate pair instead.
If a = 0, the x² term vanishes and the equation collapses to bx + c = 0, a linear equation rather than a quadratic one, with at most one solution found by simple algebra instead. This calculator requires a nonzero a, since the quadratic formula divides by 2a and isn't defined when a = 0 — it flags that input with a warning.
A complex root has a real part and an imaginary part, written as real ± imaginary·i, where i represents the square root of −1. Geometrically, it means the parabola never crosses the x-axis — there's no real x value that satisfies the equation — but the solution still exists formally within the complex number system, which is standard territory in algebra, engineering, and physics once you go beyond real-number solutions.
Worked example (real roots): a=1, b=−3, c=2: discriminant = (−3)² − 4(1)(2) = 9 − 8 = 1, a perfect square, so roots = (3 ± 1)/2 = 2 and 1. Worked example (complex roots): a=1, b=2, c=5: discriminant = 4 − 20 = −16, negative, so roots = −1 ± (√16/2)i = −1 + 2i and −1 − 2i.