Home / Quadratic Formula Calculator

Quadratic Formula Calculator

Enter the coefficients a, b and c for ax squared plus bx plus c equals 0. The calculator returns the discriminant and both roots, real or complex, with the steps.

Chris Terry
By Chris Terry, Editor
Updated June 20, 2026

Coefficients

Equation solved: a x squared + b x + c = 0.

Roots

x values--
Discriminant--
Type--
Enter a, b and c to see the steps.

How the quadratic formula works

Any quadratic equation can be written as a x squared plus b x plus c equals 0, with a not equal to zero. The quadratic formula gives both solutions directly.

x = ( -b ± sqrt(b² - 4ac) ) / 2a

The piece under the radical, b squared minus 4ac, is the discriminant. Its sign decides whether the roots are two real numbers, one repeated number, or a conjugate pair of complex numbers.

Worked example: x squared - 3x + 2 = 0

Step 1. Identify a = 1, b = -3, c = 2.
Step 2. Discriminant = (-3)² - 4(1)(2) = 9 - 8 = 1. It is positive, so expect two real roots.
Step 3. sqrt(1) = 1.
Step 4. x = (3 ± 1) / 2, giving x = 2 and x = 1.

For a fuller derivation by completing the square, see Wolfram MathWorld on the quadratic formula.

More free math tools

Simplify radicals, find slope, and more.

Good to know

Frequently asked questions

What is the quadratic formula?

x = (-b plus or minus sqrt(b^2 - 4ac)) / 2a. It solves any equation in the form ax^2 + bx + c = 0 once you know a, b and c.

What does the discriminant tell you?

The discriminant is b^2 - 4ac. Positive gives two real roots, zero gives one repeated root, and negative gives a pair of complex roots.

How do you get complex roots?

When b^2 - 4ac is negative, the square root is imaginary. The roots take the form p plus or minus qi, which this tool reports automatically.

What if a equals zero?

Then the equation is not quadratic but linear: bx + c = 0, which solves to x = -c / b. The tool handles this case too.

Chris Terry
About the author
Chris Terry
Editor, Encore Editorial

Editor at Encore Editorial, Chris Terry sets the editorial standards here and turns dense topics into plain English. He has written widely on education, finance, and consumer markets.