Skip to content
ihateDesmos

Completing the square calculator

Type the coefficients of a quadratic to complete the square step by step. You get the vertex form, the vertex and the exact solutions, with fractions kept exact, and a graph of the parabola.

Vertex form
y = (x + 3)² − 4
Vertex
(−3, −4)
Solutions of y = 0
−5 −1
Discriminant
16
Steps
  1. Start with y = x² + 6x + 5
  2. Take half of the x coefficient and square it: (6 ÷ 2)² = (3)² = 9
  3. Add and subtract 9 inside the bracket: y = (x² + 6x + 9 − 9) + 5
  4. The first three terms are a perfect square: x² + 6x + 9 = (x + 3)²
  5. Multiply out the leftover and combine: 5 − 1·9 = −4
  6. So y = (x + 3)² − 4
  7. Setting y = 0: (x + 3)² = 4, so x = −5 −1
−7−6−5−4−3−2−11−4−224681012
The parabola y = (x + 3)² − 4, with its vertex at (−3, −4).

How to use it

  1. 1
    Write your quadratic as ax² + bx + c and type a, b and c. For x² + 6x + 5, that is 1, 6 and 5.
  2. 2
    Follow the steps from the original equation to vertex form.
  3. 3
    Read the vertex and the solutions from the results.

How to complete the square

Take x² + 6x + 5:

  1. Take half the coefficient of x and square it: half of 6 is 3, and 3² = 9.
  2. Add and subtract it: x² + 6x + 9 − 9 + 5.
  3. The first three terms are a perfect square: (x + 3)² − 9 + 5.
  4. Combine the numbers: (x + 3)² − 4.

When a isn’t 1, factor it out of the x terms first. The completing the square guide works through this case, along with why the method works.

Solving an equation by completing the square

From (x + 3)² − 4 = 0, you get (x + 3)² = 4. Taking square roots gives x + 3 = ±2, so x = −1 or x = −5. Applying these same steps to ax² + bx + c = 0 with letters is how the quadratic formula is derived.

Why vertex form is useful

In y = a(x − h)² + k, the vertex is at (h, k), so you can read a parabola’s turning point straight from the equation. For y = (x + 3)² − 4, the vertex is (−3, −4). This is the quickest way to find a maximum or minimum. See vertex form for more.

Frequently asked questions

What does completing the square mean?
Rewriting a quadratic so it contains a perfect square, like (x + 3)², plus a constant.
What if a isn’t 1?
Factor a out of the x² and x terms first, complete the square inside the bracket, then multiply back out. Type your values above to see it done.
When should I complete the square rather than use the quadratic formula?
Use it when you want the vertex form, or when the coefficient of x is even and a = 1. If you only need the roots, the quadratic formula is usually quicker.
What if the solutions are complex?
If the squared term must equal a negative number, the parabola doesn’t cross the x-axis. The calculator gives the exact complex solutions.

Related tools and guides

Try the completing the square calculator

It opens instantly, with no account and nothing to install.

Open the calculator