Math

Quadratic Formula Calculator

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

Exact method explained belowEditable inputs

Set up your calculation

Runs on your device

SOLUTION

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter coefficient a, coefficient b, coefficient c.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

The discriminant is D = b² − 4ac. Roots are (−b ± √D)/(2a). D > 0 gives two real roots, D = 0 gives a repeated root, and D < 0 gives complex conjugates. A numerically stable rearrangement is used for distinct real roots.

A WORKED EXAMPLE

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

What to keep in mind

Coefficient a must have an absolute value of at least 0.000000000001. Decimal inputs use floating-point arithmetic, so a discriminant extremely close to zero can be sensitive to rounding. This solves one quadratic equation, not inequalities.

Common questions

Can it show imaginary roots?

Yes. A negative discriminant produces a real part plus or minus an imaginary part, using i² = −1.

Why is a = 0 rejected?

That would make the equation linear rather than quadratic, so the quadratic formula would divide by zero.

Methodology maintained by ClarityKit. How these tools are built and checked.