Completing the square
Completing the square rewrites a quadratic so that it contains a perfect square, like (x + 3)². That makes it easy to solve the equation, find the vertex of the parabola, and see where the quadratic formula comes from.
How to complete the square
Take half the coefficient of x, square it, then add it and subtract it. For x² + 6x + 5:
- Halve the x coefficient: half of 6 is 3.
- Square it: 3² = 9.
- Add and subtract 9: x² + 6x + 9 − 9 + 5.
- Write the perfect square: x² + 6x + 9 = (x + 3)².
- Tidy up the rest: (x + 3)² − 4.
Since we added and subtracted the same number, the value hasn’t changed. Only its form has.
Why it’s called “completing the square”
Picture x² + 6x as a shape: an x-by-x square, and a 6-by-x rectangle. Cut the rectangle in half and put a piece on two sides of the square. You now have a larger square with a corner missing, and that missing corner measures 3 × 3 = 9. Adding 9 literally completes the square, giving a side of x + 3.
Solving a quadratic equation
Solve x² + 6x + 5 = 0:
- Complete the square: (x + 3)² − 4 = 0.
- Move the constant: (x + 3)² = 4.
- Take square roots, keeping both signs: x + 3 = ±2.
- Solve each: x = −1 or x = −5.
When a isn’t 1
Factor a out of the x terms first. For 2x² + 8x + 3:
- Factor 2 from the first two terms: 2(x² + 4x) + 3.
- Inside the bracket, half of 4 is 2, and 2² = 4.
- Add and subtract 4 inside: 2(x² + 4x + 4 − 4) + 3.
- Write the perfect square: 2((x + 2)² − 4) + 3.
- Multiply out and combine: 2(x + 2)² − 8 + 3 = 2(x + 2)² − 5.
The most common mistake is forgetting that the 2 outside multiplies the −4 inside, giving −8. The completing the square calculator shows these steps for any values.
When b is odd
Fractions appear, but the method is the same. For x² + 5x + 1:
- Half of 5 is 5/2, and (5/2)² = 25/4.
- Add and subtract: (x + 5/2)² − 25/4 + 1.
- Combine: (x + 5/2)² − 21/4.
Finding the vertex
The completed form is exactly vertex form, y = a(x − h)² + k, with the vertex at (h, k). So 2(x + 2)² − 5 has its vertex at (−2, −5), which is its lowest point. A square is never negative, so y is smallest when the bracket is zero. This is the quickest way to find a maximum or minimum without calculus.
When should you use it?
- When you need vertex form, or the maximum or minimum of a quadratic.
- When the x coefficient is even and a = 1, so there are no fractions.
- For circles: x² + y² + 4x − 6y = 3 becomes (x + 2)² + (y − 3)² = 16 by completing the square twice, which gives the centre and radius.
- In calculus, for integrals of fractions with a quadratic on the bottom.
Frequently asked questions
What does it mean to complete the square?
What number do you add to complete the square?
How do you complete the square when a isn’t 1?
Why add and subtract the same number?
Is completing the square better than the quadratic formula?
Keep going
Steps for your own quadratic.
Completing the square, done once with letters.
What the result tells you.
Completing the square in x and y.
The vertex directly from a, b and c.
Check your answer by multiplying it out.
Every figure on this page opens in ihateDesmos, where you can drag sliders and watch the graph respond.