How to solve quadratic equations
A quadratic equation has the form ax² + bx + c = 0. This guide shows how to solve it by factoring when the numbers are friendly and with the quadratic formula when they are not, and how the discriminant tells you what kind of answer to expect.
The short version
- Write it in standard form. Move everything to one side so the equation equals 0, then read a, b and c.
- Compute the discriminant. D = b² − 4ac.
- Apply the formula. x = (−b ± √D) ÷ 2a. The ± gives the two roots.
- Simplify and check. Reduce any square root and substitute your roots back into the equation.
Skip the arithmetic. The free Quadratic Formula Calculator does this for you, shows the formula and the working with your own numbers, and runs in your browser - nothing you type is uploaded. Also useful: System of Equations Solver, Slope Calculator.
By factoring
If you can spot two numbers that multiply to c and add to b, factor directly. For x² − 5x + 6 = 0 the numbers are −2 and −3, so (x − 2)(x − 3) = 0 and x = 2 or x = 3. Factoring is fast but only works neatly when the roots are rational.
By the quadratic formula
The formula always works. Solve 2x² + 4x − 1 = 0, where a = 2, b = 4 and c = −1:
What the discriminant tells you
- D > 0 and a perfect square: two rational roots, and the quadratic factors.
- D > 0, not a perfect square: two irrational roots, left with a square root in exact form.
- D = 0: one repeated root; the parabola touches the x-axis once.
- D < 0: no real roots; the roots are a pair of complex numbers. For x² + 2x + 5 = 0: D = 4 − 20 = −16, √−16 = 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.
The vertex
The graph of y = ax² + bx + c is a parabola. Its vertex is at x = −b ÷ 2a, and the y-value there is found by substituting. For x² − 6x + 5 the vertex is at x = 3, y = 9 − 18 + 5 = −4, so (3, −4). If a is positive the parabola opens upwards and the vertex is its lowest point; if a is negative it is the highest.
Mistakes to avoid
- Forgetting the ± and giving only one root.
- Getting the sign of −b wrong when b is already negative: for b = −5, −b = +5.
- Dividing only part of the numerator by 2a. The whole numerator is divided.
- Treating the equation as quadratic when a = 0. Then it is linear, bx + c = 0, and the formula would divide by zero.