How it works
For ax² + bx + c = 0, the roots come from (−b ± √(b² − 4ac)) ÷ 2a. A numerically stable equivalent reduces cancellation for distinct real roots.
Enter coefficients, including zero. Negative discriminants produce complex conjugate roots; a zero leading coefficient reduces the problem to a linear equation. Nearly repeated roots can be sensitive to input precision.
Worked example
With a = 1, b = −5 and c = 6, the quadratic equation ax² + bx + c = 0 has a discriminant of 1 and its roots are 2, 3.
Cite this page
ToolOctopus. “Quadratic equation solver.” Updated . https://tooloctopus.com/quadratic-equation-solver.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. License and source code.