Quadratic Formula Calculator
This quadratic formula calculator solves ax² + bx + c = 0 and shows every step. For 2x² + 4x − 4 = 0 the discriminant is 48 and the roots are x = −1 ± √3, about 0.732 and −2.732.
Sources: OpenStax Algebra and Trigonometry 2e Updated
Solutions of x2 − 3x + 2 = 0
x = 2 or x = 1
Two real solutions.
- Discriminant
- 1
- Vertex
- (1.5, −0.25)
- Opens
- upward (a is positive)
Show steps Here’s how we got it
Read off a, b and c
x2 − 3x + 2 = 0
a = 1, b = −3, c = 2
The equation has to be in the form ax2 + bx + c = 0.
Work out the discriminant
b2 − 4ac = (−3)2 − 4 × 1 × 2
= 9 − 8 = 1
It is positive, so there are two different real solutions.
Put the numbers into the quadratic formula
x = −b ± √(b2 − 4ac)/2a = 3 ± √1/2
Take the square root, then use + and − in turn
√1 = 1
x1 = 3 + 1/2 = 4/2 = 2
x2 = 3 − 1/2 = 2/2 = 1
Check one solution
1 × 22 + (−3) × 2 + 2 = 0
Putting a solution back into the equation should give 0.
The quadratic formula
The part under the square root, , is the discriminant. Work it out first: as OpenStax Algebra and Trigonometry explains, it tells you how many solutions to expect before you do the rest.
| Discriminant | Solutions | Graph |
|---|---|---|
| Positive | Two different real solutions | Crosses the x-axis twice |
| Zero | One repeated real solution | Touches the x-axis at the vertex |
| Negative | Two complex solutions | Never meets the x-axis |
The vertex of the parabola is at , halfway between the two solutions when they are real.
How to solve a quadratic equation with the formula
Solve 2x² + 4x − 4 = 0. The discriminant is not a perfect square, so the exact answers contain a square root.
Read off a, b and c
2x2 + 4x − 4 = 0
a = 2, b = 4, c = −4
The equation has to be in the form ax2 + bx + c = 0.
Work out the discriminant
b2 − 4ac = 42 − 4 × 2 × (−4)
= 16 − (−32) = 48
It is positive, so there are two different real solutions.
Put the numbers into the quadratic formula
x = −b ± √(b2 − 4ac)/2a = −4 ± √48/4
Take the square root, then use + and − in turn
√48 = 4√3 ≈ 6.928203
x = −1 ± √3 (exact form)
x1 = −4 + 6.928203/4 ≈ 0.732051
x2 = −4 − 6.928203/4 ≈ −2.732051
Check one solution
2 × 0.7320512 + 4 × 0.732051 + (−4) ≈ 0
Putting a solution back into the equation should give 0 (here only approximately, because the solution is rounded).
Answer: x ≈ 0.732051 or x ≈ −2.732051 Two real solutions.
The exact answer simplifies because √48 = √(16 × 3) = 4√3, and 4√3 ÷ 4 = √3. The square root calculator simplifies roots like this for any whole number.
What the discriminant does to the graph
Keep a = 2 and b = 4 from the example and change only c. The parabola keeps its shape and moves up as c grows, and the discriminant 16 − 8c falls with it.
At c = 2 the parabola just touches the axis at x = −1, the single repeated root. To draw your own equations, use the graph generator.
Factoring instead of the formula
When the roots are whole numbers, factoring is often quicker. For x² + x − 6 = 0, look for two numbers that multiply to −6 and add to 1: 3 and −2, so (x + 3)(x − 2) = 0 and x = −3 or x = 2. The factor calculator lists the factor pairs to try.
The formula works every time, including when the roots are irrational or complex, which is why the calculator always uses it.
Quadratic formula practice question
Solve x² − 5x + 6 = 0 with the quadratic formula.
Check your answer
Answer: x = 3 or x = 2 Two real solutions.
Read off a, b and c
x2 − 5x + 6 = 0
a = 1, b = −5, c = 6
The equation has to be in the form ax2 + bx + c = 0.
Work out the discriminant
b2 − 4ac = (−5)2 − 4 × 1 × 6
= 25 − 24 = 1
It is positive, so there are two different real solutions.
Put the numbers into the quadratic formula
x = −b ± √(b2 − 4ac)/2a = 5 ± √1/2
Take the square root, then use + and − in turn
√1 = 1
x1 = 5 + 1/2 = 6/2 = 3
x2 = 5 − 1/2 = 4/2 = 2
Check one solution
1 × 32 + (−5) × 3 + 6 = 0
Putting a solution back into the equation should give 0.
Questions about the quadratic formula
What is the quadratic formula?
For an equation ax² + bx + c = 0 with a not equal to 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a. The ± means you work it out twice, once with plus and once with minus.
How do you use the quadratic formula?
Write the equation so that one side is 0, read off a, b and c, work out b² − 4ac and take its square root. Then calculate (−b plus the root) ÷ 2a and (−b minus the root) ÷ 2a.
For x² − 3x + 2 = 0: the discriminant is 9 − 8 = 1, so x = (3 + 1) ÷ 2 = 2 or x = (3 − 1) ÷ 2 = 1.
What does the discriminant tell you?
The discriminant is b² − 4ac. If it is positive there are two different real solutions. If it is zero there is one repeated real solution. If it is negative there are no real solutions, only two complex ones.
Can the quadratic formula give imaginary numbers?
Yes, when the discriminant b² − 4ac is negative. The square root of a negative number is written with i, where i² = −1, so the two solutions are a complex pair. For x² + 2x + 5 = 0 the discriminant is −16 and x = −1 ± 2i, and the graph of the parabola does not cross the x-axis.
What if a is 0?
Then there is no x² term and the equation is linear, bx + c = 0, with the single solution x = −c ÷ b. The quadratic formula does not apply because it would divide by zero.
What is the difference between the quadratic equation and the quadratic formula?
The quadratic equation is the problem, ax² + bx + c = 0. The quadratic formula is one way to solve it. Factoring and completing the square are others, and they give the same solutions.
Sources
- OpenStax Algebra and Trigonometry 2e, 2.5 Quadratic Equations — the quadratic formula and what the discriminant says about the solutions (checked October 12, 2026)