Quadratic equation solver
Enter the coefficients a, b and c: the discriminant and the roots show, exact and as decimals, with the parabola and its vertex.
- Checked on thousands of cases
- Updated November 7, 2026
Quick challenge
Streak 0Best 0
Test yourself: every answer is computed by the tool, and the wrong choices are the most common traps.
How it works
Formula: x = (−b ± √Δ) ÷ 2a, with Δ = b² − 4ac
First compute the discriminant Δ = b² − 4ac. If it is positive, there are two roots: x = (−b ± √Δ) ÷ 2a. If it is zero, one double root: x = −b ÷ 2a. If it is negative, no real root, but two complex roots. The roots are where the parabola y = ax² + bx + c crosses the horizontal axis; its vertex is at x = −b ÷ 2a.
Worked examples
x² − 5x + 6 = 0
Δ = 25 − 24 = 1: two roots, x = 2 and x = 3.
x² − 2x − 1 = 0
Δ = 8: x = 1 ± √2, that is -0.414 and 2.414.
x² + 2x + 5 = 0
Δ = −16: no real root, but x = −1 ± 2i.
Common mistakes
Forgetting the minus sign in front of b.
With b = −5, −b is 5: x = (5 ± 1) ÷ 2.
Dividing only √Δ by 2a.
The whole numerator is divided: (−b ± √Δ) ÷ 2a.
Writing b² = −25 when b = −5.
A square is never negative: (−5)² = 25.
Sample equations and their roots
| Equation | Δ | Roots |
|---|---|---|
| x² − 5x + 6 = 0 | 1 | 2, 3 |
| x² − 4 = 0 | 16 | −2, 2 |
| x² + 2x + 1 = 0 | 0 | −1 |
| 2x² − 3x − 2 = 0 | 25 | −1/2, 2 |
| x² − 2x − 1 = 0 | 8 | 1 ± √2 |
| x² − 2 = 0 | 8 | ±√2 |
| x² + 2x + 5 = 0 | -16 | no real root (−1 ± 2i) |
| x² + 1 = 0 | -4 | no real root (±i) |
| 3x² − 6x + 3 = 0 | 0 | 1 |
| x² − 7x + 12 = 0 | 1 | 3, 4 |
Frequently asked questions
What does a negative discriminant mean?
The parabola doesn't cross the horizontal axis: no real root, two complex conjugate roots.
What if a = 0?
It's no longer quadratic: bx + c = 0 gives x = −c ÷ b.
What are the sum and product of the roots?
Sum = −b ÷ a, product = c ÷ a: for x² − 5x + 6, 2 + 3 = 5 and 2 × 3 = 6.
Math calculators
Math calculatorsOther calculators
- Dates & timeAge, days between dates
- HealthBMI, BMR, calories, running pace
- CookingBread dough, cups to grams, servings
- Home & DIYConcrete, paint, floors, walls, garden
- EverydayFuel cost, unit price, grades
- WeatherWind chill, heat index, storms
- MoneySales, tips, salary
- TechColors, passwords, binary…
- Random & gamesCoin flip, dice, name picker