Completing the Square Calculator
This completing the square calculator takes ax² + bx + c = 0, completes the square, and solves it — and it draws the square while it does, because the name of the method is not a metaphor.
Type 1, 6, 5 and you get (x + 3)² − 4 = 0, then x = −5 or x = −1.
How Completing the Square Works
Take half the coefficient of x. Square it. Add it. That is the whole method, and the only reason it needs a page is that two things about it go wrong constantly.
x² + 6x + 5 → (x + 3)² − 4
Half of 6 is 3, and 3² is 9. But adding 9 changes the expression, so 9 comes straight back off: 5 − 9 = −4. The two moves always come as a pair.
Where (b/2)² Comes From — the Picture
Draw it and you never have to memorise it again.
x² + 6x is a square of side x with two strips stuck to it, each 3 wide. Put them along two adjacent sides and the shape is almost a bigger square — it is missing one corner, and that corner is 3 by 3.
Fill it in and the whole thing becomes a square of side x + 3. That is where (b/2)² comes from: it is literally the missing corner. The calculator draws this above your own numbers, with the corner dashed to show it is the part that is not there yet.
The algebra says the same thing more briefly. Expand (x + 3)² and the middle term is 2 × 3 × x — so the number inside the bracket is always half of b, and the number on the end is that half squared. Neither fact was invented by anyone; both fall out of the expansion.
When the Leading Coefficient Is Not 1
Here is where it stops being easy. Take 2x² + 8x − 10 = 0.
First pull the 2 out of the x terms — and only the x terms:
2(x² + 4x) − 10 = 0
Now complete the square inside. Half of 4 is 2, and 2² is 4. But look carefully at what adding that 4 actually does. It is sitting inside a bracket that is multiplied by 2, so it has added 8 to the expression, not 4. Eight is what has to come back off:
2(x + 2)² − 10 − 8 → 2(x + 2)² − 18
Take 4 off instead of 8 and every line after that is wrong while looking completely tidy. This is the single most common mistake in the topic, and it is why the calculator prints both numbers — what you put in, and what it really cost.
Factor a Out, Do Not Divide It In
Plenty of pages tell you to divide the whole equation by a and be done with it. That advice is fine here and wrong somewhere else, and the difference is worth ten seconds of your attention.
| 2x² + 8x − 10 = 0 | dividing by 2 is fine | the right side is 0, and 0 ÷ 2 is still 0 |
| y = 2x² + 8x − 10 | dividing is wrong | you would be graphing a different curve |
Factoring works in both situations. Dividing works in one. That is the honest reason to learn it the harder way round — not because dividing is forbidden, but because the habit transfers and the shortcut does not. The calculator shows both routes and marks which is which.
What the Finished Form Tells You
What you end up with, a(x − h)² + k, is the form people call vertex form, and the turning point of the parabola sits at (h, k).
So 2(x + 2)² − 18 tells you the curve turns at (−2, −18) — and since a is positive, that is a minimum. Reading it off takes no work at all, which is the real argument for this method over the quadratic formula: the formula hands you the roots and nothing else.
Worth knowing, too, that the quadratic formula is not a separate fact to learn. It is this method, done once, on ax² + bx + c with letters instead of numbers, so that nobody has to repeat the work. If the formula has always looked arbitrary, complete the square on the general equation yourself once and it stops looking that way.
Solving After the Square Is Complete
Once the square is alone, square-root both sides — and take both signs.
(x + 2)² = 9 → x + 2 = ±3 → x = 1 or x = −5
Three things can happen at that step. If the right side is positive you get two answers. If it is zero you get one, because ±0 is just 0. And if it is negative there is no real answer at all, since no real number squares to something negative — x² + 2x + 5 = 0 becomes (x + 1)² = −4, and that is the end of it over the reals.
The answers stay exact. x² − x − 1 = 0 gives (x − ½)² = ⅝ and then x = (1 ± √5) ÷ 2, not 1.618.
Expanding It Back to Check
Multiply the bracket out, collect the terms, and you should be looking at the equation you typed.
2(x + 2)² − 18 → 2(x² + 4x + 4) − 18 → 2x² + 8x − 10
Two lines. It catches a dropped sign, a half that never got squared, and above all the multiplication by a being forgotten — because if you took 4 off instead of 8, the constant comes back wrong and you see it immediately. This page runs that expansion on every answer before showing you anything.
Using the Completing the Square Calculator
Rearrange into ax² + bx + c = 0 first, then type the three numbers with their signs. Leave b or c alone if that term is missing.
Fractions like 3/4 work and decimals work, and nothing is rounded on the way through — 2x² + 3x − 1 comes back as 2(x + ¾)² − 17/8 rather than 2(x + 0.75)² − 2.125. That matters more here than in most topics, because halving an odd b produces a fraction immediately and decimals start losing precision at exactly the wrong moment.
If there is no x term at all, there is nothing to complete: x² − 4 = 0 is already a square, and the page says so rather than drawing an empty picture.
Completing the Square FAQ
How do you complete the square?
Why is it half of b, squared?
What do you do when a is not 1?
Can you divide by a instead of factoring it out?
What does the finished form tell you?
How do you check the answer?
Half it, square it, put it back — and if a is sitting outside the bracket, remember what it does to whatever you put in.