Skip to content
CalculatorFlow.com
CalculatorFlow tool

Quadratic equation calculator

Solve ax² + bx + c = 0 for real or complex roots.

How this calculation works

Discriminant D = b² − 4ac. Roots = (−b ± √D) ÷ 2a. A stable equivalent is used for real roots to reduce subtraction error.

Enter three coefficients with a nonzero quadratic coefficient. Results include the discriminant and both real or complex roots.

How to use this calculator

  1. Enter or choose coefficient a (not zero).
  2. Enter or choose coefficient b.
  3. Enter or choose coefficient c.
  4. Select Calculate and review the result and assumptions.

Worked example

For x² − 3x + 2 = 0, the discriminant is 1 and the roots are 1 and 2.

Assumptions and limitations

Coefficient magnitudes are limited to 10¹²; nonzero coefficients smaller than 10⁻¹⁰⁰ are rejected to avoid underflow. Displayed roots are rounded; ill-conditioned equations can lose precision.

Frequently asked questions

What if the discriminant is negative?

The calculator displays the complex-conjugate roots.

Can a be zero?

No. With a equal to zero, the equation is not quadratic.