How it works
- The quadratic formula is x = (−b ± √(b² − 4ac)) ÷ 2a.
- The discriminant D = b² − 4ac tells you the type of answer: D > 0 gives two real roots, D = 0 one repeated root, and D < 0 two complex roots.
- When a, b and c are whole numbers, the roots are also shown exactly, for example (2 ± √10)/3, with the square root and fraction simplified.
- The vertex of the parabola is at x = −b ÷ 2a, which is also the axis of symmetry.
Worked examples
x² − 5x + 6 = 0
Solve x² − 5x + 6 = 0 with the quadratic formula.
- a = 1, b = −5, c = 6.
- D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1, so √D = 1.
- x = (5 ± 1) ÷ 2.
Answer: x = 3 or x = 2
Try this exampleA quadratic with no real roots
Solve 2x² + 4x + 5 = 0.
- D = 4² − 4 × 2 × 5 = 16 − 40 = −24, which is negative, so the roots are complex.
- √−24 = i√24 = 2i√6.
- x = (−4 ± 2i√6) ÷ 4 = (−2 ± i√6) ÷ 2.
Answer: x = (−2 ± i√6)/2 ≈ −1 ± 1.2247i
Try this exampleFrequently asked questions
What if a is 0?
Then the equation is linear (bx + c = 0), not quadratic, and its single solution is x = −c ÷ b.
What does a negative discriminant mean?
There are no real solutions: the parabola never crosses the x-axis. The two roots are complex numbers of the form p ± qi.
How do I enter x² − 5 = 0?
Use a = 1, b = 0 and c = −5. Any missing term has a coefficient of 0.
Results are estimates for general information and are not financial, medical or professional advice.