Quadratic Formula Calculator

Solve any quadratic equation ax² + bx + c = 0. Enter the coefficients a, b, and c to get both roots, the discriminant, and whether the solutions are real or complex.

Root x₁ 0
Root x₂ 0
Discriminant (b² − 4ac) 0
Root type

The quadratic formula

Any equation that can be written as ax² + bx + c = 0 (with a ≠ 0) is solved by:

x = (−b ± √(b² − 4ac)) ÷ 2a

The ± means there are usually two answers. For x² − 3x + 2 = 0, with a = 1, b = −3, c = 2, the discriminant is 9 − 8 = 1, so x = (3 ± 1) ÷ 2 — giving x = 2 and x = 1.

What the discriminant tells you

Discriminant (b² − 4ac)Roots
PositiveTwo different real roots
ZeroOne repeated real root
NegativeTwo complex (imaginary) roots

Complex roots

When the discriminant is negative, the roots are complex conjugates of the form p ± qi. They still satisfy the equation — they just don't appear where the parabola crosses the x-axis, because it doesn't.

Frequently asked questions

What is the quadratic formula?

It solves any equation of the form ax² + bx + c = 0. The roots are x = (−b ± √(b² − 4ac)) ÷ 2a. The ± sign gives the two solutions. For x² − 3x + 2 = 0, the roots are x = 2 and x = 1.

What is the discriminant?

The discriminant is the part under the square root, b² − 4ac. Its sign tells you the type of roots: positive means two distinct real roots, zero means one repeated real root, and negative means two complex (imaginary) roots. This calculator shows the discriminant and the root type.

What if a equals zero?

Then the equation is not quadratic — it is linear (bx + c = 0), with a single solution x = −c ÷ b. The quadratic formula requires a to be non-zero, so the calculator flags this case.

What are complex roots?

When the discriminant is negative, the square root of a negative number is imaginary, so the roots take the form p ± qi, where i is the square root of −1. The two roots are complex conjugates — same real part, opposite imaginary parts.

Note: The coefficient a must be non-zero for a quadratic. If a = 0, the equation is linear and the calculator solves it as such.