Quadratic Formula Calculator
Enter any ax² + bx + c and get exact roots — real, repeated, or complex — with every step shown.
Why This Calculator Is Different From Factoring
Every other calculator on this site works by factoring — rewriting an expression as a product of simpler pieces. That only works when the roots happen to be nice integers or simple fractions. Most quadratics don’t cooperate that way.
The quadratic formula sidesteps the problem entirely. It doesn’t care whether an expression factors cleanly — it solves ax² + bx + c = 0 directly, every time, for any real values of a, b, and c. That’s why it’s the one method guaranteed to work when trinomial factoring hits a dead end.
The quadratic formula
The expression under the root, b² − 4ac, is called the discriminant — it tells you what kind of roots you’re about to get before you even finish the calculation.
What the Discriminant Tells You
Before working out the full formula, it’s worth computing just the discriminant (D = b² − 4ac) first. Its sign alone tells you what shape the answer will take:
| Discriminant | What it means |
|---|---|
| D > 0 | Two distinct real roots. If D is a perfect square, both roots are rational (nice fractions or integers) — the expression would also factor. If not, the roots are irrational, involving a square root. |
| D = 0 | Exactly one real root, “repeated” — the parabola just touches the x-axis at a single point instead of crossing it. |
| D < 0 | No real roots at all. The two solutions are complex numbers, involving i (the square root of −1). The parabola never touches the x-axis. |
Four Worked Examples — One for Each Case
Example 1 — rational roots (D is a perfect square)
Step 1. a = 1, b = −5, c = 6.
Step 2. D = (−5)² − 4(1)(6) = 25 − 24 = 1. Since 1 is a perfect square, expect clean integer roots.
Step 3. x = (5 ± √1) / 2 = (5 ± 1) / 2, giving x = 3 or x = 2.
Sure enough, this also factors as (x − 2)(x − 3) — whenever D turns out to be a perfect square, the quadratic formula and factoring always agree.
Example 2 — irrational roots
Step 1. a = 1, b = 0, c = −2.
Step 2. D = 0² − 4(1)(−2) = 8. Not a perfect square, so the roots won’t be whole numbers.
Step 3. x = (0 ± √8) / 2. Simplify √8 to 2√2, then reduce: x = ±√2.
This is exactly why factoring alone can’t handle every quadratic — there’s no pair of integers that multiplies to −2 and adds to 0 in a way that factors this over the integers, but the formula finds the answer anyway.
Example 3 — a repeated root
Step 1. a = 4, b = 4, c = 1.
Step 2. D = 4² − 4(4)(1) = 16 − 16 = 0.
Step 3. With D = 0, the ± disappears entirely: x = −b / 2a = −4 / 8 = −0.5.
This happens because 4x² + 4x + 1 is a perfect square trinomial, (2x + 1)². Whenever D = 0, the original expression is always a perfect square in disguise.
Example 4 — complex roots
Step 1. a = 1, b = 0, c = 4.
Step 2. D = 0² − 4(1)(4) = −16. Negative, so there are no real solutions.
Step 3. x = (0 ± √−16) / 2. Since √−16 = 4i, this gives x = ±2i.
Graphically, this parabola sits entirely above the x-axis and never crosses it — which is exactly what a negative discriminant is telling you before you even solve for x.
Common Mistakes
- Forgetting the ± sign. There are almost always two roots, not one — dropping the minus case is the single most common quadratic-formula mistake.
- Mixing up the sign of b. If the equation is x² − 5x + 6, then b is −5, not 5. The formula already has a negative sign built in front of b, so plug in b’s actual sign carefully.
- Dividing only part of the numerator by 2a. Both the −b term and the whole ± √D term need to be divided by 2a, not just one of them.
- Not simplifying the square root. √8 should become 2√2 before you’re done — leaving an unsimplified radical isn’t technically wrong, but it’s not considered a finished answer.
- Assuming a negative discriminant means “no answer.” It means no real answer — the equation still has two complex solutions.
