How to Solve Quadratic Equations: Factoring, Completing the Square and the Formula

Three methods solve every quadratic equation. Learn when each one is fastest, how the discriminant predicts the answers, and how to check your roots.

A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0, and there are three standard ways to solve it: factoring, completing the square, and the quadratic formula. Factoring is fastest when it works. The quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a, always works. Completing the square is the method the formula comes from, and it reveals the parabola’s vertex.

Before using any method, rearrange the equation so one side is zero and the terms are in order: x² term, x term, constant. For example, 3x² = 4x + 2 becomes 3x² − 4x − 2 = 0, so a = 3, b = −4 and c = −2.

Method 1: Factoring

Factoring rewrites the quadratic as a product of two binomials, then uses the zero product property: if A × B = 0, then A = 0 or B = 0.

When a = 1: find two numbers that multiply to c and add to b.

x² − 5x + 6 = 0

Two numbers with product 6 and sum −5: −2 and −3

(x − 2)(x − 3) = 0 → x = 2 or x = 3

When a ≠ 1: use the AC method. Multiply a × c, find two numbers with that product and a sum of b, split the middle term, and factor by grouping.

2x² + 7x + 3 = 0 → ac = 6; numbers 6 and 1 (product 6, sum 7)

2x² + 6x + x + 3 = 2x(x + 3) + 1(x + 3) = (2x + 1)(x + 3) = 0

x = −1/2 or x = −3

The diamond problem solver finds the product-and-sum pair, and how to factor trinomials covers the technique in depth.

Special cases that factor instantly

  • No constant term: x² − 5x = 0 → x(x − 5) = 0 → x = 0 or 5.
  • No x term: x² − 49 = 0 → x² = 49 → x = ±7. Take the square root of both sides and remember both signs.
  • Perfect square: x² − 6x + 9 = 0 → (x − 3)² = 0 → x = 3, a repeated root.

Factoring with integers only works when the discriminant (below) is a perfect square. If you cannot find the pair within a minute, switch methods.

Method 2: Completing the square

Completing the square turns the left side into a perfect square, so you can solve by taking a square root.

  1. If a ≠ 1, divide every term by a.
  2. Move the constant to the right side.
  3. Add (b/2)² to both sides.
  4. Write the left side as (x + b/2)².
  5. Take the square root of both sides, with ±, and solve.

x² + 6x − 7 = 0 → x² + 6x = 7

(6/2)² = 9 → x² + 6x + 9 = 16

(x + 3)² = 16 → x + 3 = ±4

x = 1 or x = −7

With a leading coefficient: 2x² − 8x − 10 = 0. Divide by 2 to get x² − 4x − 5 = 0, so x² − 4x + 4 = 9, (x − 2)² = 9, x − 2 = ±3, and x = 5 or −1.

The same process converts a quadratic to vertex form, y = a(x − h)² + k, whose vertex (h, k) is the parabola’s highest or lowest point. The completing the square calculator shows each step.

Method 3: The quadratic formula

Completing the square on the general equation ax² + bx + c = 0 produces a formula that solves every quadratic:

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

3x² − 4x − 2 = 0: a = 3, b = −4, c = −2

b² − 4ac = 16 − 4(3)(−2) = 16 + 24 = 40

x = (4 ± √40) ÷ 6 = (2 ± √10) ÷ 3

x ≈ 1.7208 or x ≈ −0.3874

Two habits prevent most errors. Write a, b and c with their signs before substituting, and put negative values in parentheses: −b when b = −4 is +4, and b² is (−4)² = 16, not −16. The simplification √40 = 2√10 is explained in how to simplify square roots.

The discriminant: predict the answer first

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

Discriminant Solutions Graph of y = ax² + bx + c
D > 0, perfect square Two rational roots (factorable) Crosses the x-axis twice
D > 0, not a perfect square Two irrational roots Crosses the x-axis twice
D = 0 One repeated real root Touches the x-axis at the vertex
D < 0 Two complex roots Never touches the x-axis

A complex example: x² + 2x + 5 = 0 has D = 4 − 20 = −16. The formula still works using i = √−1: x = (−2 ± 4i) ÷ 2 = −1 ± 2i.

Which method should you use?

Situation Best method
Small integers, D is a perfect square Factoring
No x term (b = 0) Square root method
No constant (c = 0) Factor out x
Need vertex form or a = 1 with even b Completing the square
Anything else, decimals, large numbers Quadratic formula

Checking your answers

Two quick checks catch nearly every mistake:

  • Substitute each root back into the original equation. For x = 2 in x² − 5x + 6: 4 − 10 + 6 = 0 ✓.
  • Use Vieta’s formulas. The two roots always add to −b/a and multiply to c/a. For 3x² − 4x − 2 = 0, the roots should sum to 4/3 ≈ 1.333 and multiply to −2/3. Indeed 1.7208 + (−0.3874) = 1.3334.
x1 + x2 = −b/a   ·   x1 × x2 = c/a

The FOIL calculator multiplies your factors back out to confirm a factoring.

Equations that are quadratic in disguise

Some higher-degree equations become quadratics with a substitution. In x⁴ − 13x² + 36 = 0, let u = x². The equation becomes u² − 13u + 36 = 0, which factors as (u − 4)(u − 9) = 0, so u = 4 or u = 9. Undo the substitution: x² = 4 gives x = ±2, and x² = 9 gives x = ±3, for four solutions in all. The same trick works for equations in √x, eˣ or any repeated expression. True cubics need different tools, such as the cubic equation calculator.

A real-world example

A ball is thrown upward from 5 feet with a speed of 48 feet per second. Its height after t seconds is h = −16t² + 48t + 5. When does it hit the ground?

Set h = 0: −16t² + 48t + 5 = 0, or 16t² − 48t − 5 = 0

D = (−48)² − 4(16)(−5) = 2,304 + 320 = 2,624; √2,624 ≈ 51.225

t = (48 ± 51.225) ÷ 32 → t ≈ 3.10 s (the negative root, −0.10 s, is before the throw)

The vertex is at t = −b/2a = 48/32 = 1.5 s, when the ball peaks at −16(1.5)² + 48(1.5) + 5 = 41 feet. Physical problems often produce one root that makes no sense in context, so always ask whether each answer is possible. The projectile motion calculator solves this kind of problem with air resistance ignored.

For any equation, the quadratic formula calculator shows the discriminant, exact roots and decimal approximations together.

Frequently asked questions

What is the quadratic formula?

For an equation in the form ax² + bx + c = 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a. It works for every quadratic equation, including ones that cannot be factored.

Which method should I use to solve a quadratic equation?

Try factoring first if the numbers are small integers, because it is fastest. If there is no b term, take square roots. If factoring is not obvious, use the quadratic formula. Completing the square is most useful for rewriting a quadratic in vertex form.

What does the discriminant tell you?

The discriminant, b² − 4ac, tells you how many real solutions there are before you solve. Positive means two real solutions, zero means one repeated solution, and negative means no real solutions but two complex ones.

Can a quadratic equation have no solution?

It always has two solutions in the complex numbers, counting a repeated root twice. It has no real solutions when the discriminant is negative, which means its graph, a parabola, never crosses the x-axis.

Why must one side equal zero before factoring?

Factoring relies on the zero product property: if two factors multiply to zero, one of them must be zero. That only works with zero on one side. If (x − 2)(x − 3) = 6, you cannot conclude anything about either factor on its own.