Overview

Completing the square rewrites ax² + bx + c as a(x − h)² + k. That form shows the parabola's vertex straight away and helps solve the equation.

Enter a, b and c. a can't be 0.

Worked examples

InputsResult
a (coefficient)1b (coefficient)-6c (constant)5Vertex form: 1(x − 3)² + -4Vertex: (3, -4)
Show 2 more examples
a (coefficient)2b (coefficient)8c (constant)3Vertex form: 2(x − -2)² + -5Vertex: (-2, -5)
a (coefficient)-1b (coefficient)4c (constant)1Vertex form: -1(x − 2)² + 5Vertex: (2, 5)

How it works

The vertex's x-coordinate is h = −b ÷ 2a, and its y-coordinate is k = c − b² ÷ 4a. Expanding a(x − h)² + k gives back the original quadratic. In the result, a negative h or k appears as subtracting a negative.

The formula

ax² + bx + c = a(x − h)² + k
h−b ÷ 2a
kc − b² ÷ 4a

Practical tips

  • x² − 6x + 5 becomes (x − 3)² − 4, with the vertex at (3, −4).
  • If a is positive, the vertex is the lowest point. If a is negative, it's the highest.
  • To solve, set the vertex form to 0: (x − 3)² = 4, so x = 1 or 5.

Frequently asked questions

Why complete the square?

To find the vertex, sketch the graph, or derive the quadratic formula.

What if a isn't 1?

Factor a out of the x terms first. The calculator does this for you.

How does it relate to the quadratic formula?

The quadratic formula comes from completing the square on the general equation.