Quadratic equation solver
Enter a, b and c of ax² + bx + c = 0 and get the solutions with every step: the discriminant, the quadratic formula, the vertex of the parabola and, where possible, the factorised form.
For ax² + bx + c = 0.
Fill in the fields; the answer appears here straight away.
How it's worked out
How it works
-
Enter the values
Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.
-
Instant answer
The answer appears as you type, with the most important intermediate values.
-
See the working
Under "How it's worked out" you see the steps, handy for checking your own calculation.
The quadratic formula
x = (−b ± √D) / 2a, where the discriminant D = b² − 4ac.
- D > 0: two real solutions (the parabola crosses the x-axis twice).
- D = 0: exactly one solution (the vertex touches the x-axis).
- D < 0: no real solutions, but two complex ones, such as 1 ± 2i.
For x² − 5x + 6 = 0: D = 25 − 24 = 1, so x = (5 ± 1) / 2, giving x = 2 or x = 3, and the factorised form is (x − 2)(x − 3).
a = 0?
Then it isn't a quadratic equation but a linear one, bx + c = 0, and the calculator solves that instead. For several equations with several unknowns, use the system of equations solver.
More worked examples
| Equation | D | Solutions |
|---|---|---|
| x² − 5x + 6 = 0 | 1 | x = 2 or x = 3 |
| x² + 2x + 1 = 0 | 0 | x = −1 |
| 2x² − 3x − 2 = 0 | 25 | x = −0.5 or x = 2 |
| x² + 2x + 5 = 0 | −16 | −1 ± 2i |
A ball in the air
The height of a ball thrown upwards at 20 m/s from 1.5 m is h = −4.9t² + 20t + 1.5. When does it land? Set h = 0 and enter a = −4.9, b = 20 and c = 1.5. D = 400 + 29.4 = 429.4, and the positive solution is t ≈ 4.16 seconds. The other solution, about −0.07 s, is before the throw and is ignored.
A rectangle with a given area
A rectangle has a perimeter of 40 m and an area of 91 m². With width w, the length is 20 − w, so w(20 − w) = 91, which is w² − 20w + 91 = 0. Then D = 400 − 364 = 36 and w = 7 or w = 13: the same rectangle seen from both sides.
Beyond quadratic
If a = 0 the equation is linear and is solved as such. For equations with several unknowns, use the system of equations solver, and for the slope of the parabola at a point, the derivative calculator.
Frequently asked questions
What does the discriminant tell me?
Its sign tells you how many real solutions there are: positive means two, zero means one, negative means none. 25 − 24 = 1 for x² − 5x + 6 = 0, so there are two.
What are complex solutions?
When D is negative, the equation has two solutions of the form p ± qi, with i = √−1. For x² + 2x + 5 = 0 they are −1 ± 2i. The parabola does not reach the x-axis.
Can a, b and c be fractions or decimals?
Yes. Enter them as 1/2 or 0.5, with a comma or a point. Negative numbers and small sums work as well.
How do I find the vertex?
It lies at x = −b ÷ 2a, and the height is c − b² ÷ 4a. For x² − 5x + 6 that is (2.5, −0.25), the lowest point of the parabola.