Math

Quadratic Formula Calculator

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

Exact method explained belowEditable inputs
Calculation notebook
Calculation notebook

The formula and worked example below explain the calculation.

See the method

Enter your values

Runs on your device

Your answer

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.

Input reference and sample values

Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.

InputFormat and unitsSample
Coefficient aNumeric value. Minimum: -1000000. Maximum: 1000000.1
Coefficient bNumeric value. Minimum: -1000000. Maximum: 1000000.-5
Coefficient cNumeric value. Minimum: -1000000. Maximum: 1000000.6

Result for these sample inputs

2 and 3
Discriminant
1
Root type
Two distinct real roots

Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.

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.