How to Complete the Square
Completing the square is the algebraic trick behind the quadratic formula itself. The idea: force part of the expression into a perfect square (x + d)², then tidy up whatever is left over. This calculator takes the three coefficients of your quadratic and rewrites y = ax² + bx + c in vertex form, y = a(x − h)² + k, showing every step and naming the vertex. Vertex form is the version that answers the questions standard form hides: where the graph turns, whether that turning point is a maximum or a minimum, and what value the function reaches there.
What a, b, c, h and k Each Mean
In standard form, a is the coefficient of x²: its sign decides whether the parabola opens upward (a > 0) or downward (a < 0), and its size controls how narrow the curve is. b is the coefficient of x, and c is the constant term — the y-intercept, where the curve crosses the vertical axis. In vertex form, h = −b/(2a) is the x-coordinate of the vertex and also the axis of symmetry, the vertical line the parabola mirrors across. k is the y-coordinate of the vertex, and it can be computed directly as k = c − b²/(4a). Together, (h, k) is the turning point itself.
The Three Steps
- Normalize: if a ≠ 1, factor a out of the x-terms first.
- Halve and square: take half of the x-coefficient, square it — that is the number that completes the square.
- Balance: add it inside the brackets and subtract the equivalent outside, then collapse to (x + d)² + k.
How to Use This Calculator
- Type the three coefficients into the a =, b =, and c = boxes. The defaults a = 1, b = 6, c = 5 are a ready-made example.
- Press the Complete the Square button.
- Read the Vertex form panel: it shows the rewritten equation, a numbered list of steps — factoring out a, halving and squaring the x-coefficient, balancing, simplifying the constant — and finally the vertex coordinates, labelled as a minimum or a maximum.
- If you enter a = 0, the tool warns you instead: with no x² term there is no quadratic, and no parabola to complete.
Worked Example 1: y = x² + 6x + 5
Here a = 1, so no factoring is needed. Take half of the x-coefficient: 6 ÷ 2 = 3. Square it: 3² = 9. Add and subtract 9 so the expression stays balanced: y = (x² + 6x + 9) + 5 − 9. The bracket is now a perfect square, (x + 3)², and the leftover constants combine to −4, giving y = (x + 3)² − 4. Verify by expanding back: (x + 3)² − 4 = x² + 6x + 9 − 4 = x² + 6x + 5. ✓ The original is recovered exactly. The vertex is (−3, −4) — note the sign flip on the 3 — and because a = 1 > 0, the parabola opens upward and that vertex is a minimum.
Worked Example 2: y = 2x² − 8x + 3, Where a ≠ 1
First factor 2 out of the x-terms only, leaving the constant outside: y = 2(x² − 4x) + 3. Halve the new x-coefficient: −4 ÷ 2 = −2, and square it: (−2)² = 4. Add 4 inside the brackets — but anything inside is multiplied by the 2 outside, so this really adds 8, and we subtract 8 to balance: y = 2(x − 2)² + 3 − 8 = 2(x − 2)² − 5. Verify by expanding: 2(x − 2)² − 5 = 2(x² − 4x + 4) − 5 = 2x² − 8x + 8 − 5 = 2x² − 8x + 3. ✓ Vertex (2, −5), a minimum, with axis of symmetry x = 2.
Reading the Vertex
In y = a(x − h)² + k, the vertex is (h, k). Watch the sign: (x + 3)² means h = −3. If a > 0 the parabola opens upward and the vertex is a minimum; if a < 0 it opens downward. This is why the technique earns its keep outside the classroom: the height of a thrown ball, the revenue-maximising price of a product, and the cheapest design for a bridge arch are all vertex questions. Completing the square twice — once in x, once in y — also reveals the centre and radius of a circle from its expanded equation, a standard exam move.
Three Mistakes Almost Everyone Makes Once
- Reading h with the wrong sign. The form is (x − h)², so (x + 3)² means h = −3 and the vertex sits at x = −3, not +3. More vertex points are lost to this sign than to any other slip.
- Forgetting the multiplier when a ≠ 1. Adding (b/2a)² inside brackets that are multiplied by a actually adds a × (b/2a)² to the expression. Subtract only the un-multiplied square and the equation no longer balances.
- Halving the wrong number, or in the wrong order. It is the x-coefficient — after any factoring — that gets halved, and the halving happens before the squaring. Halving c, or squaring b first and then halving, produces a bracket that is not a perfect square at all.
Prefer finding roots directly? Try our quadratic equation solver or solve linear equations with the algebra calculator.