How to use the quadratic equation solver
- Write your equation in standard form, ax² + bx + c = 0, with everything on one side and 0 on the other.
- Type the three coefficients a, b and c. A missing term has coefficient 0, and a minus sign belongs to the number: in x² − 3x + 2 = 0, b is −3.
- Press Solve. The roots appear first, followed by numbered steps, a graph and a table of key features.
The quadratic formula
Every quadratic equation ax² + bx + c = 0 (with a ≠ 0) can be solved with one formula:
x = (−b ± √(b² − 4ac)) / (2a)
The “±” means there are usually two answers: one using plus and one using minus. The formula comes from completing the square on the general equation, so it always works — even when the equation cannot be factored.
What the discriminant tells you
The expression under the square root, D = b² − 4ac, is called the discriminant. Calculate it first, because it tells you what kind of answers to expect:
| Discriminant | Roots | Graph |
|---|---|---|
| D > 0 | two different real roots | crosses the x-axis twice |
| D = 0 | one repeated (double) root | touches the x-axis at the vertex |
| D < 0 | two complex roots a ± bi | never reaches the x-axis |
If D is a perfect square (1, 4, 9, 16, …) and the coefficients are whole numbers, the roots are rational and the quadratic can be factored — try it in the factoring calculator.
Worked examples
Two rational roots: x² − 3x + 2 = 0. Here a = 1, b = −3, c = 2, so D = (−3)² − 4·1·2 = 9 − 8 = 1. Then x = (3 ± √1)/2 = (3 ± 1)/2, which gives x = 2 or x = 1. Factored form: (x − 2)(x − 1).
Irrational roots: x² − 3x + 1 = 0. D = 9 − 4 = 5, which is not a perfect square, so the exact answer keeps the radical: x = (3 ± √5)/2, about 2.618 and 0.382.
Complex roots: x² + 2x + 5 = 0. D = 4 − 20 = −16. Since √(−16) = 4i, x = (−2 ± 4i)/2 = −1 ± 2i.
Simplifying the exact answer
To leave an answer in simplest radical form, pull any perfect-square factor out of the square root and then cancel common factors. For 2x² + 4x − 4 = 0, D = 48 and √48 = √(16·3) = 4√3, so x = (−4 ± 4√3)/4 = −1 ± √3. Our square root calculator shows this simplification on its own.
Vertex, axis of symmetry and the graph
The graph of y = ax² + bx + c is a parabola. It opens upward when a is positive and downward when a is negative. Its turning point, the vertex, is at
x = −b / (2a), with the y-value found by substituting that x back in.
The vertical line through the vertex is the axis of symmetry; the two roots sit the same distance either side of it. The y-intercept is simply (0, c). The roots of the equation are the x-intercepts of the parabola, so you can read the answers straight off the graph.
Other ways to solve a quadratic
- Factoring: fastest when the roots are rational. If (x − 2)(x − 1) = 0 then x = 2 or x = 1.
- Square roots: when b = 0, isolate x² and take ± the square root: x² = 9 gives x = ±3.
- Completing the square: rewrite as a(x − h)² + k = 0. This is also how the vertex form is found.
If your equation has no x² term at all, it is linear — use the linear equation solver.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0 with a not equal to 0, x = (−b ± √(b² − 4ac)) / (2a). Substitute the three coefficients, simplify the square root, then work out the plus and minus versions separately.
What does the discriminant tell you?
The discriminant is D = b² − 4ac. If D is positive there are two real roots, if D is zero there is one repeated root, and if D is negative there are two complex roots and the parabola does not cross the x-axis.
Can a quadratic equation have no solution?
It always has two roots counting repeats, but they may not be real numbers. When the discriminant is negative there are no real solutions; the answers are complex numbers of the form a ± bi.
How do I find the vertex of a parabola?
The x-coordinate of the vertex is −b / (2a). Substitute that value into ax² + bx + c to get the y-coordinate. For y = x² − 3x + 2 the vertex is (1.5, −0.25).
Why can’t a be zero?
If a = 0 the x² term disappears and the equation becomes bx + c = 0, which is linear and has only one solution. The quadratic formula would also divide by zero.
Does the solver give exact answers?
Yes. Roots are given as integers, simplified fractions or simplified radicals such as (3 ± √5)/2, together with decimal approximations rounded to six decimal places.