Quadratic Equation Solver
Solve quadratic equations (ax² + bx + c = 0) and find roots
About This Tool
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. Roots are found via the quadratic formula: x = (-b ± √(b² - 4ac)) / 2a. The discriminant (b² - 4ac) determines root nature: positive yields two real roots, zero yields one repeated real root, negative yields a conjugate pair of complex roots.
Enter coefficients a, b, c to receive both roots, the discriminant, and a graphical interpretation (vertex, axis of symmetry). Complex roots are reported in a + bi form.
The formula is derived by completing the square on the general form. Start with ax² + bx + c = 0. Divide through by a: x² + (b/a)x + (c/a) = 0. Complete the square by adding and subtracting (b/2a)²: (x + b/2a)² = (b² - 4ac) / 4a². Take the square root: x + b/2a = ±√(b² - 4ac) / 2a. Solve for x: x = (-b ± √(b² - 4ac)) / 2a. The result handles every quadratic with a single expression. The discriminant Δ = b² - 4ac is the key diagnostic. Δ > 0 means the parabola crosses the x-axis at two points (two real roots). Δ = 0 means it just touches at the vertex (one repeated real root). Δ < 0 means the parabola never touches (two complex conjugate roots, written p ± qi). The vertex coordinates are (-b/2a, c - b²/4a), which is also the maximum (a < 0) or minimum (a > 0) of the parabola.
A worked example. Solve 2x² - 7x + 3 = 0. a=2, b=-7, c=3. Discriminant = 49 - 24 = 25 > 0, so two real roots. x = (7 ± 5) / 4. x₁ = 12/4 = 3. x₂ = 2/4 = 0.5. Verify: 2(3)² - 7(3) + 3 = 18 - 21 + 3 = 0. 2(0.5)² - 7(0.5) + 3 = 0.5 - 3.5 + 3 = 0. Both check. The parabola crosses the x-axis at 0.5 and 3, opens upward (a > 0), and has its minimum at x = 7/4 = 1.75. By contrast, x² + x + 1 = 0 has discriminant 1 - 4 = -3 < 0, so complex roots: x = (-1 ± √-3) / 2 = -0.5 ± (√3/2)i.
Limitations and edge cases. If a = 0, the equation isn't quadratic but linear (bx + c = 0), with single root x = -c/b. The formula breaks because dividing by a = 0 is undefined; the solver should detect this and switch to the linear case. Numerical issues arise when b² is close to 4ac — the discriminant is the difference of two large numbers, losing precision. The 'cancellation' formula uses x = -2c / (b ± √(b² - 4ac)) when b is negative or the alternate sign when positive, which avoids subtractive cancellation in the larger root. For polynomials of higher degree (cubic, quartic), closed-form formulas exist (Cardano's, Ferrari's) but are more elaborate; degree 5 and higher have no general algebraic solution per Galois theory and require numerical methods.
The about text and FAQ on this page were drafted with AI assistance and reviewed by a member of the Coherence Daddy team before publishing. See our Content Policy for editorial standards.