UTILS.
100% in-browser

Completing the Square Calculator

Rewrite a quadratic ax² + bx + c into vertex form a(x − h)² + k, giving the vertex, axis of symmetry, and completing-the-square steps.

Enter a quadratic ax² + bx + c to rewrite it in vertex form.

Enter a quadratic above to complete the square.

About this tool

The Completing the Square Calculator converts a quadratic ax² + bx + c into vertex form a(x − h)² + k. It reads the coefficients a, b, and c from the expression you enter (a must be non-zero), then computes the vertex directly: h = −b/(2a) and k = c − b²/(4a), which is equivalent to k = c − a·h². The vertex form is assembled with correct signs, so a positive h prints as (x − h) and a negative h prints as (x + |h|).

The canonical completing-the-square steps are shown as well: factor a from the x-terms to get a(x² + (b/a)x) + c, then add and subtract the square of half the linear coefficient, (b/(2a))², inside the parentheses to form the perfect square. Alongside the vertex form the tool reports the vertex (h, k), the axis of symmetry x = h, and whether the parabola opens up (a > 0) or down (a < 0).

All coefficients are kept as exact fractions with gcd reduction, so vertices at rational points stay exact, and everything runs locally in your browser with an eval-free parser. Enter a quadratic such as 'x^2 - 6x + 5' and read the vertex form, vertex, axis of symmetry, and the full step-by-step derivation.

Frequently asked questions

What is vertex form and why use it?
Vertex form a(x − h)² + k exposes the parabola's vertex (h, k) and axis of symmetry x = h directly, making graphing, finding maxima/minima, and solving by inspection much easier than standard form ax² + bx + c.
How are h and k computed?
The vertex is h = −b/(2a) and k = c − b²/(4a) (equivalently k = c − a·h²). These come straight from completing the square and are exact whenever a, b, and c are rational.
Does it show the completing-the-square steps?
Yes. It factors a from the x-terms, then adds and subtracts (b/(2a))² inside the parentheses to build the perfect-square trinomial, and displays each stage down to the final vertex form.
What does the sign of a tell me?
If a > 0 the parabola opens upward and the vertex is its minimum; if a < 0 it opens downward and the vertex is its maximum. The tool states the direction along with the vertex and axis of symmetry.

More tools