Completing the Square Practice Math Problems and Examples

Enter the coefficients a, b, and c from ax² + bx + c to complete the square. Get the vertex form a(x − h)² + k, the vertex point, the completing term, and the exact roots — worked step by step.

Quick Facts

Vertex form
a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a)
Add and subtract (b/2a)² inside the parentheses to build the perfect-square trinomial.
Discriminant
b² − 4ac
Positive → two real roots; zero → one repeated root; negative → two complex roots.

Your Results

Calculated
Vertex form
-
a(x − h)² + k, fully simplified
Vertex (h, k)
-
Turning point of the parabola
Completing term
-
(b/2a)², added and subtracted inside
Roots (ax² + bx + c = 0)
-
Solutions where the parabola crosses y = 0

Ready

Enter a, b, and c, then press Calculate.

Understanding Completing the Square

Completing the square rewrites a quadratic ax² + bx + c as a perfect-square expression, a(x − h)² + k. This "vertex form" instantly shows the parabola's turning point (h, k) and provides a clean, mechanical way to solve for the roots without memorizing the quadratic formula separately — in fact, completing the square is exactly how the quadratic formula is derived.

The general formula

For any quadratic ax² + bx + c with a ≠ 0:

  • Factor out a from the x² and x terms: a(x² + (b/a)x) + c.
  • Add and subtract the completing term (b/2a)² inside the parentheses to build a perfect-square trinomial.
  • Rewrite in vertex form: a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a).
  • Discriminant: b² − 4ac determines the roots — positive gives two real roots, zero gives one repeated root, negative gives two complex roots.

Worked example with the default values

For x² + 6x + 5 (a = 1, b = 6, c = 5): the completing term is (6/2)² = 9. Adding and subtracting 9 gives x² + 6x + 9 − 9 + 5 = (x + 3)² − 4. So h = −3, k = −4, and the vertex form is (x + 3)² − 4. Since the discriminant is 6² − 4(1)(5) = 16 (positive), setting (x + 3)² − 4 = 0 gives (x + 3)² = 4, so x + 3 = ±2, meaning x = −1 or x = −5.

Solving for the roots

Once in vertex form, set a(x − h)² + k = 0 and isolate the square: (x − h)² = −k/a. If −k/a is zero or positive, take the square root of both sides and solve for x = h ± √(−k/a). This is algebraically identical to the quadratic formula x = (−b ± √(b² − 4ac)) / (2a) — completing the square is simply the derivation of that formula written out with your specific numbers.

Frequently Asked Questions

What is the formula for completing the square?
For ax² + bx + c, factor out a, then add and subtract (b/2a)² inside the parentheses to form a perfect-square trinomial. The result is vertex form a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a). The value (b/2a)² is the "completing term" that turns x² + (b/a)x into a perfect square.
How do you find the roots by completing the square?
Set the vertex form equal to zero: a(x − h)² + k = 0, then isolate the squared term: (x − h)² = −k/a. If −k/a is positive, take the square root of both sides and add h to get x = h ± √(−k/a), which is algebraically identical to the quadratic formula x = (−b ± √(b² − 4ac)) / (2a).
What does the discriminant (b² − 4ac) tell you?
The discriminant's sign predicts the roots before you finish solving. A positive discriminant means two distinct real roots (the parabola crosses the x-axis twice). A discriminant of zero means one repeated real root (the vertex sits exactly on the x-axis). A negative discriminant means no real roots — the two solutions are complex conjugates.
Does completing the square still work if a is negative?
Yes. The same formulas for h and k apply regardless of the sign of a. A negative a simply means the parabola opens downward, so the vertex (h, k) is a maximum point instead of a minimum, and the sign of a carries through to the vertex form a(x − h)² + k unchanged.