What this calculator does
Completing the square is a way of rewriting a quadratic ax² + bx + c in the form a(x − h)² + k, where the whole expression is built around a single squared term rather than three separate terms in x², x and a constant. This completing the square formula calculator does that rearrangement directly from a, b and c, showing h and k rather than just the final roots.
The point of the technique is that the vertex form makes two things obvious that the original ax² + bx + c does not: the vertex of the parabola sits exactly at (h, k), and solving for where the curve crosses zero only needs one square root, isolating (x − h)² and undoing the square, rather than remembering the full quadratic formula.
The formula
Take half the coefficient of x, b/(2a), and its negative gives h. Substituting that value back into the original expression and simplifying gives k, the constant left over once the squared term is factored out. Together they say the same thing as ax² + bx + c, just rearranged: a(x − h)² + k.
| Term | Meaning |
|---|---|
| h | The horizontal shift of the vertex: h = −b/(2a). It is also the x-coordinate of the vertex and the axis of symmetry. |
| k | The vertical shift of the vertex: k = c − b²/(4a). It is the minimum or maximum value the expression can take. |
| Vertex form | a(x − h)² + k, the same quadratic written around a single squared term instead of three separate terms. |
The inputs explained
| Field | What to enter |
|---|---|
| a | The coefficient of x². Cannot be zero, or the expression stops being a quadratic. |
| b | The coefficient of x. |
| c | The constant term. |
When to use it
Finding a parabola’s vertex without calculus
Once a quadratic is in vertex form, the vertex coordinates (h, k) are sitting right there in the expression, rather than needing a separate formula or a derivative set to zero.
Solving a quadratic by hand, step by step
Completing the square is the method that the quadratic formula itself is derived from. Working through h and k explicitly shows why the formula has the shape it does, rather than treating it as a fact to memorise.
Sketching a parabola quickly
Vertex form gives the turning point and the direction the parabola opens (from the sign of a) in one line, which is often enough to sketch a rough graph without plotting several points.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the vertex form changes as b varies, with a and c fixed
Holding a = 1 and c = 5, and varying b, to see how the vertex shifts.
How the vertex form changes as a varies, with b and c fixed
Holding b = −6 and c = 5, and varying a, to see the effect of the leading coefficient.
| a | h (shift) | k (vertex value) |
|---|---|---|
| 0.5 | 6.000 | -13.000 |
| 1 | 3.000 | -4.000 |
| 1.5 | 2.000 | -1.000 |
| 2 | 1.500 | 0.5000 |
| 3 | 1.000 | 2.000 |
| 4 | 0.7500 | 2.750 |
Questions
How is this different from the quadratic calculator?
The quadratic equation calculator applies the quadratic formula directly to give the roots, vertex and discriminant. This calculator instead shows the intermediate a(x − h)² + k form and the h and k values themselves, which is the specific method some courses ask for by name rather than just the final answer.
What if a is negative?
The parabola opens downward instead of upward, and (h, k) becomes the maximum point of the curve rather than the minimum. The vertex form and the arithmetic for h and k work exactly the same way regardless of the sign of a.
Why can a not be zero?
With a = 0 there is no x² term left, so the expression is linear, not quadratic, and the whole idea of completing a square does not apply.
Does completing the square always give real roots?
No. If k and a have the same sign, (x − h)² would need to equal a negative number to reach zero, which is impossible for a real x, so the quadratic has no real roots. That case shows up directly as a negative value under the square root when solving a(x − h)² + k = 0.
For the roots, discriminant and vertex worked out directly by the quadratic formula, see the quadratic equation calculator.