The quadratic formula
For any equation ax² + bx + c = 0 where a is not zero, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a.
The part under the square root, b² − 4ac, is called the discriminant. It tells you how many real solutions the equation has:
- Greater than 0: two different real solutions.
- Equal to 0: exactly one real solution (a repeated root).
- Less than 0: no real solutions. The solutions are complex numbers, which this calculator does not show.
How to use it
Rewrite your equation so that one side is zero, then read off a (the x² coefficient), b (the x coefficient) and c (the constant). For 2x² − 4x − 6 = 0, a = 2, b = −4 and c = −6. If a term is missing, its coefficient is 0.
Check your answer
Substitute each solution back into the original equation. If both sides are equal, the solution is correct. You can also check that the two solutions add up to −b ÷ a and multiply to c ÷ a. For x² − 3x + 2 = 0 the solutions are 1 and 2, which add up to 3 and multiply to 2.
Worked examples
x² − 3x + 2 = 0 (a = 1, b = −3, c = 2)
= x = 2 or x = 1
Discriminant: (−3)² − 4(1)(2) = 9 − 8 = 1. Then x = (3 ± 1) ÷ 2, so x = 2 or x = 1.
2x² − 4x − 6 = 0 (a = 2, b = −4, c = −6)
= x = 3 or x = -1
Discriminant: (−4)² − 4(2)(−6) = 16 + 48 = 64. Then x = (4 ± 8) ÷ 4, so x = 3 or x = −1.
x² + 4x + 4 = 0 (a = 1, b = 4, c = 4)
= x = -2
Discriminant: 16 − 16 = 0, so there is one repeated solution, x = −2.
x² + x + 1 = 0 (a = 1, b = 1, c = 1)
= No real solutions
Discriminant: 1 − 4 = −3, which is negative, so there are no real solutions.
Frequently asked questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) ÷ 2a. It solves any quadratic equation ax² + bx + c = 0 with a ≠ 0.
What does the discriminant tell me?
b² − 4ac shows how many real solutions exist: two if it is positive, one if it is zero and none if it is negative.
Why does the calculator say "No real solutions"?
The discriminant is negative, so the square root in the formula is not a real number. The equation has two complex solutions, which this calculator does not display.
Can a be zero?
No. If a is 0 the equation is linear, not quadratic. Solve it as bx + c = 0 instead, or use the math solver.
Are the answers rounded?
Solutions that are not whole numbers are shown to up to four decimal places.