Quadratic formula solver
This tool solves any equation of the form ax² + bx + c = 0 for x. Enter the three coefficients a, b and c and it instantly returns the roots — whether they are two real numbers, a single repeated value, or a complex conjugate pair — along with the discriminant so you can see why. It is useful for algebra homework, physics problems (projectile and motion equations), and any time you need to factor or find where a parabola crosses zero.
How it works
The solver applies the quadratic formula:
x = (−b ± √(b² − 4ac)) / 2a
First it computes the discriminant, D = b² − 4ac, which decides the kind of answer:
- D > 0 — two distinct real roots: x₁ = (−b + √D)/2a and x₂ = (−b − √D)/2a.
- D = 0 — one repeated real root: x = −b/2a.
- D < 0 — two complex roots: x = (−b/2a) ± (√(−D)/2a)·i.
If a = 0 the equation is linear, not quadratic, so the formula does not apply and the tool prompts for a non-zero a. Results are rounded to six decimal places.
Example
For x² − 3x + 2 = 0 (a = 1, b = −3, c = 2):
- Discriminant D = (−3)² − 4·1·2 = 9 − 8 = 1 (positive, so two real roots).
- x₁ = (3 + √1) / 2 = 4 / 2 = 2
- x₂ = (3 − √1) / 2 = 2 / 2 = 1
| Discriminant b² − 4ac | Root type | Result shape |
|---|---|---|
| Positive | Two real roots | x₁, x₂ |
| Zero | One repeated root | x |
| Negative | Two complex roots | p ± qi |
Everything runs in your browser, so the coefficients you enter are never uploaded.