
Completing the square turns x² + bx into a perfect square by adding (b ÷ 2)², so x² + bx + (b/2)² = (x + b/2)². To solve x² + 6x + 5 = 0, move the 5, add (6 ÷ 2)² = 9 to both sides to get (x + 3)² = 4, then take the square root: x + 3 = ±2, so x = −1 or x = −5.
In short: Halve the x coefficient, square it, and add it to both sides. The left side becomes (x + half)², and you finish by taking a square root.
In this guide
The Key Formula
x² + bx + (b/2)² = (x + b/2)²
The number you add is always the square of half the x coefficient. For x² + 6x add 3² = 9; for x² − 10x add (−5)² = 25; for x² + 5x add (5/2)² = 25/4.

That picture is where the name comes from: x² and two strips of 3x form a square with one corner missing, and that corner is exactly (b/2)².
How to Solve a Quadratic Equation by Completing the Square
- Make the x² coefficient 1. If it is not, divide every term by it.
- Move the constant to the right side.
- Add (b ÷ 2)² to both sides.
- Write the left side as (x + b/2)² and simplify the right side.
- Take the square root of both sides and remember ±.
- Solve for x and check in the original equation.
Worked Examples
Example: Whole-number answers: x² + 6x + 5 = 0. Move 5: x² + 6x = −5. Add 9: (x + 3)² = 4. Square root: x + 3 = ±2. So x = −1 or x = −5. Check: (−1)² + 6(−1) + 5 = 0 ✓.
Example: Answers with a square root: x² − 4x − 3 = 0. Move 3: x² − 4x = 3. Add (−2)² = 4: (x − 2)² = 7. So x = 2 ± √7 (about 4.646 and −0.646). Factoring cannot find these, which is where completing the square helps.
Example: Odd b: x² + 5x − 6 = 0. Move 6: x² + 5x = 6. Add 25/4: (x + 5/2)² = 49/4. Square root: x + 5/2 = ±7/2. So x = 1 or x = −6.
When a Is Not 1
Divide every term by a first, then follow the same steps.
Example: 2x² + 8x − 10 = 0. Divide by 2: x² + 4x − 5 = 0. Move 5: x² + 4x = 5. Add 4: (x + 2)² = 9. So x + 2 = ±3, giving x = 1 or x = −5.
When There Is No Real Solution
Example: x² + 2x + 5 = 0. Move 5 and add 1: (x + 1)² = −4. No real number squared is negative, so there is no real solution. With imaginary numbers the answers are x = −1 ± 2i.
Vertex Form of a Parabola
Completing the square also rewrites y = ax² + bx + c as y = a(x − h)² + k, where (h, k) is the vertex (the lowest or highest point).
Example: y = x² − 6x + 11. Half of −6 is −3, and (−3)² = 9. Add and subtract 9: y = (x² − 6x + 9) − 9 + 11 = (x − 3)² + 2. The vertex is (3, 2).
Example: y = 2x² + 12x + 7. Factor 2 from the x terms: y = 2(x² + 6x) + 7. Inside, add and subtract 9: y = 2(x + 3)² − 18 + 7 = 2(x + 3)² − 11. The vertex is (−3, −11).
How It Leads to the Quadratic Formula
Complete the square on ax² + bx + c = 0 with letters instead of numbers. Divide by a, move c/a, add (b/2a)² to both sides, and take the square root. The result is the quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a. So the formula is completing the square done once for every equation.
Which Method Should You Use?
| Method | Best when | Example |
|---|---|---|
| Factoring | The numbers factor easily | x² + 6x + 5 = (x + 1)(x + 5) |
| Completing the square | a = 1 and b is even, or you need vertex form | x² − 4x − 3 = 0 → x = 2 ± √7 |
| Quadratic formula | Any quadratic, especially messy numbers | 3x² + 7x − 2 = 0 |
For more on the first method, see factoring polynomials.
Common Mistakes
- Adding (b/2)² to one side only. It must go on both sides to keep the equation balanced.
- Forgetting ± when taking the square root, which loses one answer.
- Not dividing by a first. The (b/2)² rule only works when the x² coefficient is 1.
- Adding b/2 instead of (b/2)². For x² + 6x you add 9, not 3.
- Sign of half of b. x² − 4x becomes (x − 2)², not (x + 2)².
Practice Problems (With Answers)
1. Solve x² + 8x + 12 = 0 by completing the square.
x² + 8x = −12. Add 16: (x + 4)² = 4. So x + 4 = ±2: x = −2 or x = −6.
2. Solve x² − 2x − 8 = 0.
x² − 2x = 8. Add 1: (x − 1)² = 9. So x − 1 = ±3: x = 4 or x = −2.
3. Solve x² + 6x − 2 = 0.
x² + 6x = 2. Add 9: (x + 3)² = 11. So x = −3 ± √11.
4. Write y = x² + 4x + 1 in vertex form.
Add and subtract 4: y = (x + 2)² − 4 + 1 = (x + 2)² − 3. Vertex (−2, −3).
5. Solve 3x² − 12x + 9 = 0.
Divide by 3: x² − 4x + 3 = 0. x² − 4x = −3. Add 4: (x − 2)² = 1. So x = 3 or x = 1.
FAQ
What does completing the square mean?
It means adding (b ÷ 2)² to x² + bx so it becomes a perfect square, (x + b/2)². For x² + 6x, you add 9 to get (x + 3)².
How do you solve an equation by completing the square?
Make the x² coefficient 1, move the constant, add (b/2)² to both sides, write the left side as a square, take the square root with ±, and solve. x² + 6x + 5 = 0 gives x = −1 or −5.
What if the coefficient of x² is not 1?
Divide every term by that coefficient first. For 2x² + 8x − 10 = 0, divide by 2 to get x² + 4x − 5 = 0, then complete the square.
Is completing the square the same as the quadratic formula?
They give the same answers. The quadratic formula is what you get when you complete the square on ax² + bx + c = 0 in general.
How do you find the vertex by completing the square?
Rewrite y = ax² + bx + c as y = a(x − h)² + k. The vertex is (h, k). For y = x² − 6x + 11 = (x − 3)² + 2, the vertex is (3, 2).
Sources and Further Reading
- OpenStax, Intermediate Algebra 2e, Section 9.2: Solve Quadratic Equations by Completing the Square, Rice University.
- OpenStax, Elementary Algebra, Section 10.2: Solve Quadratic Equations by Completing the Square.
Related: quadratic formula, factoring polynomials, square roots and cube roots, linear inequalities, the math glossary and all free math calculators.
Check your working in seconds
Type any problem from this guide into the free CalcSolver calculator and see the answer, with fractions, instantly.


