Quadratic Equation Solver (with Steps)
Enter the coefficients of ax² + bx + c = 0 and get the discriminant, both roots and the full working using the quadratic formula.
The quadratic formula
For any equation ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a.
What the discriminant tells you
- D = b² − 4ac > 0: two different real roots.
- D = 0: one repeated real root.
- D < 0: no real roots; two complex conjugate roots.
Worked example
Solve x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6. D = 25 − 24 = 1. So x = (5 ± 1) ÷ 2, giving x = 3 and x = 2. Check: 3² − 15 + 6 = 0.
More practice: Solved quadratic equation examples. For cubic, quartic and other equation types, use the Equations tool in the full Calvo calculator.
Sum and product of roots
For ax² + bx + c = 0 with roots α and β, the sum is α + β = −b/a and the product is αβ = c/a. This is a quick way to check an answer. For 2x² − 7x + 3 = 0, the discriminant is 49 − 24 = 25, so x = (7 ± 5) ÷ 4, giving x = 3 and x = 1/2. Sum = 3.5 = 7/2 and product = 1.5 = 3/2, which match −b/a and c/a.
Which method should I use?
| Method | Best when | Watch out for |
|---|---|---|
| Factorisation | Coefficients are small integers and the roots are rational | Slow or impossible when roots are irrational |
| Completing the square | You need the vertex form, or you want to derive the formula | Fractions when a ≠ 1; divide by a first |
| Quadratic formula | Always works, including complex roots | Sign of −b and dividing the whole numerator by 2a |
Example with complex roots
Solve x² + 2x + 5 = 0. Discriminant D = 4 − 20 = −16, which is negative, so the parabola never touches the x-axis and the roots are complex: x = (−2 ± √−16) ÷ 2 = −1 ± 2i.
Word problem
The length of a rectangle is 3 m more than its width and its area is 40 m². Let the width be x, so x(x + 3) = 40, which gives x² + 3x − 40 = 0. Factorising, (x + 8)(x − 5) = 0, so x = −8 or x = 5. A width cannot be negative, so the width is 5 m and the length is 8 m. Always reject roots that do not make sense in the context.
Where quadratics appear
Projectile height h = ut − ½gt² (time to hit the ground), profit and revenue models, areas and fencing problems, and the path of a thrown ball are all quadratic equations. The vertex at x = −b/(2a) gives the maximum or minimum value.
Practice problems
1. Solve x² − 5x + 6 = 0.
(x − 2)(x − 3) = 0, so x = 2 or x = 3.
2. Solve x² + 4x + 4 = 0.
D = 16 − 16 = 0, so there is one repeated root: x = −2.
3. For which k does x² + kx + 9 = 0 have equal roots?
Equal roots need D = 0: k² − 36 = 0, so k = 6 or k = −6.
One slip causes most lost marks here: forgetting that −b changes sign when b is negative. Rewrite a, b and c on separate lines before you substitute.
FAQ
How do I solve a quadratic equation?
Write it as ax² + bx + c = 0, compute the discriminant b² − 4ac, then apply x = (−b ± √D) / 2a.
What if the discriminant is negative?
Then the equation has no real solutions. It has two complex roots of the form p ± qi.
What if a = 0?
Then it is not quadratic. It becomes the linear equation bx + c = 0 with solution x = −c/b.
Can I use decimals or fractions?
Yes, decimals and negative numbers work. Convert fractions to decimals first.
More Calvo tools
Want to see the parabola? Plot it in the Function Grapher