Quadratic Equation Solver
Enter the coefficients a, b, and c to solve ax² + bx + c = 0 — get the roots, discriminant, step-by-step substitution, and vertex instantly.
Enter a, b, and c above to solve the equation
Tap a card to copy the number
Show steps, discriminant & vertex
Solving a quadratic equation step by step
Any equation of the form ax² + bx + c = 0, with a not equal to zero, is a quadratic equation, and its solutions (also called roots or zeros) can always be found with the quadratic formula: x = (−b ± √(b² − 4ac)) / (2a). Enter your three coefficients above and this calculator plugs them into the formula, works out the discriminant, and shows the roots — along with every substitution step, so you can follow along or check homework.
Reading the discriminant
The expression under the square root, D = b² − 4ac, is called the discriminant, and its sign alone tells you what kind of roots to expect before you finish the arithmetic:
| Discriminant | Roots | What the parabola does |
|---|---|---|
| D > 0 | Two distinct real roots | Crosses the x-axis twice |
| D = 0 | One repeated real root (double root) | Touches the x-axis at its vertex |
| D < 0 | Two complex conjugate roots, a ± bi | Never touches the x-axis |
Example 1 — two real roots. x² − 5x + 6 = 0: a = 1, b = −5, c = 6, so D = 25 − 24 = 1. √1 = 1, giving x = (5 ± 1) / 2 — roots x₁ = 3 and x₂ = 2. Check: (x − 2)(x − 3) = x² − 5x + 6.
Example 2 — a repeated root. x² − 4x + 4 = 0: a = 1, b = −4, c = 4, so D = 16 − 16 = 0. There's exactly one root, x = 4 / 2 = 2 — a perfect square, since x² − 4x + 4 = (x − 2)².
Example 3 — complex roots. x² + 2x + 5 = 0: a = 1, b = 2, c = 5, so D = 4 − 20 = −16. Since D is negative, √−16 = 4i, giving x = (−2 ± 4i) / 2 = −1 ± 2i — the conjugate pair x₁ = −1 + 2i and x₂ = −1 − 2i.
Example 4 — a = 0 falls back to linear. 0x² + 3x − 9 = 0: with a = 0, the x² term vanishes and the equation is really 3x − 9 = 0, so x = 9 / 3 = 3. This calculator detects a = 0 automatically and switches to the linear solution rather than dividing by zero.
The vertex and axis of symmetry
Every parabola y = ax² + bx + c has a single turning point called the vertex, at (h, k) where h = −b / (2a) and k = c − b² / (4a). The vertical line x = h through that point is the parabola's axis of symmetry — the mirror line the two arms of the parabola are reflected across. For y = x² − 4x + 3, h = 4/2 = 2 and k = 3 − 16/4 = −1, so the vertex is (2, −1) and the axis of symmetry is x = 2. When D = 0, the vertex sits exactly on the x-axis, which is exactly why there's only one root in that case.
Common mistakes and quick tips
- Forgetting the ± sign: the square root in the formula always has two possible values, positive and negative, which is exactly why (in the normal case) a quadratic equation has two roots, not one.
- Sign errors on b: when b is already negative, −b becomes positive — for b = −5, −b = 5, not −5. Double-check this substitution, since it's the most common place mistakes creep in.
- Treating a = 0 as "no solution": a = 0 doesn't mean there's no answer — it means the equation isn't quadratic anymore. It becomes a linear equation with at most one root (or, in edge cases, no root or infinitely many), which this calculator handles automatically.
- Negative numbers under the root: a negative discriminant doesn't mean an error — it means the roots are complex numbers rather than points where the graph crosses the x-axis, which is a perfectly normal and useful result in algebra.
Sources & further reading
Frequently asked questions
What is the quadratic formula and how do I use it?
The quadratic formula solves any equation of the form ax² + bx + c = 0 (with a ≠ 0): x = (−b ± √(b² − 4ac)) / (2a). Plug in your three coefficients, compute the discriminant b² − 4ac under the square root, then apply the plus sign for one root and the minus sign for the other. This calculator does the substitution and arithmetic for you and shows every step, so you can check your own hand-worked answer or just get the result instantly.
What does the discriminant tell you about the roots?
The discriminant D = b² − 4ac tells you the nature of the roots before you even finish solving. If D is positive, the equation has two distinct real roots — the parabola crosses the x-axis twice. If D equals zero, there's exactly one repeated real root — the parabola's vertex sits right on the x-axis. If D is negative, there are no real roots; instead you get a pair of complex conjugate roots of the form a + bi and a − bi, and the parabola never touches the x-axis.
What happens when a = 0? Is it still a quadratic equation?
No — if a = 0, the x² term disappears and the equation becomes linear: bx + c = 0, which has at most one solution, x = −c/b. This calculator detects that automatically and switches to the linear solution. If a, b, and c are all 0, the equation is 0 = 0, true for every x (infinitely many solutions); if a = 0, b = 0, and c is not 0, the equation is a false statement like 0 = 5, so there's no solution at all.
What are complex roots, and what does 'a + bi' mean?
When the discriminant is negative, the square root of a negative number isn't a real number — it's an imaginary number, written using i, where i = √−1. The two roots then form a complex conjugate pair, written as a + bi and a − bi, where a is the real part (−b divided by 2a) and b is the imaginary part (the square root of the discriminant's absolute value, divided by 2a). Graphically, this means the parabola stays entirely above or entirely below the x-axis and never crosses it.
Are my coefficients sent to a server?
No. This quadratic equation solver runs entirely in your browser — the values of a, b, and c you enter never leave your device and nothing is uploaded or stored on a server. There's no sign-up and no tracking, so you can use it freely for homework, test prep, or quick checks with full privacy.