Quadratic Equation Calculator
Enter the coefficients a, b and c to solve any quadratic equation of the form ax² + bx + c = 0, with the discriminant shown so you know what kind of roots to expect.
Formula
x = ( −b ± √(b² − 4ac) ) ÷ 2a
- For ax² + bx + c = 0, with a ≠ 0
- b² − 4ac is the discriminant, which decides how many roots exist
x² − 3x + 2: discriminant 1, roots x = 2 and x = 1
The Quadratic Formula
x = (−b ± √(b² − 4ac)) ÷ 2a
For x² − 5x + 6 = 0: a = 1, b = −5, c = 6. The discriminant is 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving roots of 3 and 2.
The plus-or-minus is why quadratics generally have two solutions.
What the Discriminant Tells You
The part under the square root, b² − 4ac, decides the nature of the roots before you finish solving:
- Positive: two distinct real roots — the curve crosses the x-axis twice
- Zero: one repeated root — the curve just touches the axis
- Negative: no real roots — the curve misses the axis entirely, and the solutions are complex
Signs and Common Errors
Most mistakes are sign errors. In x² − 5x + 6, the value of b is −5, not 5, so −b becomes +5. Write the coefficients out with their signs before substituting.
The equation must also be rearranged to equal zero first: 2x² = 8x − 6 has to become 2x² − 8x + 6 = 0. And a cannot be zero, or the equation is linear rather than quadratic.
Quick Reference
| Equation | b² − 4ac | Roots |
|---|---|---|
| x² − 3x + 2 | 1 | Two real: 2 and 1 |
| 2x² − 7x + 3 | 25 | Two real: 3 and 0.5 |
| x² + 2x + 1 | 0 | One repeated: −1 |
| x² + x + 1 | −3 | No real roots; two complex |
Frequently Asked Questions
- What is the quadratic formula?
- x equals minus b, plus or minus the square root of b squared minus 4ac, all divided by 2a. It solves any equation of the form ax² + bx + c = 0.
- What does the discriminant tell me?
- b² − 4ac reveals the roots before solving: positive means two real roots, zero means one repeated root, negative means no real roots.
- Why does my answer come out wrong?
- Usually a sign error. If b is negative, minus b is positive. Write out each coefficient with its sign before substituting.
- What if there are no real roots?
- The parabola never crosses the x-axis. Solutions exist as complex numbers involving the square root of a negative value.