How to solve quadratic equations

By Math Questions Hub Team Updated September 7, 2026

Written for algebra 1 and algebra 2 students, and for anyone reviewing quadratics before the SAT, ACT, or a placement test.

Quick answer

A quadratic equation ax² + bx + c = 0 can be solved by factoring when the numbers cooperate, or with the quadratic formula, x = (-b ± √(b² - 4ac)) / 2a, which works every time. Most quadratics have two solutions, one solution, or no real solution, depending on the discriminant.

A quadratic equation is any equation that can be written in the formax² + bx + c = 0, where a, b, and c are numbers and a is never 0 (if a were 0, the x² term would vanish and it would just be a linear equation). Examples includex² - 5x + 6 = 0, 2x² + 3x - 2 = 0, and x² - 9 = 0. Unlike a linear equation, which has exactly one solution, a quadratic equation typically has two.

There are three standard ways to solve one: factoring, the quadratic formula, and completing the square. This guide focuses on the first two, since between them they cover every quadratic equation you'll meet in a typical algebra course, and shows how to read the discriminant to know what kind of answer to expect before you even finish solving.

Method 1: factoring

Factoring rewrites ax² + bx + c as a product of two binomials, then uses the zero product property: if two things multiply to zero, at least one of them has to be zero. This method is fastest when a, b, and c are small whole numbers that factor cleanly.

Worked example 1: a = 1

Solve x² - 5x + 6 = 0.

  1. Look for two numbers that multiply to 6 (the c term) and add to -5 (the b term). -2 and -3 work: (-2) × (-3) = 6 and (-2) + (-3) = -5.
  2. Write the factored form: (x - 2)(x - 3) = 0.
  3. Apply the zero product property: either x - 2 = 0 or x - 3 = 0, giving x = 2 or x = 3.
  4. Check both: (2)² - 5(2) + 6 = 4 - 10 + 6 = 0, and(3)² - 5(3) + 6 = 9 - 15 + 6 = 0. Both check out.

Worked example 2: a is not 1

Solve 2x² + 3x - 2 = 0.

  1. Multiply a and c: 2 × (-2) = -4. Look for two numbers that multiply to -4 and add to 3 (the b term). 4 and -1 work.
  2. Split the middle term using those two numbers: 2x² + 4x - x - 2 = 0.
  3. Group and factor each pair: 2x(x + 2) - 1(x + 2) = 0, which becomes(2x - 1)(x + 2) = 0.
  4. Set each factor to zero: 2x - 1 = 0 gives x = 1/2, andx + 2 = 0 gives x = -2.
  5. Check: 2(1/2)² + 3(1/2) - 2 = 0.5 + 1.5 - 2 = 0, and2(-2)² + 3(-2) - 2 = 8 - 6 - 2 = 0. Both correct.

Worked example 3: a difference of squares

Solve x² - 9 = 0.

  1. Recognize this as a difference of squares, x² - 3², which always factors as(x - 3)(x + 3).
  2. Set each factor to zero: x = 3 or x = -3.
  3. Check: 3² - 9 = 0 and (-3)² - 9 = 0. Both correct.

You can also solve x² - 9 = 0 even faster by adding 9 to both sides (x² = 9) and taking the square root of both sides, remembering both the positive and negative root: x = ±3. This shortcut works any time there's no middle (b) term.

Method 2: the quadratic formula

Not every quadratic factors neatly with whole numbers. The quadratic formula solvesax² + bx + c = 0 for any a, b, and c:

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

The ± symbol means you calculate the expression twice, once adding the square root and once subtracting it, which is where the two solutions of a quadratic usually come from.

Worked example: solving with the formula

Solve x² + 2x - 8 = 0 using the formula.

  1. Identify a = 1, b = 2, c = -8.
  2. Substitute into the formula: x = (-2 ± √(2² - 4(1)(-8))) / 2(1).
  3. Simplify inside the square root: 2² - 4(1)(-8) = 4 + 32 = 36, sox = (-2 ± √36) / 2.
  4. Since √36 = 6: x = (-2 + 6) / 2 = 2, orx = (-2 - 6) / 2 = -4.
  5. Check: (2)² + 2(2) - 8 = 4 + 4 - 8 = 0, and(-4)² + 2(-4) - 8 = 16 - 8 - 8 = 0. Both correct.

Notice this equation would also have factored quickly ((x + 4)(x - 2) = 0), so the formula and factoring agree, as they always will. The formula is most valuable when factoring isn't obvious or doesn't exist in whole numbers.

Worked example: irrational solutions

