Skip to content

Completing the Square Explained: Steps, Examples and Why It Works

By Sprout Calculator Editorial Team Bylines · Published November 5, 2026 · Updated November 6, 2026

Completing the square rewrites a quadratic as a perfect square plus a constant. For x² + bx, add (b/2)² to make (x + b/2)². Use it to solve equations, to convert ax² + bx + c into vertex form a(x − h)² + k, and to derive the quadratic formula.

What does completing the square mean?

Completing the square is an algebra technique that turns a quadratic expression into a perfect square plus a constant. A perfect square trinomial looks like this:

x2+2px+p2=(x+p)2x^2 + 2px + p^2 = (x + p)^2

Given x² + 6x, you are missing the last term. Adding 9 gives x² + 6x + 9 = (x + 3)². The missing term is 9 because it is the square of half the middle coefficient: (6/2)² = 3² = 9.

The rule: to complete the square on x² + bx, add (b/2)².

This technique is used to solve equations that do not factor, to find the vertex of a parabola, to work with circle equations and to derive the quadratic formula. For the broader menu of methods, see our guide to solving quadratic equations.

How does the geometry work?

Picture x² + bx as a square of side x with a rectangle of width b and height x attached. Cut the rectangle in half lengthwise, giving two strips of size (b/2) by x. Attach one strip to the right side of the square and one to the top. This leaves an empty corner of size (b/2) by (b/2).

Filling the corner gives a bigger square with side x + b/2. Its area is (x + b/2)² = x² + bx + (b/2)². So the "missing piece" you add is (b/2)². The picture explains the name.

How do you complete the square to solve an equation?

Follow these steps for x² + bx + c = 0 when the leading coefficient is 1:

  1. Move the constant to the right side: x² + bx = −c.
  2. Add (b/2)² to both sides.
  3. Write the left side as a square: (x + b/2)² = (b/2)² − c.
  4. Take square roots of both sides, using ±.
  5. Solve for x.

Example: x² + 8x + 5 = 0.

  1. x² + 8x = −5.
  2. (8/2)² = 16. Add 16 to both sides: x² + 8x + 16 = 11.
  3. (x + 4)² = 11.
  4. x + 4 = ±√11.
  5. x = −4 ± √11, about −0.68 and −7.32.

This quadratic does not factor over the integers, but completing the square solves it exactly.

Example with a negative middle term: x² − 10x + 21 = 0.

x² − 10x = −21. Half of −10 is −5, and its square is 25. So (x − 5)² = 4, and x − 5 = ±2, giving x = 7 or x = 3.

What if the leading coefficient is not 1?

Divide the whole equation by a first, or factor a out of the x terms.

Example: 2x² + 12x − 14 = 0.

Divide by 2: x² + 6x − 7 = 0. Then x² + 6x = 7, add 9: (x + 3)² = 16, so x = −3 ± 4, which gives x = 1 or x = −7.

Example: 3x² − 6x − 1 = 0.

Divide by 3: x² − 2x − 1/3 = 0. Then x² − 2x = 1/3. Add 1 to both sides: (x − 1)² = 4/3. So x = 1 ± √(4/3) = 1 ± 2/√3, or about 2.15 and −0.15. You may need to handle fractions, which is where the fraction guide helps.

How do you find the vertex form?

To rewrite y = ax² + bx + c as y = a(x − h)² + k, complete the square on the expression and keep the equation balanced by adding and subtracting the same amount.

Example: y = x² − 6x + 5.

Take half of −6 to get −3, and square it to get 9. Add and subtract 9:

y = (x² − 6x + 9) − 9 + 5 = (x − 3)² − 4.

The vertex is (3, −4). Since the coefficient is positive, the parabola opens up and −4 is the minimum value.

Example with a ≠ 1: y = 2x² + 8x + 5.

Factor 2 from the first two terms: y = 2(x² + 4x) + 5. Half of 4 is 2, and 2² = 4. Add and subtract 4 inside the bracket, remembering that the 4 you add inside is multiplied by 2:

y = 2(x² + 4x + 4 − 4) + 5 = 2(x + 2)² − 8 + 5 = 2(x + 2)² − 3.

The vertex is (−2, −3).

