Completing the Square Calculator

Rewrite a quadratic as a(x − h)² + k by completing the square, then solve it, with every algebra step written out.

Completed square form
2(x + 3)2 − 8 = 0
Vertex form of y
y = 2(x + 3)2 − 8
Vertex (h, k)
(−3, −8)minimum — parabola opens upward
Square added
9(half the x coefficient)², after factoring out a
Solution x₁
−1≈ −1
Solution x₂
−5≈ −5
Solutions by completing the squarex = −1, −5Vertex form: y = 2(x + 3)² − 8

Show the work

  1. Start with 2x2 + 12x + 10 = 0.
  2. Factor a = 2 out of the x terms: 2(x2 + 6x) + 10 = 0.
  3. Take half of the x coefficient and square it: (6 ÷ 2)2 = (3)2 = 9.
  4. Add and subtract 9 inside the bracket: 2(x2 + 6x + 9 − 9) + 10 = 0.
  5. The first three terms form a perfect square: x2 + 6x + 9 = (x + 3)2.
  6. Move the subtracted square out of the bracket (multiply it by 2): 2(x + 3)2 − 18 + 10 = 2(x + 3)2 − 8 = 0.
  7. Isolate the square: (x + 3)2 = 8 ÷ 2 = 4.
  8. Take the square root of both sides: x + 3 = ±2.
  9. Solve for x: x = −3 ± 2, so x = −1 and −5.

Completing the square turns a quadratic like 2x² + 12x + 10 into the form 2(x + 3)² − 8. That form, called vertex form, shows the turning point of the parabola at a glance and lets you solve the equation by taking a single square root. Enter the three coefficients and this calculator performs each step exactly, with fractions rather than rounded decimals.

How to use the completing the square calculator

  1. Write the quadratic as ax² + bx + c (equal to zero if you are solving an equation).
  2. Enter a, b and c. Use 0 for a missing term; a itself must not be 0.
  3. Read the completed-square form, the vertex and the solutions on the tape. The steps follow the textbook method line by line.

The method and the formula

The idea rests on one identity, the perfect square trinomial:

x² + bx + (b/2)² = (x + b/2)²

For a general quadratic, factor out a, add and subtract the square of half the new x coefficient, and tidy up:

ax² + bx + c = a(x + b/2a)² + (c − b²/4a)

So the vertex is at h = −b/2a and k = c − b²/4a. Setting the expression equal to zero and isolating the square gives (x − h)² = −k/a, and taking square roots finishes the job.

Worked example

Solve 2x² + 12x + 10 = 0 by completing the square.

1. Factor out a = 2 from the x terms: 2(x² + 6x) + 10 = 0.

2. Half of 6 is 3, and 3² = 9.

3. Add and subtract 9 inside the bracket: 2(x² + 6x + 9 − 9) + 10 = 0.

4. Build the square and move −9 out, multiplied by 2: 2(x + 3)² − 18 + 10 = 2(x + 3)² − 8 = 0.

5. Isolate the square: (x + 3)² = 8 ÷ 2 = 4.

6. Take square roots: x + 3 = ±2, so x = −1 or x = −5.

The vertex form also tells you the parabola y = 2x² + 12x + 10 has its minimum at (−3, −8).

When the numbers are not as tidy, fractions appear. For 3x² + 5x − 2, the bracket becomes x² + (5/3)x, half of 5/3 is 5/6, and the square to add is 25/36. The calculator carries these fractions exactly and arrives at 3(x + 5/6)² − 49/12, then x = 1/3 or x = −2.

Why bother completing the square?

  • Vertex form for graphing. a(x − h)² + k says the graph is the basic parabola y = x², stretched by a and shifted h units right and k units up. Optimization problems (“what price maximizes revenue?”) are often solved this way.
  • It derives the quadratic formula. Run the steps on ax² + bx + c = 0 with letters instead of numbers and you get x = (−b ± √(b² − 4ac)) / 2a. See the quadratic formula calculator for that shortcut.
  • It shows up later. The same trick converts circle and ellipse equations such as x² + y² − 4x + 6y = 3 into standard form, and it is used to evaluate integrals and to read off the mean and variance in the normal distribution.

Common mistakes

  1. Forgetting to factor out a. Half of b only works when the x² coefficient is 1. With 2x² + 12x, take half of 6, not half of 12.
  2. Not compensating for what you added. Adding 9 inside a bracket that is multiplied by 2 really adds 18, so 18 has to be subtracted outside.
  3. Dropping the ± sign. Taking the square root of both sides gives two answers, x − h = +√ and x − h = −√.
  4. Sign of h. In (x + 3)², h is −3, not 3. Vertex form is written a(x − h)², so a plus sign inside means a negative h.

To multiply a completed square back out, the FOIL calculator expands (x + 3)(x + 3) term by term.

Frequently asked questions

What does completing the square mean?

It means adding and subtracting the number that turns x² + bx into a perfect square trinomial. That number is (b/2)², because x² + bx + (b/2)² = (x + b/2)². The result is the vertex form a(x − h)² + k.

What if the coefficient of x² is not 1?

Factor a out of the x² and x terms first, complete the square inside the brackets, and remember to multiply the subtracted square by a when you move it outside. The calculator shows this step whenever a ≠ 1.

Is completing the square the same as the quadratic formula?

They always give the same solutions. The quadratic formula is what you get by completing the square on the general equation ax² + bx + c = 0, so the formula is a shortcut for this method.

What if the number on the right side is negative?

Then (x − h)² equals a negative number, which has no real square root. The solutions are complex, of the form h ± (something)i, and the parabola does not cross the x-axis.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.