Maths & numbers
Quadratic equation solver
Solve ax² + bx + c = 0, including complex roots.
A clear answer. Here’s how.
Uses the quadratic formula, with scaling and a cancellation-resistant calculation for distinct real roots. The coefficient a must be non-zero. Extremely small or large coefficients may exceed floating-point precision.
See a worked example
Worked example
A fixed demonstration, separate from the values you enter above.
- a (coefficient of x²)
- 1
- b (coefficient of x)
- -5
- c (constant)
- 6
Example result
- x1
- 2
- x2
- 3
Two distinct real roots.