A shortcut gives the vertex directly: h = −b/(2a) and k = y(h). For y = 2x² + 8x + 5, h = −8/4 = −2, and k = 2(4) − 16 + 5 = −3. Both methods agree.

How does completing the square give the quadratic formula?

Apply the steps to the general equation ax² + bx + c = 0.

  1. Divide by a: x² + (b/a)x + c/a = 0.
  2. Move the constant: x² + (b/a)x = −c/a.
  3. Add (b/2a)² to both sides: x² + (b/a)x + b²/(4a²) = b²/(4a²) − c/a.
  4. Write the left as a square and combine the right: (x + b/2a)² = (b² − 4ac)/(4a²).
  5. Take roots: x + b/2a = ±√(b² − 4ac) / 2a.
  6. Solve: x = (−b ± √(b² − 4ac)) / 2a.

That is the quadratic formula. It is simply completing the square done once for every quadratic.

What about circles?

The equation of a circle is (x − h)² + (y − k)² = r², where (h, k) is the center and r is the radius. If a circle is given in expanded form, complete the square in both variables to find the center and radius.

Example: x² + y² − 4x + 6y − 12 = 0.

Group: (x² − 4x) + (y² + 6y) = 12. Complete each: add 4 and 9 to both sides. (x − 2)² + (y + 3)² = 25. The center is (2, −3) and the radius is 5. The circle calculator works with radius, diameter, circumference and area once you have these.

What mistakes should you avoid?

  • Adding to one side only. Whatever you add to complete the square, you must also add to (or subtract from) the other side.
  • Forgetting to halve b. The term to add is (b/2)², not b².
  • Dropping the a multiplier when a ≠ 1. Anything added inside a bracket multiplied by a changes the total by a times that amount.
  • Sign errors. If b is negative, the bracket is (x − something).
  • Leaving out ± when taking roots.
  • Stopping before solving. Isolate x at the end.

A check is to expand your final bracket. (x − 3)² − 4 expands to x² − 6x + 5, which matches the original. The quadratic equation calculator can confirm roots too. With practice, the steps become automatic: halve, square, add, factor.

How can you use the vertex form to find a maximum or minimum?

Vertex form makes optimization problems easy, because the squared bracket is never negative. In y = a(x − h)² + k with a > 0, the smallest value of the bracket is 0 at x = h, so the minimum of y is k. If a < 0, the same reasoning gives a maximum of k.

Example. A ball is thrown and its height in meters after t seconds is h = −5t² + 20t + 1. Factor out −5 from the t terms: h = −5(t² − 4t) + 1. Half of −4 is −2, and (−2)² = 4, so h = −5(t² − 4t + 4 − 4) + 1 = −5(t − 2)² + 20 + 1 = −5(t − 2)² + 21. The ball reaches its maximum height of 21 m after 2 seconds. Reading that from the original form would have taken more work, which is why completing the square is a practical skill.

FAQ

Frequently asked questions

01Why is it called completing the square?

Geometrically, x squared plus bx is a square of side x plus a rectangle. Splitting the rectangle in two and placing the halves along the sides leaves a missing corner. Adding a small square of area (b/2) squared fills that corner and completes a bigger square.

02What do I do when the coefficient of x squared is not 1?

Factor that coefficient out of the x squared and x terms first, then complete the square inside the brackets. For 2x squared plus 8x plus 5, write 2 times (x squared plus 4x) plus 5, add and subtract 4 inside, and tidy up to get 2(x + 2) squared minus 3.

03What is vertex form and why is it useful?

Vertex form is y = a(x − h)² + k, where the vertex of the parabola is the point (h, k). It shows the turning point directly, so you can read the minimum or maximum value and the axis of symmetry without graphing.

04When should I complete the square instead of using the quadratic formula?

Complete the square when you need vertex form, when the x coefficient is even, or when you are deriving the quadratic formula itself. For just the roots of a messy equation, the formula is usually faster and less error-prone.

05What if the coefficient of x² is not 1?

Divide every term by that coefficient first, or factor it out of the x terms. For 2x² + 8x + 3, write 2(x² + 4x) + 3, complete the square inside to get 2((x + 2)² − 4) + 3, which simplifies to 2(x + 2)² − 5.