Quadratic Formula Calculator

Solve ax² + bx + c = 0. Find both real or complex roots, or a repeated root, and see how the discriminant determines the answer.

Use any nonzero value.
Enter 0 if there is no constant term.

Example: 1,250.50. Use a period for decimals.

This setting is not saved.

Result

Enter values and select Calculate.

How is this calculated?

For ax² + bx + c = 0, D = b² − 4ac and the roots are (−b ± √D) ÷ (2a). Here a, b and c are the three coefficients and a cannot be zero.

Worked example: Solve an equation with complex roots

For x² − 2x + 5 = 0 the discriminant is −16. The two solutions are 1 + 2i and 1 − 2i.

Method and limits

Solves ax² + bx + c = 0 for nonzero a. The discriminant is calculated exactly from the typed decimal coefficients; roots are displayed to at most 14 significant digits. Very close distinct roots may display the same rounded value. Use at most 110 characters per number, with exponents from −420 to 420 and magnitude at most 1e120.

How to use this calculator

  1. Move all terms to the left so the equation equals zero, then enter the three signed coefficients. For an absent x or constant term, enter zero.
  2. Compute D = b² − 4ac to understand the result: positive means two real roots, zero one repeated root, and negative a conjugate pair. Open “How is this calculated?” to see the calculation for your inputs.

Find the roots when the leading coefficient is not 1

For 3x² − 11x + 6 = 0, the discriminant is 121 − 72 = 49. The two roots are (11 + 7) ÷ 6 = 3 and (11 − 7) ÷ 6 = 2/3. Substituting either into the original equation gives zero.

Write the equation in standard form

The solver expects the left-hand side to equal zero. For 2x² + 7 = 3x, subtract 3x from both sides to get 2x² − 3x + 7 = 0, so the three entries are 2, -3 and 7. A missing term has coefficient zero; an x² coefficient of zero makes the equation linear or constant instead.

Interpret the discriminant before rounding

D = b² − 4ac tells you what kind of roots to expect. For x² + 6x + 9 = 0, D = 36 − 36 = 0 and the repeated root is -3. For x² − 2x + 5 = 0, D = 4 − 20 = -16 and the roots are 1 + 2i and 1 − 2i. Only real roots appear as intersections between the parabola and the x-axis.

Check a solution by substitution

When the solver gives x = 3 for 3x² − 11x + 6 = 0, substitute it into the original expressions: 3 × 9 − 11 × 3 + 6 = 0. A rounded irrational root may produce a small nonzero residual, so recheck with more digits or substitute a symbolic expression when exact proof is required.

Frequently asked questions

What if the equation has no x term?
Enter 0 for b. For x² − 16 = 0, enter a = 1, b = 0 and c = -16 to get -4 and 4.
Can I turn off complex roots?
A negative discriminant means there is no real solution. The two complex roots are shown so you can distinguish “no real roots” from an invalid input.
Why do two real results sometimes look identical?
The root type uses the discriminant computed from the exact typed coefficients. Very close roots can round to the same display, even though the discriminant is positive and the roots are distinct.
Does the order of Root 1 and Root 2 matter?
No. Either order describes the same solution set. The numerical implementation computes the roots in an order that helps retain the smaller root when roots have very different magnitudes.

Common mistakes and limits

Sources & methodology

Related calculators