Overview
The quadratic formula solves any equation of the form ax² + bx + c = 0. This gives the real roots, or tells you when there aren't any.
Enter a, b and c. a can't be 0.
Worked examples
| Inputs | Result |
|---|---|
| a (coefficient)1b (coefficient)-5c (constant)6 | x₁ = 3x₂ = 2 |
Show 3 more examples
| a (coefficient)2b (coefficient)-3c (constant)-5 | x₁ = 2.5x₂ = -1 |
| a (coefficient)1b (coefficient)-6c (constant)9 | One root: x = 3 |
| a (coefficient)1b (coefficient)0c (constant)-2 | x₁ = 1.41x₂ = -1.41 |
How it works
The discriminant, b² − 4ac, decides the result. If it's positive, there are two real roots. If it's zero, there's one repeated root. If it's negative, the roots are complex, and this calculator doesn't list them.
The formula
x = (−b ± √(b² − 4ac)) ÷ 2a
| a, b, c | Coefficients of ax² + bx + c = 0 |
Practical tips
- x² − 5x + 6 = 0 has roots 3 and 2.
- Check a root by substituting it back. 3² − 5 × 3 + 6 = 0.
- Move every term to one side first, so 2x² = 3x + 5 becomes 2x² − 3x − 5 = 0.
Frequently asked questions
What if a is 0?
The equation is linear, so x = −c ÷ b.
What are complex roots?
Solutions involving √−1. They exist when the discriminant is negative.
Can I factor instead?
If the discriminant is a perfect square, the quadratic factors neatly.