Quadratic Equation Solver Step by Step
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator solves any quadratic equation of the form ax² + bx + c = 0 and shows each step of the solution. You enter the coefficients a, b, and c, and you get the real or complex roots, the discriminant, and the step-by-step working using the quadratic formula.
Formula
The quadratic formula solves any equation of the form ax² + bx + c = 0, where a, b, and c are real numbers and a ≠ 0:
x = (−b ± √(b² − 4ac)) / (2a)
- a – coefficient of x² (must not be zero)
- b – coefficient of x
- c – constant term
- Δ = b² − 4ac – the discriminant, which determines the nature of the roots
The ± symbol means you compute two values: one with a plus sign and one with a minus sign. Those two values are the roots (solutions) of the equation.
Worked Example
Using the default values from the calculator: a = 1, b = −3, c = 2.
- Write the formula: x = (−b ± √(b² − 4ac)) / (2a)
- Substitute the values: x = (−(−3) ± √((−3)² − 4·1·2)) / (2·1)
- Simplify inside the square root: (−3)² = 9, and 4·1·2 = 8, so 9 − 8 = 1
- Take the square root: √1 = 1
- Compute the two roots: x = (3 ± 1) / 2
- First root: (3 + 1) / 2 = 4 / 2 = 2
- Second root: (3 − 1) / 2 = 2 / 2 = 1
The calculator shows the same result: x₁ = 2, x₂ = 1, and the discriminant Δ = 1.
How to Read the Discriminant
The discriminant (Δ = b² − 4ac) tells you what kind of roots to expect before you finish the calculation:
- Δ > 0: two distinct real roots. The parabola crosses the x-axis at two points.
- Δ = 0: exactly one real root (a repeated root). The parabola just touches the x-axis at its vertex.
- Δ < 0: no real roots; two complex conjugate roots. The parabola never touches the x-axis.
In the example, Δ = 1 > 0, so there are two real roots, which matches what we found.
When to Use the Quadratic Formula
Use the quadratic formula when you have a quadratic equation that cannot be easily factored or when you need exact answers. It works for every quadratic equation, unlike factoring, which only works for nice integer roots. You can also use it to find the roots of a quadratic function when graphing, to solve projectile motion problems, or to find break-even points in business calculations.
If the equation is not in standard form (ax² + bx + c = 0), rearrange it first. For example, 2x² = 8 − 4x becomes 2x² + 4x − 8 = 0, so a = 2, b = 4, c = −8.
Common Mistakes and How to Avoid Them
- Sign errors with b: When b is negative, the formula has −b, which becomes positive. Double-check that you flip the sign correctly.
- Forgetting the denominator: The entire numerator is divided by 2a, not just the square root part. Write it as ( −b ± √(…) ) / (2a) with parentheses.
- Mixing up a and c: a is the coefficient of x², c is the constant term. Swapping them changes the answer completely.
- Rounding too early: Keep several decimal places during intermediate steps, then round at the end. Rounding the square root too early can change the final roots noticeably.
- Ignoring complex roots: If the discriminant is negative, the equation still has two complex roots. Don’t stop and say “no solution” – write them as a ± bi.
Limits of the Quadratic Formula
The quadratic formula assumes a ≠ 0. If a = 0, the equation is linear, not quadratic, and the formula would involve division by zero. Also, the formula gives the roots of the equation ax² + bx + c = 0, but it does not give the vertex, axis of symmetry, or other graph features – those require separate formulas. For very large or very small coefficients, numerical precision can be an issue, but for typical school problems this is not a concern.
Alternatives to the Quadratic Formula
- Factoring: Works when the roots are integers or simple fractions. For x² − 3x + 2 = 0, you can factor to (x − 1)(x − 2) = 0, giving x = 1 and x = 2.
- Completing the square: Rewrites the equation as (x + p)² = q, then take the square root of both sides. Useful when you need the vertex form.
- Graphing: The x-intercepts of the parabola are the roots. This gives approximate answers, not exact ones.
All methods give the same roots; the quadratic formula is the most general and reliable.
Frequently Asked Questions
What if the discriminant is negative?
If Δ < 0, there are no real roots, but there are two complex conjugate roots. For example, x² + 1 = 0 gives Δ = −4, and the roots are x = i and x = −i. The calculator will output complex numbers in the form a + bi.
Can I use the quadratic formula for any quadratic equation?
Yes, as long as a ≠ 0. The quadratic formula works for every quadratic equation, whether the roots are real, repeated, or complex. It is the most general method.
How do I find the vertex from the quadratic formula?
The x-coordinate of the vertex is −b/(2a). The y-coordinate is found by plugging that x back into the original equation. The quadratic formula itself gives roots, not the vertex.
What does “double root” mean?
A double root occurs when Δ = 0. The equation has one distinct solution, but it counts twice. For example, x² − 2x + 1 = 0 has root x = 1 twice. The parabola touches the x-axis at exactly one point.
Why do I get two answers?
Because a quadratic equation is degree 2, it has at most two solutions. The ± in the formula produces two values: one from adding the square root and one from subtracting it. If the discriminant is zero, both values are the same.
Related
Formula used
in a | Coefficient a | - | 1 | 0 in b | Coefficient b | - | -3 | 0 in c | Coefficient c | - | 2 | 0 out x1 | First root | - | (-b + sqrt(b^2 - 4*a*c)) / (2*a) | 4 out x2 | Second root | - | (-b - sqrt(b^2 - 4*a*c)) / (2*a) | 4 out disc | Discriminant | - | b^2 - 4*a*c | 1
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.