Math tools

Solve a quadratic equation

Quadratic formula calculator

Enter the coefficients a, b, and c to find the roots and see what the discriminant says about the solution.

Calculated in your browser

Formula and steps included

No account. No signup.

Formula

The quadratic formula

For ax² + bx + c = 0 and a ≠ 0: x = (−b ± √(b² − 4ac)) / (2a)

The quadratic formula solves every equation in standard quadratic form when a is nonzero. The plus-or-minus symbol produces up to two roots.

The discriminant b² − 4ac determines the root type. A positive discriminant gives two distinct real roots, zero gives one repeated real root, and a negative value gives two complex conjugate roots.

How to use the formula

  1. Write the equation in standard form

    Move all terms to one side and identify a, b, and c from ax² + bx + c = 0.

  2. Calculate the discriminant

    Evaluate b² − 4ac before taking the square root.

  3. Substitute into the formula

    Use both the plus and minus cases and divide the complete numerator by 2a.

  4. Simplify and check

    Substitute each root into the original equation; rounding may make an approximate check slightly different from zero.

Worked examples

Quadratic formula examples

Two real roots

For x² − 5x + 6 = 0, the discriminant is 1 and the roots are (5 ± 1) / 2, so x = 3 or x = 2.

Two complex roots

For 2x² + 4x + 5 = 0, the discriminant is −24 and the roots are x = −1 ± (√6 / 2)i.

Common questions

Quadratic formula FAQ

What does the discriminant tell me?

It tells you how many roots exist in the real numbers: two when positive, one repeated root when zero, and none when negative. A negative discriminant gives two complex roots.

Can a equal zero in the quadratic formula?

No. If a is zero, the x² term disappears and the equation is linear or constant, so the quadratic formula does not apply.

Why does the formula have plus or minus?

A quadratic can cross the x-axis at two points. Evaluating both signs finds both roots when they are distinct.

Are my equation coefficients uploaded?

Your coefficients are not saved by default or uploaded. You can opt into Remember on this device or download a local JSON backup.