🧮 Quadratic Equation Solver

Solves ax² + bx + c = 0. Enter a, b and c below — roots update live, including complex roots when the discriminant is negative.

The quadratic formula, and what the discriminant decides

Roots come from the standard formula. The part under the square root is checked first, because its sign settles how many real answers exist:

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

D > 0  two real roots     D = 0  one double root
D < 0  a conjugate pair, −b/2a ± (√−D / 2a) i

The defaults a = 1, b = −3, c = 2 give D = 9 − 8 = 1, so the roots are (3 ± 1) / 2: 2 and 1. The vertex sits at x = 1.5, which substituted back gives y = −0.25.

Reading the rest of the card

a cannot be zero. With no x² term the equation is linear and the formula divides by 2a = 0, so the tool says so rather than returning infinity.

Frequently asked questions

What are the roots of x^2 - 3x + 2 = 0?

1 and 2. The discriminant is 1, so the formula gives (3 plus or minus 1) over 2. It factors as (x - 1)(x - 2).

What does a negative discriminant mean?

There are no real roots, because the parabola never crosses the x-axis. You get a conjugate pair instead: x^2 + 2x + 5 has a discriminant of -16 and roots -1 + 2i and -1 - 2i.

How do you find the vertex of a parabola?

The x value is -b over 2a; substitute it back for y. For x^2 - 3x + 2 that is x = 1.5, y = -0.25.