How it works
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. Its graph is a parabola, and the roots are where the parabola crosses the x-axis. The quadratic formula solves every quadratic, even those that cannot be factored.
x = (−b ± √(b² − 4ac)) ÷ 2a · discriminant D = b² − 4ac vertex = (−b ÷ 2a, c − b² ÷ 4a)Worked examples. x² − 3x + 2 = 0: D = 9 − 8 = 1, so x = (3 ± 1) ÷ 2 → x₁ = 1, x₂ = 2; the vertex is (1.5, −0.25). x² − 4x + 4 = 0: D = 0, one repeated root x = 2. x² + 2x + 5 = 0: D = −16, complex roots x = −1 ± 2i.
What the discriminant tells you
| D | Roots | Graph |
|---|---|---|
| D > 0 | Two different real roots | Crosses the x-axis twice |
| D = 0 | One repeated real root | Touches the x-axis at the vertex |
| D < 0 | Two complex conjugate roots | Does not reach the x-axis |
Check your answer
- Sum of roots = −b ÷ a, and product of roots = c ÷ a (Vieta’s formulas). For x² − 3x + 2: 1 + 2 = 3 and 1 × 2 = 2. ✓
- Substitute each root back into the equation; the result should be 0.
Other ways to solve
Factoring is fastest when the roots are whole numbers: x² − 3x + 2 = (x − 1)(x − 2). Completing the square rewrites the equation as a(x − h)² + k = 0 and is how the formula itself is derived. The formula always works, so it is the safe choice for exams and homework checks.
Enter negative numbers with a minus sign, and decimals with a point. Need the line through two points instead? Use the slope calculator. For fractions use the fraction calculator, and for common factors the GCF and LCM calculator.