PnP
Home/Blog/Completing the Square Explained Step by Step
Math Guides4 min read

Completing the Square Explained Step by Step

PennPaper Team

November 2, 2026 · Updated November 2, 2026

Completing the square rewrites a quadratic so one side is a perfect square like (x + 3)². Once it is in that shape, you can solve by taking a square root. It is also the method behind vertex form and the quadratic formula itself.

Quick idea

For x² + bx, adding (b/2)² makes a perfect square: x² + bx + (b/2)² = (x + b/2)². Add the same amount to both sides to keep the equation balanced.

Why it is called completing the square

Picture x2+6xx^2+6xx2+6x as a square of side xxx plus a 6×x6\times x6×x rectangle. Cut the rectangle in half and attach one 3×x3\times x3×x strip to the right side and one to the bottom. The shape is almost a big square of side x+3x+3x+3 — only a 3×33\times33×3 corner is missing.

Adding that missing corner, 32=93^2=932=9, literally completes the square:

x2+6x+9=(x+3)2x^2+6x+9=(x+3)^2x2+6x+9=(x+3)2

That is where the rule "take half of bbb and square it" comes from.

Steps

  1. Move the constant term to the right side. If a is not 1, divide every term by a first.
  2. Take half of b and square it.
  3. Add that number to both sides, then write the left side as a squared binomial.
  4. Take the square root of both sides (remember ±) and solve for x.

Worked example

Solve x² + 6x − 7 = 0 by completing the square.

Full solution

x2+6x=7⇒x2+6x+9=16⇒(x+3)2=16⇒x=1 or x=−7x^2+6x=7\quad\Rightarrow\quad x^2+6x+9=16\quad\Rightarrow\quad (x+3)^2=16\quad\Rightarrow\quad x=1\ \text{or}\ x=-7x2+6x=7⇒x2+6x+9=16⇒(x+3)2=16⇒x=1 or x=−7

Step-by-step walkthrough

Step 1

Add 7 to both sides so the x terms are alone on the left.

x2+6x=7x^2+6x=7x2+6x=7

Step 2

Half of 6 is 3, and 3² is 9. Add 9 to both sides: the right side becomes 16.

x2+6x+9=16x^2+6x+9=16x2+6x+9=16

Step 3

The left side is now the perfect square (x + 3)².

(x+3)2=16(x+3)^2=16(x+3)2=16

Step 4

Square root both sides: x + 3 = ±4, so x = 1 or x = −7.

x=1 or x=−7x=1\ \text{or}\ x=-7x=1 or x=−7

More worked examples

Example 2: A negative b

Solve x2−8x+12=0x^2-8x+12=0x2−8x+12=0.

Step 1. Move the constant.

x2−8x=−12x^2-8x=-12x2−8x=−12

Step 2. Half of −8 is −4, and (−4)² = 16. Add 16 to both sides.

x2−8x+16=4x^2-8x+16=4x2−8x+16=4

Step 3. Write as a square and take the square root.

(x−4)2=4 ⇒ x−4=±2(x-4)^2=4\ \Rightarrow\ x-4=\pm2(x−4)2=4 ⇒ x−4=±2

Answer: x=6x=6x=6 or x=2x=2x=2.

Example 3: Irrational answers

Solve x2+2x−2=0x^2+2x-2=0x2+2x−2=0.

Step 1. Move the constant.

x2+2x=2x^2+2x=2x2+2x=2

Step 2. Half of 2 is 1, and 1² = 1.

x2+2x+1=3 ⇒ (x+1)2=3x^2+2x+1=3\ \Rightarrow\ (x+1)^2=3x2+2x+1=3 ⇒ (x+1)2=3

Step 3. Square root both sides.

x+1=±3 ⇒ x=−1±3x+1=\pm\sqrt{3}\ \Rightarrow\ x=-1\pm\sqrt{3}x+1=±3​ ⇒ x=−1±3​

Answer: x=−1+3≈0.732x=-1+\sqrt{3}\approx0.732x=−1+3​≈0.732 or x=−1−3≈−2.732x=-1-\sqrt{3}\approx-2.732x=−1−3​≈−2.732.

Example 4: An odd b (fractions)

Solve x2+3x−4=0x^2+3x-4=0x2+3x−4=0.

Step 1. Move the constant, then add (3/2)² = 9/4.

