How the quadratic formula works
Any equation of the form ax² + bx + c = 0 (with a ≠ 0) can be solved directly with the quadratic formula. The discriminant D tells you how many real roots to expect before you even compute them.
- a, b, c — the equation's coefficients
- D — discriminant = b² − 4ac
- x — the root(s) solved for
More detail
What the discriminant tells you
D > 0 gives two distinct real roots. D = 0 gives one repeated real root (a double root, where the parabola just touches the x-axis). D < 0 gives no real roots — the two solutions are a complex-conjugate pair, since you'd need the square root of a negative number.
Shortcut. For a = 1, if you can spot two numbers that multiply to c and add to −b, you've factored it without the formula — e.g. x² − 5x + 6 factors as (x−3)(x−2), matching the roots below.
Frequently asked questions
What are the roots of x² − 5x + 6 = 0?
D = (−5)² − 4(1)(6) = 1, which is positive, so there are two real roots: x = 3 and x = 2. Enter a=1, b=−5, c=6 above to see the same result.
What does a discriminant of 0 mean?
D = b² − 4ac = 0 means the equation has exactly one repeated root (a double root). For example x² − 4x + 4 = 0 has D = 0 and a single root x = 2.
What happens when the discriminant is negative?
There are no real solutions — only a pair of complex-conjugate roots, since the formula would require the square root of a negative number. For example x² + 1 = 0 has D = −4 < 0.
What if a = 0?
The equation is no longer quadratic — it's linear (bx + c = 0), so this calculator solves x = −c/b instead. If b is also 0, the equation is either an identity or has no solution.