How to Complete the Square

Complete the square in four steps, with worked examples for a = 1, a ≠ 1, odd b and fractions, plus the sign mistakes that cost marks on tests.

How to Complete the Square

You have a quadratic like ax² + bx + c and need to rewrite it as a(x − h)² + k. That is how to complete the square. It reveals the vertex of a parabola, solves equations, and is the algebraic backbone of the quadratic formula and certain integrals. Here is how to do it, step by step, well enough to pass a test.

The method relies on the identity (x + h)² = x² + 2hx + h². You reverse-engineer h from the coefficient of x. The honest version is that completing the square is a bookkeeping trick that trades a messy middle term for a perfect square. The thing newcomers most often get wrong is thinking you add and subtract the same number to the whole expression, when you actually add and subtract it inside the parentheses, which changes the constant term by a factor of a when a ≠ 1.

The Four Steps to Complete the Square

These four steps work for any quadratic in standard form ax² + bx + c = 0.

Step 1: Factor Out a If a ≠ 1

Rewrite as a(x² + (b/a)x) + c. Leave the constant c outside the parentheses.

Step 2: Halve the Coefficient, Square It, Add and Subtract

For x² + (b/a)x, half is (b/(2a)), and its square is (b/(2a))². You now have a[x² + (b/a)x + (b/(2a))² − (b/(2a))²] + c.

Step 3: Group the Perfect Square

The first three terms factor as (x + b/(2a))². Write a[(x + b/(2a))² − (b/(2a))²] + c.

Step 4: Distribute a and Combine Constants

Multiply a through: a(x + b/(2a))² − a·(b/(2a))² + c. Simplify the constant term to c − b²/(4a). The result is a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a). Note the sign flip: (x + b/(2a)) becomes (x − h) because h is negative of that value.

Example: a = 1, Even b

Take x² + 6x + 5 = 0.

Since a = 1, skip step 1. The coefficient of x is 6. Half is 3, square is 9. Add and subtract inside: x² + 6x + 9 − 9 + 5 = 0. Group: (x + 3)² − 9 + 5 = 0 → (x + 3)² − 4 = 0. Vertex form is (x + 3)² − 4. So a = 1, h = −3, k = −4. The vertex is (−3, −4). Solving gives x = −1 and x = −5.

Example: Odd b (Fractions)

Odd b introduces fractions. Consider x² + 5x + 6 = 0.

a = 1, so no factoring. The coefficient of x is 5. Half is 5/2 = 2.5. Square is (5/2)² = 25/4. Add and subtract: x² + 5x + 25/4 − 25/4 + 6 = 0. Group: (x + 5/2)² − 25/4 + 6 = 0. Convert 6 to 24/4, so −25/4 + 24/4 = −1/4. The vertex form is (x + 5/2)² − 1/4 = 0. Vertex is (−5/2, −1/4). Solving gives x = −2 and x = −3. The fraction in the middle step is the place where students freeze. Keep everything as exact fractions; do not convert to decimals.

Example: a ≠ 1 (Factor Out a)

Take 2x² + 8x − 10 = 0.

Step 1: a = 2, factor out: 2(x² + 4x) − 10 = 0.

Step 2: Inside x² + 4x, half of 4 is 2, square is 4. Add and subtract: 2(x² + 4x + 4 − 4) − 10 = 0.

Step 3: Group: 2[(x + 2)² − 4] − 10 = 0.

Step 4: Distribute: 2(x + 2)² − 8 − 10 = 0 → 2(x + 2)² − 18 = 0. Vertex form is 2(x + 2)² − 18. Vertex is (−2, −18). Solving gives x = 1 and x = −5. The error most students make here is forgetting to multiply the subtracted square by a: the −4 inside becomes −8 after distribution, not −4.

Example: Negative a

Negative a follows the same steps, but the sign of the vertex changes direction. Take −3x² + 6x + 9 = 0.

Step 1: Factor out −3: −3(x² − 2x) + 9 = 0. Note the sign of the x-term flips inside.

Step 2: Inside x² − 2x, half of −2 is −1, square is 1. Add and subtract: −3(x² − 2x + 1 − 1) + 9 = 0.

Step 3: Group: −3[(x − 1)² − 1] + 9 = 0.

Step 4: Distribute: −3(x − 1)² + 3 + 9 = 0 → −3(x − 1)² + 12 = 0. Vertex form is −3(x − 1)² + 12. Vertex is (1, 12). The parabola opens downward because a is negative.

Common Mistakes and How to Avoid Them

The failure cases for completing the square follow a pattern. Here is what goes wrong and how to catch it.

  • Forgetting to factor out a when a ≠ 1. If you skip step 1, the vertex's y-coordinate will be wrong. Always check for a factor before halving the coefficient.
  • Sign errors when halving and squaring. Square after halving, not before. Halve b, then square the result. Watch the sign of b, especially when b is negative or when a has been factored out.
  • Neglecting to multiply the subtracted square by a. In step 4, the term a·(b/(2a))² becomes b²/(4a). Forgetting the factor a shifts the vertex by the same factor. This is the most common error in the a ≠ 1 case.
  • Mishandling the constant sign when moving it. When solving an equation, what you add to one side you must add to the other. When rewriting an expression, you add and subtract inside the parentheses. Mixing these up ruins the balance.
  • Confusing the sign of h in vertex form. Vertex form is a(x − h)² + k. The sign inside the parentheses is opposite the vertex's x-coordinate. If you have (x + 3)², then h = −3. Write it as (x − (−3))² if it helps.

The single most error-prone step is the half-the-coefficient rule. On a test, write the halved value and its square as separate lines before adding them in. This prevents the compressed-step mistake.

Common Questions

What is the difference between completing the square and factoring?

Factoring splits the middle term to find roots directly. Completing the square rewrites the whole expression as a(x − h)² + k, which reveals the vertex. Factoring works only for factorable quadratics; completing the square works for all of them.

Why do I add and subtract the same number inside the parentheses?

You are adding zero in a disguised form. Adding (b/2)² and subtracting it inside the parentheses creates a perfect square trinomial without changing the value of the expression. This is the trick that makes the method work.

What do I do when b is odd?

Keep the fraction. Halve b: if b = 5, half is 5/2. Square it: (5/2)² = 25/4. Write it as an exact fraction. Do not convert to a decimal until the final step, if at all. The arithmetic stays exact and the vertex coordinates remain rational.

When should I use the quadratic formula instead of completing the square?

Use the quadratic formula when you only need the roots and the coefficients are messy. Use completing the square when you need the vertex, the axis of symmetry, or when you are preparing for calculus integrals. The formula is faster for computation; the square is faster when you need the vertex anyway.