Quadratic Formula Calculator
Solve ax² + bx + c = 0 for x using the quadratic formula, including complex roots.
- Free to use
- No registration required
- Works on all devices
- Method
- Quadratic formula with discriminant test for real, repeated or complex roots
- Last updated
- 24-09-2026
Your result
2
Root 1
AI explanation
Formula
x = (−b ± √(b² − 4ac)) ÷ 2aWorked examples
x² − 3x + 2 = 0
| Field | Value |
|---|---|
| Coefficient a | 1 |
| Coefficient b | -3 |
| Coefficient c | 2 |
| Root 1 | 2 |
| Root 2 | 1 |
| Discriminant | 1 |
| Nature of roots | Two distinct real roots |
- Identify a = 1, b = −3, c = 2.
- Discriminant = b² − 4ac = (−3)² − 4 × 1 × 2 = 9 − 8 = 1.
- The discriminant is positive, so there are two distinct real roots; √1 = 1.
- x = (3 + 1) ÷ 2 = 2 and x = (3 − 1) ÷ 2 = 1.
Check: 2² − 3 × 2 + 2 = 0 and 1² − 3 × 1 + 2 = 0, so both roots satisfy the equation.
x² + 2x + 5 = 0 (complex roots)
| Field | Value |
|---|---|
| Coefficient a | 1 |
| Coefficient b | 2 |
| Coefficient c | 5 |
| Root 1 | -1 + 2i |
| Root 2 | -1 - 2i |
| Discriminant | -16 |
| Nature of roots | Two complex conjugate roots |
- Discriminant = 2² − 4 × 1 × 5 = 4 − 20 = −16.
- The discriminant is negative, so the roots are complex: √(−16) = 4i.
- x = (−2 ± 4i) ÷ 2 = −1 ± 2i.
The parabola y = x² + 2x + 5 never crosses the x-axis, which is why there is no real solution.
2x² − 4x + 2 = 0 (one repeated root)
| Field | Value |
|---|---|
| Coefficient a | 2 |
| Coefficient b | -4 |
| Coefficient c | 2 |
| Root 1 | 1 |
| Root 2 | 1 |
| Discriminant | 0 |
| Nature of roots | One repeated real root |
- Discriminant = (−4)² − 4 × 2 × 2 = 16 − 16 = 0.
- With a zero discriminant the ± term vanishes: x = 4 ÷ (2 × 2) = 1.
The equation is 2(x − 1)² = 0, so the parabola just touches the x-axis at x = 1.
Assumptions and limitations
This calculator assumes
- When the discriminant (b² − 4ac) is negative, the roots are complex — reported as text rather than left undefined.
What it does not account for
- Requires a ≠ 0; with a = 0 the equation is linear, not quadratic.
- Results are rounded to 8 decimal places, so roots of equations with very large or very small coefficients may show rounding error.
When to use this calculator
- Checking homework or exam answers for quadratic equations, including complex roots.
- Finding where a parabola crosses the x-axis, such as when a projectile returns to ground level.
Frequently asked questions
What is the discriminant?
b² − 4ac — its sign tells you the nature of the roots: positive means two real roots, zero means one repeated real root, and negative means two complex conjugate roots.
What if a = 0?
Then the equation isn't actually quadratic — use the Linear Equation Calculator instead for ax + b = 0.
How are complex roots shown?
As text in the form "real ± imaginary i" — for example, "-0.5 + 0.87i".