Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula. Get real or complex roots, the discriminant, exact form, vertex and full working.
Solve ax² + bx + c = 0
Working
Uses x = (−b ± √(b² − 4ac)) ÷ 2a. Gives real or complex roots, an exact form when a, b and c are whole numbers, and the vertex, axis of symmetry and intercepts of the parabola.
A quadratic formula calculator solves any equation of the form ax² + bx + c = 0 using x = (−b ± √(b² − 4ac)) ÷ 2a, and shows whether the roots are real or complex. Along with the solutions, it gives the discriminant, an exact answer with square roots when the coefficients are whole numbers, the factored form, the vertex, the axis of symmetry and the vertex form of the parabola, with every step of the working.
For example, x² − 3x + 2 = 0 has the solutions x = 1 and x = 2. The equation 2x² + 4x − 3 = 0 has the exact solutions x = (−2 ± √10) ÷ 2, which are about 0.581 and −2.581, and x² + 2x + 5 = 0 has the complex solutions x = −1 ± 2i.
Every quadratic equation ax² + bx + c = 0 with a ≠ 0 can be solved with one formula:
x = (−b ± √(b² − 4ac)) ÷ 2a
The ± sign means there are usually two answers: one using the plus sign and one using the minus sign. The formula always works, even when the equation can’t be factored neatly, which is why it’s one of the most widely used results in algebra.
The expression under the square root, D = b² − 4ac, is called the discriminant. It tells you what kind of solutions to expect before you finish the calculation:
| Discriminant | Solutions | Graph of y = ax² + bx + c |
|---|---|---|
| D > 0 | Two different real solutions | Crosses the x-axis twice |
| D = 0 | One repeated real solution | Touches the x-axis at the vertex |
| D < 0 | Two complex solutions, no real ones | Doesn’t touch the x-axis |
If the discriminant is a perfect square, such as 1, 4, 9 or 16, and a, b and c are whole numbers, the solutions are rational and the equation can be factored.
Solve x² − 3x + 2 = 0. Here a = 1, b = −3 and c = 2. The discriminant is (−3)² − 4 × 1 × 2 = 9 − 8 = 1. So x = (3 ± √1) ÷ 2 = (3 ± 1) ÷ 2, giving x = 2 and x = 1. The factored form is (x − 1)(x − 2).
Solve 2x² + 4x − 3 = 0. The discriminant is 4² − 4 × 2 × (−3) = 16 + 24 = 40. So x = (−4 ± √40) ÷ 4. Since √40 = 2√10, this simplifies to x = (−2 ± √10) ÷ 2, or about 0.581 and −2.581.
Solve x² − 4x + 4 = 0. The discriminant is 16 − 16 = 0, so there’s one solution: x = 4 ÷ 2 = 2. The equation is the perfect square (x − 2)² = 0.
Solve x² + 2x + 5 = 0. The discriminant is 4 − 20 = −16. The square root of −16 is 4i, where i is the imaginary unit with i² = −1. So x = (−2 ± 4i) ÷ 2 = −1 ± 2i.
The graph of y = ax² + bx + c is a U-shaped curve called a parabola. It opens upward when a is positive and downward when a is negative. Its turning point, the vertex, lies on the axis of symmetry x = −b ÷ 2a, exactly halfway between the two roots. Substituting this x-value back into the equation gives the y-coordinate of the vertex, which is the minimum value of the function when a > 0 and the maximum when a < 0.
The vertex form y = a(x − h)² + k shows the vertex (h, k) directly. For y = x² − 3x + 2, the vertex is at (1.5, −0.25), so the vertex form is y = (x − 1.5)² − 0.25. The y-intercept, where the curve crosses the y-axis, is always (0, c).
For any quadratic, the two roots x₁ and x₂ satisfy simple relationships, known as Vieta’s formulas: x₁ + x₂ = −b ÷ a and x₁ × x₂ = c ÷ a. They’re a quick way to check an answer. For x² − 3x + 2 = 0, the roots 1 and 2 add up to 3 = −(−3) ÷ 1 and multiply to 2 = 2 ÷ 1.
The quadratic formula works in every case, so it’s the safest choice when the numbers are awkward.
A ball thrown upward at 20 m/s from a height of 1.5 m follows h = −4.9t² + 20t + 1.5, where t is the time in seconds. Setting h = 0 and using the formula gives t ≈ 4.16 seconds, the time when the ball lands. The vertex gives the highest point: at t = 20 ÷ 9.8 ≈ 2.04 seconds, the ball reaches about 21.9 m.
A rectangle is 3 m longer than it is wide and has an area of 40 m². If the width is w, then w(w + 3) = 40, or w² + 3w − 40 = 0. The discriminant is 9 + 160 = 169, so w = (−3 ± 13) ÷ 2, giving w = 5 or w = −8. A width can’t be negative, so the rectangle is 5 m by 8 m.
Revenue and profit often follow quadratic curves, because raising a price increases income per sale but reduces the number of sales. The vertex shows the price that gives the highest revenue, and the roots show the break-even points.
For related questions, use the number sequence calculator to find the nth term and sum of a sequence, or the slope calculator to find the slope and equation of a line.
x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of any equation ax² + bx + c = 0 where a is not zero.
The discriminant b² − 4ac shows the number and type of solutions: positive means two real solutions, zero means one repeated solution, and negative means two complex solutions.
There are no real solutions. The solutions are complex numbers of the form p ± qi, and the parabola doesn't cross the x-axis.
If a = 0, the x² term disappears and the equation becomes linear, bx + c = 0, with the single solution x = −c ÷ b.
Rearrange the equation so one side is zero and the terms are in order: x², then x, then the constant. For 3x² = 5x − 2, rewrite it as 3x² − 5x + 2 = 0, so a = 3, b = −5 and c = 2.
Yes. It works for every quadratic equation, including ones that can't be factored with whole numbers and ones with complex roots.
The x-coordinate is −b ÷ 2a. Substitute it into the equation to get the y-coordinate. For x² − 3x + 2, the vertex is (1.5, −0.25).
Factor when you can quickly see two numbers that multiply to ac and add to b. If not, the quadratic formula is faster and never fails.
x = 3 and x = −3. Here b = 0, so you can simply take the square root of 9.
It comes from completing the square on ax² + bx + c = 0 and then solving for x.
Yes. Enter values such as 0.5, −1.25 or 1/2. Exact square-root answers are shown when a, b and c are whole numbers.
It means plus or minus. Work out the formula once with + and once with − to get the two solutions.
Substitute each solution into ax² + bx + c. The result should be zero, allowing for small rounding differences.