InfyCalculator
➗

Completing the Square Calculator with Steps

Solve ax² + bx + c = 0 by completing the square, step by step, and get the exact solutions (radicals or complex), the vertex form y = a(x − h)² + k and the vertex.

a (x² coefficient)
b (x coefficient)
c (constant)
Loading calculator…

How it works

ax² + bx + c = 0 → x² + (b/a)x = −c/a → add (b/2a)² → (x + b/2a)² = (b² − 4ac)/4a² → x = −b/2a ± √(b² − 4ac)/2a · vertex form a(x − h)² + k with h = −b/2a, k = c − b²/4a

Completing the square rewrites a quadratic so that the x terms form a perfect square trinomial. After dividing by a and moving the constant across, you add the square of half the x coefficient to both sides; the left side then factors as (x + b/2a)², and taking square roots finishes the solve. The same algebra gives the vertex form y = a(x − h)² + k, which shows the parabola’s vertex (h, k) directly, and it is exactly how the quadratic formula is derived. All arithmetic here is exact, with fractions and simplified radicals.

Worked example

Solve x² + 6x + 5 = 0. Move the constant: x² + 6x = −5. Half of 6 is 3 and 3² = 9; add it to both sides: x² + 6x + 9 = 4, so (x + 3)² = 4. Square roots: x + 3 = ±2, giving x = −1, x = −5. The vertex form is y = (x + 3)² − 4 with vertex (−3, −4).

Sources: Completing the square — Wikipedia · Completing the square — Math is Fun

Frequently asked questions

What if a is not 1?

Divide every term by a first (the calculator shows this step), complete the square on x² + (b/a)x, and for the vertex form multiply back: y = a(x − h)² + k.

What does it mean when the right side is negative?

A square cannot be negative for real x, so there are no real solutions. Taking the square root anyway gives a pair of complex conjugate solutions with i = √−1.

How is this related to the quadratic formula?

Completing the square on ax² + bx + c = 0 in general produces x = (−b ± √(b² − 4ac)) / 2a — the quadratic formula is just this method done once with letters.

When should I use completing the square instead of factoring?

When the quadratic does not factor nicely, when you need the vertex form of a parabola, or when you are asked for exact radical answers. If it factors over the integers, factoring is usually faster.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.