SolveTap · Learn the method

Quadratic Formula Calculator

Enter a, b and c to solve ax² + bx + c = 0. See the discriminant, real or complex roots, the quadratic formula and a substitution check.

Calculate

Enter coefficients a, b and c for ax² + bx + c = 0. The leading coefficient a cannot be zero. Use numbers with magnitude at most 1,000,000.

Calculations run in your browser. Numeric inputs are not included in analytics events.

Formula and variables

D = b² − 4ac; x = (−b ± √D)/(2a)

a, b and c are numeric coefficients and a ≠ 0. D > 0 gives two real roots, D = 0 one repeated real root, and D < 0 two complex conjugate roots.

Worked example

Solve x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6. D = (−5)² − 4(1)(6) = 1. Therefore x = (5 ± 1)/2, so x = 2 or x = 3. Check: 2² − 5(2) + 6 = 0 and 3² − 5(3) + 6 = 0.

What does the discriminant tell you?

The value D = b² − 4ac decides the root type before you take a square root. A positive D gives two real roots; zero gives one repeated real root; a negative D gives two complex conjugates.

For example, x² + 2x + 1 = 0 has D = 0 and repeated root −1. The equation x² + 1 = 0 has D = −4 and roots i and −i. To type a complete equation instead of coefficients, use the free online math solver.

When to use this formula

Use this calculator when a quadratic equation is already written in standard form. It displays real roots or complex conjugate roots and explains what the discriminant means. If you need to enter an entire equation instead of coefficients, use the free math solver.

Common mistakes

The square in b² applies to the entire negative coefficient: (−5)² = 25. Put the equation equal to zero before reading a, b and c. If a is zero, the equation is linear, so use the math solver.

What if the discriminant is negative?

The equation has no real roots, but it has two complex conjugate roots. The calculator shows both using i = √−1.

Related calculators and resources