← All math guides · Open the calculator

How to Solve Quadratic Equations

Four methods that always work, when to use each one, and how to check your answer.

A quadratic equation is any equation that can be written as ax² + bx + c = 0, where a is not zero. Its graph is a parabola, and the solutions (also called roots or zeros) are the x-values where that parabola crosses the x-axis. A quadratic has at most two real solutions, and there are four standard ways to find them.

Method 1: Factoring

Factoring is the fastest method when the numbers are friendly. Rewrite the left side as a product of two brackets, then use the zero product rule: if two things multiply to zero, at least one of them must be zero.

Example: Solve x² − 5x + 6 = 0.

Look for two numbers that multiply to 6 and add to −5. Those are −2 and −3, so the equation becomes (x − 2)(x − 3) = 0.

Either x − 2 = 0 or x − 3 = 0, so x = 2 or x = 3.

Try it in CasCalc →

When a is not 1, factoring takes one more step. For 2x² + 3x − 2 = 0, the factors are (2x − 1)(x + 2) = 0, which gives x = 1/2 or x = −2. If you cannot find the factors within a minute, switch to the quadratic formula.

Method 2: The quadratic formula

The quadratic formula solves every quadratic equation, including ones that do not factor nicely:

x = (−b ± √(b² − 4ac)) / (2a)

Example: Solve x² + 4x − 1 = 0.

Here a = 1, b = 4 and c = −1. Then b² − 4ac = 16 + 4 = 20, and √20 = 2√5.

x = (−4 ± 2√5) / 2, so x = −2 + √5 ≈ 0.236 or x = −2 − √5 ≈ −4.236.

Try it in CasCalc →

A common mistake is forgetting that the whole top, not just the square root, is divided by 2a. Another is losing the sign of c: when c is negative, −4ac becomes positive.

Method 3: Completing the square

Completing the square rewrites the equation so that one side is a perfect square. It is also how the quadratic formula is derived, and it is the method to use when you need the vertex of the parabola.

Example: Solve x² + 6x + 5 = 0.

Move the constant: x² + 6x = −5. Take half of 6, which is 3, and square it to get 9. Add 9 to both sides: x² + 6x + 9 = 4.

The left side is now (x + 3)², so (x + 3)² = 4 and x + 3 = ±2. That gives x = −1 or x = −5.

Try it in CasCalc →

Method 4: Graphing

Graph y = ax² + bx + c and read off where the curve meets the x-axis. Graphing is a great way to check an answer or to see how many solutions to expect before doing any algebra. In CasCalc, typing an equation in x both solves it and marks the roots on the graph, so you get the exact answer and the picture together.

Graph y = x² − 5x + 6 →

How many solutions? The discriminant

The expression under the square root, D = b² − 4ac, is called the discriminant. It tells you what kind of answers to expect before you solve:

DiscriminantSolutionsGraph
D > 0Two different real solutionsCrosses the x-axis twice
D = 0One repeated real solutionTouches the x-axis once
D < 0No real solutions (two complex ones)Never meets the x-axis

Example: For x² + 2x + 5 = 0, D = 4 − 20 = −16, which is negative. There are no real solutions. Using the formula with complex numbers gives x = −1 ± 2i.

Try it in CasCalc →

Which method should you use?

Always check your answer

Substitute each solution back into the original equation. For x = 3 in the first example: 3² − 5·3 + 6 = 9 − 15 + 6 = 0. It works. Checking takes ten seconds and catches most sign errors.

CasCalc · Math guides · About · Privacy