Quadratic Formula Calculator

Enter any ax² + bx + c and get exact roots — real, repeated, or complex — with every step shown.

Quadratic Solver

Get exact roots for any ax² + bx + c

x² − 5x + 6Two Real Roots
x² − 2Irrational Roots
4x² + 4x + 1Repeated Root
x² + 4Complex Roots
2x² + 5x − 3Two Real Roots
3x² − 2x − 2Irrational Roots
← Back to Examples
Result Type
Answer
Steps go here…

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

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

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:

DiscriminantWhat it means
D > 0Two 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 = 0Exactly one real root, “repeated” — the parabola just touches the x-axis at a single point instead of crossing it.
D < 0No 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)

Solve: x² − 5x + 6 = 0

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

Solve: x² − 2 = 0

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

Solve: 4x² + 4x + 1 = 0

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

Solve: x² + 4 = 0

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.

Frequently Asked Questions

Yes, for any equation of the form ax² + bx + c = 0 where a is not zero. Unlike factoring, it never fails to produce an answer — the only thing that changes is whether that answer is rational, irrational, or complex.
Factoring is faster when it works, but it only works when the roots are rational. The quadratic formula is slower to compute by hand but works for every quadratic, including ones with irrational or complex roots that can’t be factored over the integers at all.
It tells you what kind of answer to expect before you finish the calculation, which makes it much easier to catch arithmetic mistakes. If D is negative but you end up with a real number answer, you know you made an error somewhere.
A complex root includes i, the square root of −1, because you can’t take the square root of a negative number within the real numbers. Complex roots always come in pairs — if one root is p + qi, the other is always p − qi.
Yes — a, b, and c can be any real numbers as long as a is not zero. If a is negative, the formula works exactly the same way; just be careful with the signs when computing 2a in the denominator.