Completing the square
Rewrite a quadratic expression as a square plus or minus a constant.
Completing the square is one of 4 quadratics formulas in the algebra section of this library, and it is used at high school level.
Why completing the square works
Expanding the squared bracket produces x squared plus bx plus the square of half b. That is the original expression plus one extra constant, so subtracting the same constant leaves the value untouched while making the perfect square visible.
What each symbol means
$b$ is the coefficient of $x$ after the leading coefficient is made $1$.
Completing the square: when it holds
If the original leading coefficient is not $1$, factor it from the quadratic and linear terms first.
When it stops applying
The pattern assumes a leading coefficient of 1. Factor it out first: 2x squared + 12x becomes 2 times (x squared + 6x), then 2 times ((x + 3) squared - 9), which finishes as 2(x + 3) squared - 18 and agrees with the original at x = 0.
Completing the square: a worked example
$x^2+6x=(x+3)^2-9$.
The mistake to avoid
What people do: Adding the square of half b without subtracting it again.
Why it goes wrong: That changes the expression instead of rewriting it. At x = 0, the original x squared + 6x is 0 while (x + 3) squared is 9, so the two are not the same thing.
Do this instead: Add and subtract the constant in the same step, keeping the subtraction outside the bracket where you can see it.
Completing the square: step by step
- Name the unknown, and the unit the answer has to come out in.
- Match the symbols to your values. $b$ is the coefficient of $x$ after the leading coefficient is made $1$.
- Check the conditions before substituting. If the original leading coefficient is not $1$, factor it from the quadratic and linear terms first.
- Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most algebra slips.
Where this formula fits
- Subject
- Algebra formulas — 28 entries in this library
- Topic
- Quadratics
- Level
- High school
Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where completing the square comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.
- The Quadratic Formula Explained — the lesson behind this formula: use the formula and interpret its discriminant.
- Quadratic Formula Calculator — check your substitution and the value it produces.
- Study algebra — the subject guide that explains the ideas these formulas compress.
- Algebra I Practice — questions that make you retrieve the formula instead of recognising it.
- All 28 algebra formulas — the full grouped reference, or the complete formula library.
Questions about completing the square
Why half of b and not b itself?
Because expanding a square doubles the cross term. Halving first cancels that doubling, so the bracket produces exactly the bx you started with.
Why bother when the quadratic formula already solves everything?
Because this rewrite hands you the vertex, converts circle equations into centre-radius form, and sets up integrals later. It gives structure, not just roots.
Does it still work when b is odd?
Yes, with a fraction. Rewriting x squared + 5x gives (x + 2.5) squared - 6.25, and checking at x = 1 gives 6 both ways.
What happens when b is negative?
Half of b keeps its sign, so the bracket subtracts. For x squared - 10x you get (x - 5) squared - 25, and both forms give -9 at x = 1.