SparkyHomework Helper
Get iOS App
MathematicsGrades 8–11Intermediate

How to Complete the Square: Step-by-Step Guide with Worked Examples

Master solving quadratic equations and converting standard form to vertex form by completing the square.

⚡
Sparky Academic TeamCurriculum Specialist
8 min readUpdated 2026-10-17
Quick Summary / TL;DR

Completing the square transforms any quadratic equation into a perfect square trinomial (x + d)². Take half of the middle coefficient b, square it ((b/2)²), and add it to both sides of the equation. Then take the square root of both sides to solve for x!

Core Equation / Rule:
The Magic Number: (b2)2 ⟹ x2 + bx + (b2)2 = (x + b2)2
💡
🧩 Half it, Square it, Add to Both Sides!
Doing homework right now? Scan your worksheet with the Sparky iOS App for camera & voice hints!
App Store
123

The 4-Step Solving Process

1

Isolate Variables from the Constant

x2 + bx + c = 0 ⟹ x2 + bx = -c

Rearrange the equation into the form x² + bx = c by moving the constant term c to the right side.

💡 Pro Tip: If there is a coefficient in front of x² (a ≠ 1), divide the entire equation by a first!
2

Find the Magic Number: (b/2)²

Magic Value = (b2)2

Take half of the linear coefficient b, then square that result.

💡 Pro Tip: Keep track of the sign of b! If b is negative, (b/2) is negative, but squaring it is always positive.
3

Add the Magic Number to BOTH Sides

x2 + bx + (b2)2 = -c + (b2)2

To maintain equality, you must add (b/2)² to both the left and right sides of the equation.

💡 Pro Tip: The most common student mistake is adding to the left side and forgetting to add to the right side!
4

Factor into a Binomial Squared & Solve

(x + b2)2 = d ⟹ x + b2 = ±\sqrt{d} ⟹ x = -b2 ± \sqrt{d}

Write the left side as (x + b/2)², take the square root of both sides (remember ±), and isolate x.

💡 Pro Tip: Always write ± before the square root. Quadratic equations almost always have two solutions!

What is Completing the Square?

Completing the square is an algebraic technique used to turn any quadratic expression into a perfect square trinomial.

A perfect square trinomial is an expression that factors into two identical parentheses:

(x + d)2 = x2 + 2dx + d2

By adding the missing constant term to both sides of an equation, we can solve quadratics directly using square roots, without needing the quadratic formula!


The Magic Formula: (b2)2

For any quadratic expression starting with x2 + bx:

Magic Number = (b2)2

When you add this number:

x2 + bx + (b2)2 = (x + b2)2

Notice that the number inside the parentheses is always exactly half of b!

  • •If b = 6: half is 3, square is 9 ⟹ (x + 3)2
  • •If b = -8: half is -4, square is 16 ⟹ (x - 4)2
  • •If b = 5: half is 52, square is 254 ⟹ (x + 52)2

Worked Example 1: Standard Problem (a = 1)

Problem:

Solve the quadratic equation by completing the square:

x2 + 6x - 16 = 0

Step 1: Move the constant term to the right side

Add 16 to both sides:

x2 + 6x = 16

Step 2: Calculate the magic number (b2)2

Here, b = 6:

Half of b = 62 = 3
Square it = 32 = 9

Step 3: Add 9 to BOTH sides of the equation

x2 + 6x + 9 = 16 + 9
x2 + 6x + 9 = 25

Step 4: Factor the left side as a binomial squared

(x + 3)2 = 25

Step 5: Take the square root of both sides

Remember the plus-or-minus (±) sign!

\sqrt{(x + 3)2} = ±\sqrt{25}
x + 3 = ± 5

Now split into two simple equations:

x + 3 = 5 ⟹ x = 5 - 3 = 2
x + 3 = -5 ⟹ x = -5 - 3 = -8

Final Answer: The solutions are x = 2 and x = -8.


Interactive Practice Check
For the quadratic equation $x2 + 10x = 24$, what is the magic number you must add to both sides to complete the square? (Hint: Take half of 10 and square it).

Worked Example 2: When Leading Coefficient a > 1

If the equation has a number in front of x2 (a ≠ 1), you must divide every single term by a before completing the square.

Problem:

Solve: 2x2 - 12x - 14 = 0

Step 1: Divide everything by 2

2x22 - 12x2 - 142 = 0
x2 - 6x - 7 = 0

Step 2: Move the constant to the right

x2 - 6x = 7

Step 3: Find the magic number (b2)2

Here b = -6:

Half of b = -62 = -3
Square it = (-3)2 = 9

Step 4: Add 9 to both sides

x2 - 6x + 9 = 7 + 9
(x - 3)2 = 16

Step 5: Take the square root of both sides

x - 3 = ±\sqrt{16} = ± 4
x = 3 + 4 = 7 or x = 3 - 4 = -1

Final Answer: The solutions are x = 7 and x = -1.


Converting to Vertex Form (y = a(x - h)2 + k)

Completing the square is also the fastest way to find the vertex of a parabola:

y = x2 - 8x + 19
  1. Group the x terms: y = (x2 - 8x) + 19
  2. Magic number for -8: half is -4, squared is +16.
  3. Add and subtract 16 on the same side:
y = (x2 - 8x + 16) + 19 - 16
y = (x - 4)2 + 3

The vertex of the parabola is at (h, k) = (4, 3)!


Quick Reference Summary

StepActionWatch Out For
1. IsolateMove constant to right: x2 + bx = cDivide by a first if a ≠ 1
2. Half & SquareCompute (b2)2Squaring a negative gives a positive
3. BalanceAdd to BOTH sidesDon't forget the right side!
4. Factor(x + b2)2 = TotalSign inside matches sign of b
5. Square Rootx + b2 = ±\sqrt{Total}Always write ± for two roots
⚠️WATCH OUT

Don't Forget the Plus/Minus Sign!

If (x + 3)2 = 25, writing only x + 3 = 5 misses half the problem! Always include ± 5 so you capture both positive and negative roots.

Best on iPhone & iPad
Native Camera & Voice Tutor

Stuck on this exact problem? Experience Sparky in the iOS App!

Skip typing out equations! Download the official Sparky Club iOS App to snap a photo of your homework worksheet with your camera and talk through every step out loud with Sparky’s real-time voice tutor.

Instant Camera OCR
Hands-Free Voice Mode
100% Kid-Safe & Free
Download Free on the
App Store

Keep Learning: Related Mathematics Guides

Master the next step in your curriculum with these curated guides.

Grades 7–10

How to Find the Y-Intercept: Step-by-Step Guide for Equations & Graphs

Learn how to find the y-intercept from an equation or graph. Step-by-step guide with formulas for slope-intercept form (y = mx + b), standard form (Ax + By = C), and graphs.

6 min readRead
Grades 8–11

How to Solve Systems of Equations: Substitution & Elimination Step-by-Step

Learn how to solve systems of equations step-by-step using substitution and elimination. Worked examples, decision flowcharts, and interactive practice.

9 min readRead
Grades 6–9

How to Solve for X in Two-Step Equations: Step-by-Step Guide

Learn how to solve for x in two-step equations step-by-step. Discover inverse operations, reverse PEMDAS (SADMEP), fractions, negatives, and interactive practice.

6 min readRead
Sparky iOS App★★★★★

Snap homework photos & use Voice Tutor