x2+3x+94=4+94=254x^2+3x+\tfrac{9}{4}=4+\tfrac{9}{4}=\tfrac{25}{4}x2+3x+49​=4+49​=425​

Step 2. Write as a square and take the square root.

(x+32)2=254 ⇒ x+32=±52\left(x+\tfrac{3}{2}\right)^2=\tfrac{25}{4}\ \Rightarrow\ x+\tfrac{3}{2}=\pm\tfrac{5}{2}(x+23​)2=425​ ⇒ x+23​=±25​

Answer: x=1x=1x=1 or x=−4x=-4x=−4.

When a is not 1

Divide every term by aaa first so the x2x^2x2 coefficient is 1. Fractions are fine — keep them exact.

2x2+8x−10=0 ⇒ x2+4x−5=0 ⇒ (x+2)2=9 ⇒ x=1 or x=−52x^2+8x-10=0\ \Rightarrow\ x^2+4x-5=0\ \Rightarrow\ (x+2)^2=9\ \Rightarrow\ x=1\ \text{or}\ x=-52x2+8x−10=0 ⇒ x2+4x−5=0 ⇒ (x+2)2=9 ⇒ x=1 or x=−5

Completing the square to get vertex form

The same move converts y=ax2+bx+cy=ax^2+bx+cy=ax2+bx+c into vertex form y=a(x−h)2+ky=a(x-h)^2+ky=a(x−h)2+k. Instead of adding to both sides, add and subtract (b/2)2(b/2)^2(b/2)2 on the same side:

y=x2+6x+2=(x2+6x+9)−9+2=(x+3)2−7y=x^2+6x+2=(x^2+6x+9)-9+2=(x+3)^2-7y=x2+6x+2=(x2+6x+9)−9+2=(x+3)2−7

So the vertex is (−3,−7)(-3,-7)(−3,−7).

The quadratic formula is completing the square in disguise

Complete the square on the general equation ax2+bx+c=0ax^2+bx+c=0ax2+bx+c=0 and you arrive at x=−b±b2−4ac2ax=\frac{-b\pm\sqrt{b^2-4ac}}{2a}x=2a−b±b2−4ac​​. The full derivation is in The Quadratic Formula Explained. In practice, use completing the square when a=1a=1a=1 and bbb is even; otherwise the formula is usually faster.

Common mistakes to avoid

  • Add (b/2)² to both sides, not just the left. Adding it to one side only changes the equation and gives the wrong answers.
  • Adding b/2b/2b/2 instead of (b/2)2(b/2)^2(b/2)2. For x2+6xx^2+6xx2+6x you add 9, not 3.
  • Forgetting the ±\pm± when taking the square root, which loses one of the two solutions.
  • Completing the square before dividing by aaa. The rule only works when the x2x^2x2 coefficient is 1.

Practice problems

  1. Solve x² + 4x − 5 = 0 by completing the square.
  2. Solve x² − 8x + 12 = 0 by completing the square.
  3. Solve x² + 2x − 2 = 0 by completing the square.

Answers

  1. x = 1 or x = −5
  2. x = 6 or x = 2
  3. x = −1 ± √3

Frequently asked questions

What does completing the square mean?

It means adding a number to x² + bx so it becomes a perfect square trinomial, (x + b/2)². The number to add is (b/2)².

When should I use completing the square?

It is quickest when a = 1 and b is even, and it is the standard way to convert a quadratic into vertex form. For other equations the quadratic formula is usually faster.

Does completing the square always work?

Yes. It works for every quadratic equation, including ones with irrational or complex solutions. That is why the quadratic formula, which is derived from it, also always works.

Ask PennPaper to explain it live

If the steps make sense but you still feel stuck, start a PennPaper lesson and ask the tutor to draw the problem on the whiteboard. Seeing the symbols move step by step is often what makes the concept click.

Related guides

  • The Quadratic Formula Explained
  • Vertex Form and How to Graph a Parabola
  • How to Factor Quadratics
completing the squarequadraticssolving equationsalgebra

Related Articles

How to Add Fractions With Unlike Denominators

Learn how to add fractions with different denominators by finding a common denominator, rewriting each fraction, and adding the numerators.

How to Subtract Fractions Step by Step

A clear guide to subtracting fractions with like and unlike denominators, including common mistakes and practice problems.

How to Multiply Fractions

Multiplying fractions is easier than adding them: multiply across, then simplify.

Ready to try PennPaper?

Experience AI tutoring that thinks out loud.

Get Started Free