Quadratic equation solver with steps
Solve ax² + bx + c = 0 for real or complex roots. Shows the discriminant, vertex, axis of symmetry, factored form and a parabola graph.
- Runs in your browser
- Nothing you enter is sent
- Free, no account
1x² − 3x − 10 = 0
Two real roots
Discriminant (b² − 4ac)
49
Vertex
(1.5, -12.25)
minimum point
Axis of symmetry
x = 1.5
y-intercept
(0, -10)
Factored form
(x + 2)(x − 5)
Vertex form
1(x − 1.5)² − 12.25
Sum of roots (−b/a)
3
Product of roots (c/a)
-10
Step-by-step working
Identify the coefficients.
a = 1, b = -3, c = -10Equation: x² − 3x − 10 = 0
Compute the discriminant, which decides what kind of roots exist.
Δ = b² − 4ac = (-3)² − 4(1)(-10) = 49Δ > 0 → two distinct real roots, so the parabola crosses the x-axis twice.
Put the numbers into the quadratic formula.
x = (−b ± √Δ) / 2a = (3 ± √49) / 2Take the square root of the discriminant.
√49 = 7Evaluate the plus branch and the minus branch.
x₁ = (3 + 7) / 2 = 5 x₂ = (3 − 7) / 2 = -2Complete the square to reach vertex form.
1(x − 1.5)² − 12.25Factor a out of the first two terms, halve the resulting x-coefficient (b/2a = -1.5) and square it; h = −b/2a = 1.5 and k = f(h) = -12.25.
Read the vertex and the axis of symmetry off the vertex form.
vertex = (1.5, -12.25) axis of symmetry: x = 1.5a > 0, so the parabola opens upward and the vertex is the minimum.
Write the factored form from the roots.
x² − 3x − 10 = (x + 2)(x − 5)
How to use the solver
Rearrange your equation into the form ax² + bx + c = 0, then enter the three coefficients. If your equation looks like 2x² + 5x = 12, move everything to one side first: 2x² + 5x − 12 = 0, so a = 2, b = 5 and c = −12. A missing term means a coefficient of zero — x² − 9 = 0 has b = 0.
The solver updates as you type and shows the discriminant, both roots, the vertex, the axis of symmetry, the factored form, the completed-square form and a graph drawn to scale.
The quadratic formula
x = ( −b ± √(b² − 4ac) ) ÷ 2a
It comes from completing the square on the general equation, which is why the solver shows the vertex form as one of its steps — the two are the same piece of algebra viewed from different ends.
What the discriminant tells you
| Discriminant Δ = b² − 4ac | Roots | The graph |
|---|---|---|
| Δ > 0 | Two distinct real roots | Crosses the x-axis twice |
| Δ = 0 | One repeated real root | Touches the x-axis at the vertex |
| Δ < 0 | Two complex conjugate roots | Never meets the x-axis |
A further test: if Δ is a perfect square and a, b and c are integers, the roots are rational and the quadratic factors neatly over the integers. If Δ is positive but not a perfect square, the roots are irrational and involve a surd.
Vertex, axis of symmetry and completing the square
Every parabola is symmetric about the vertical line x = −b ÷ 2a. That line passes through the vertex, so h = −b ÷ 2a and k = f(h). Rewriting the equation as a(x − h)² + k is “completing the square”, and it makes both values obvious. When a is positive the parabola opens upward and k is the minimum value of the expression; when a is negative it opens downward and k is the maximum. That is exactly how quadratic optimisation problems — maximum revenue, maximum height of a projectile — get solved.
Complex roots are still roots
When Δ is negative, √Δ is an imaginary number, and the two solutions are p ± qi with p = −b ÷ 2a and q = √(−Δ) ÷ 2|a|. They always arrive as a conjugate pair for real coefficients. Their sum is still −b/a and their product is still c/a, both real, which is a good sanity check. Reporting “no solution” here is only correct if the question is restricted to real numbers; the solver gives you the complex pair and says so.
Vieta’s formulas — a quick check
For any quadratic, the two roots satisfy r₁ + r₂ = −b ÷ a and r₁ × r₂ = c ÷ a. Both are shown in the results grid. If you have found roots by factoring and they fail these two identities, the factorisation is wrong.
Worked examples
- x² − 3x − 10 = 0 — Δ = 9 + 40 = 49, a perfect square, so x = (3 ± 7) ÷ 2 = 5 or −2, and the equation factors as (x − 5)(x + 2).
- x² + 4x + 4 = 0 — Δ = 16 − 16 = 0, so there is one repeated root at x = −2 and the factored form is (x + 2)².
- x² + x + 1 = 0 — Δ = 1 − 4 = −3, so the roots are −0.5 ± 0.8660i and the parabola sits entirely above the x-axis.
- 2x² − 4x − 6 = 0 — divide through by 2 first if you prefer: x² − 2x − 3 = 0 gives x = 3 or −1, the same answer the solver reports.
When a = 0
With no x² term the equation is linear, and the quadratic formula divides by zero. The solver detects this and solves bx + c = 0 instead, explaining why. If a and b are both zero there is either no solution or every value of x is a solution, depending on c, and the tool says which.
Accuracy
Roots are computed in double-precision floating point and displayed to ten significant places. For equations where b² is very much larger than 4ac, the standard formula loses precision on one root through cancellation; if you are working at that scale, compute one root with the formula and the other as c ÷ (a·r₁). Everything runs locally in your browser.
Questions
What does the discriminant tell me?
b² − 4ac decides the root type: positive gives two distinct real roots, zero gives one repeated real root, negative gives a conjugate pair of complex roots. The value is shown before the roots.
Does it show complex roots?
Yes. When the discriminant is negative the roots are given in exact a ± bi form rather than reported as "no solution", and the graph shows the parabola missing the x-axis.
Can I see the completed-square form?
Yes. Every solve includes the vertex form a(x − h)² + k with h and k derived line by line, which is also where the vertex and axis of symmetry come from.
What if a is zero?
Then the equation is linear, not quadratic. The solver detects that and solves bx + c = 0 instead, telling you why the quadratic formula does not apply.