Solve x² - 4x - 1 = 0.

  1. Identify a = 1, b = -4, c = -1.
  2. Substitute: x = (4 ± √((-4)² - 4(1)(-1))) / 2(1) = (4 ± √(16 + 4)) / 2 = (4 ± √20) / 2.
  3. Simplify the radical: √20 = 2√5, so x = (4 ± 2√5) / 2 = 2 ± √5.
  4. This equation doesn't factor with whole numbers, which is exactly the situation the quadratic formula is built for. The two exact answers are x = 2 + √5 andx = 2 - √5, or approximately 4.24 and -0.24.

Reading the discriminant

The expression under the square root in the quadratic formula, b² - 4ac, is called the discriminant. You can compute it before finishing the rest of the formula to know what kind of answer to expect:

DiscriminantWhat it means
PositiveTwo different real solutions
ZeroExactly one real solution (a repeated root)
NegativeNo real solutions (two complex solutions)

For x² + 2x - 8 = 0 above, the discriminant was 36, a positive perfect square, which is why the answers came out as clean whole numbers. For x² - 4x - 1 = 0, the discriminant was 20, positive but not a perfect square, which is why the answers involved a radical instead.

Worked example: a negative discriminant

Solve x² + x + 1 = 0.

  1. Identify a = 1, b = 1, c = 1.
  2. Discriminant: 1² - 4(1)(1) = 1 - 4 = -3.
  3. Since the discriminant is negative, this equation has no real solutions. Its graph, a parabola opening upward, never crosses the x-axis. If your course covers complex numbers, the two solutions are x = (-1 ± i√3) / 2; otherwise, "no real solution" is the complete answer.

Common mistakes

  • Forgetting to set the equation to zero first. Factoring and the quadratic formula both require the form ax² + bx + c = 0. An equation likex² + 3x = 10 needs to become x² + 3x - 10 = 0 before you factor or apply the formula.
  • Dropping the negative sign on b. In the formula, it's -b, not b. If b is already negative, like in x² - 4x - 1 where b = -4, then -b becomes positive 4.
  • Only keeping one of the two solutions. Both the plus and minus versions of the ± are usually valid answers. Dropping one loses half the solution set.
  • Simplifying the square root incorrectly. √20 simplifies to2√5, not 10√2 or left as an unsimplified radical, when an exact answer is expected.
  • Trying to factor an equation that doesn't factor with whole numbers. If a few honest attempts at factoring don't produce whole-number pairs, switch to the quadratic formula instead of guessing indefinitely.

Where quadratics show up outside of class

Quadratic equations model anything where a quantity changes according to the square of another quantity: the height of a ball thrown into the air over time, the area of a rectangular space given a fixed perimeter, and the relationship between price and revenue when raising a price reduces the number of buyers. In each case, setting the equation equal to a target value and solving for the unknown is exactly the process worked through above.

Practice it yourself

Try the math solver with your own quadratic equation to see every step, including the discriminant, laid out automatically. For repeated practice, head toquadratic equation practice, or reviewlinear equations first if the balance principle behind moving terms across the equals sign still feels shaky.

Key takeaways

  • A quadratic equation is any equation that can be written as ax² + bx + c = 0, with a not equal to 0.
  • Factoring is the fastest method when the equation factors neatly with whole numbers.
  • The quadratic formula, x = (-b ± √(b² - 4ac)) / 2a, solves every quadratic equation, including ones that don't factor nicely.
  • The discriminant (b² - 4ac) tells you how many real solutions to expect before you finish solving.
  • Always check candidate solutions by substituting them back into the original equation.

Frequently asked questions

What is the quadratic formula?

The quadratic formula is x = (-b ± √(b² - 4ac)) / 2a. It solves any equation in the form ax² + bx + c = 0 by plugging in the values of a, b, and c directly, without needing to factor.

How do I know whether to factor or use the quadratic formula?

Try factoring first if a, b, and c are small whole numbers, since it's usually faster. If you can't find two numbers that multiply to a×c and add to b within a few tries, switch to the quadratic formula, which always works.

What does the discriminant tell you?

The discriminant is the part of the quadratic formula under the square root, b² - 4ac. If it's positive, the equation has two distinct real solutions. If it's zero, there's exactly one real solution (a repeated root). If it's negative, there are no real solutions, only complex ones.

Can a quadratic equation have no solution?

It can have no real-number solution when the discriminant is negative, because you'd be taking the square root of a negative number. It still has two complex solutions in that case, but those aren't part of most introductory algebra courses.

What if there's no c term, like in x² - 5x = 0?

Factor out the greatest common factor instead of using the full quadratic formula. x² - 5x = 0 factors to x(x - 5) = 0, which gives x = 0 or x = 5 immediately.

Why do quadratic equations usually have two answers?

A quadratic graphs as a parabola, a U-shaped curve, which can cross the x-axis at up to two points. Each crossing point is a solution, which is why factoring or the quadratic formula typically produces two values unless the parabola only touches the axis once or not at all.