Quadratic Equation Calculator
Solve any equation in the form ax² + bx + c = 0 using the quadratic formula, with real or complex roots shown.
How the quadratic formula works
The quadratic formula solves any equation of the form ax² + bx + c = 0 by isolating x, derived from a technique called completing the square. The expression under the square root, b² − 4ac, is called the discriminant — its sign tells you what kind of solutions to expect before you even finish the calculation.
a = 1, b = −5, c = 6. Discriminant: (−5)² − 4(1)(6) = 25 − 24 = 1 (positive → two real roots).
x = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2 → x = 3 or x = 2.
A ball's height in meters over time is −5t² + 20t + 1. To find when it lands, set height to 0: a = −5, b = 20, c = 1. Discriminant = 20² − 4(−5)(1) = 400 + 20 = 420.
t = (−20 ± √420) ÷ (2 × −5) = (−20 ± 20.494) ÷ −10. The positive time solution is t = (−20 − 20.494) ÷ −10 = ≈ 4.05 seconds (the other root, t ≈ −0.05, is negative and discarded since time can't be negative).
What the discriminant tells you
| Discriminant | Result |
|---|---|
| Positive | Two distinct real roots |
| Zero | One repeated real root |
| Negative | Two complex conjugate roots (no real solutions) |
Common mistakes when solving quadratic equations
- Forgetting the ± sign. A quadratic equation has two solutions (except when the discriminant is exactly 0) — dropping the minus branch misses one of them.
- Mixing up signs when identifying a, b, and c. Double-check the sign of each coefficient as written in the original equation before plugging into the formula.
- Assuming a negative discriminant means "no solution." It means no real solution — the equation still has two complex solutions.
- Keeping a physically impossible root in a real-world problem. As the projectile example shows, one of the two mathematical solutions (a negative time) can be meaningless in context and should be discarded.
Factoring vs. the quadratic formula
Factoring — rewriting ax² + bx + c as a product of two binomials — is often faster when the roots are simple rational numbers, but it only works cleanly for equations that factor neatly. The equation x² + 7x + 12 = 0 factors as (x + 3)(x + 4) = 0, giving x = −3 or x = −4 directly, without ever computing a discriminant. The quadratic formula always works, even when the roots are irrational or complex, which is why it's the more reliable general-purpose method despite factoring sometimes being quicker for tidy cases.
Frequently asked questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) ÷ 2a, giving the solutions to any equation ax² + bx + c = 0.
What does the discriminant tell you?
Positive means two real roots, zero means one repeated root, negative means two complex roots.
What happens if a = 0?
The equation becomes linear, not quadratic, and needs a different solving method.
Can a quadratic equation have complex roots?
Yes — whenever the discriminant is negative, the roots are complex conjugates.
How do you solve by factoring instead of the formula?
Rewrite as two binomials multiplying to the original expression. x² + 7x + 12 = (x+3)(x+4) = 0 gives x = -3 or x = -4.
How is the quadratic formula used for projectile landing time?
Set the height equation to 0 and solve. A ball with height -5t² + 20t + 1 lands at t ≈ 4.05 seconds; the negative-time root is discarded.
Related calculators
Note: Handles real coefficients; complex roots are shown in standard a + bi form. Last reviewed: September 2026.