Updated Math

Completing the Square Calculator

Convert ax² + bx + c into vertex form a(x − h)² + k. Get the vertex, axis of symmetry, and step-by-step working in seconds.

Vertex Form Vertex (h, k) Axis of Symmetry Step-by-step

Quadratic to Vertex Form

Enter a, b, c for y = ax² + bx + c. Choose decimals or fractions, then generate the completed-square form and steps.

Tip: If you’re graphing, vertex form instantly shows the vertex and whether the parabola opens up (a > 0) or down (a < 0).

Generated Steps

  1. Run the calculator to see step-by-step working here.
Steps are shown in a clean algebra flow: factor out a, create a perfect square trinomial, then simplify into a(x − h)² + k.

Try Quick Examples

Goal What you need Why completing the square helps
Find the vertex (h, k) Vertex form shows the vertex directly
Graph fast Shape + center a controls opening; h shifts left/right; k shifts up/down
Solve ax² + bx + c = 0 Roots Rewrite to a(x − h)² = −k, then take square roots
Optimization Min/Max value k is minimum (a>0) or maximum (a<0)
Use “Fractions” output if your teacher expects exact values like h = 3/2 instead of 1.5.

What is completing the square?

Completing the square is a classic algebra technique that rewrites a quadratic expression into a form that highlights its most useful features. Instead of viewing a quadratic as ax² + bx + c, you convert it into a(x − h)² + k, which is called vertex form. That change of form is powerful: it makes the vertex obvious, makes graphing easier, and turns many “find the maximum/minimum” questions into one clean read.

Even if you never “feel” the steps at first, the logic is very consistent. You’re building a perfect-square trinomial inside parentheses. In other words, you’re forcing the expression to become something like (x + p)², because squares are easy to reason about: a square is always non-negative, and it reaches its smallest value at 0. That simple idea is why vertex form is so helpful for optimization.

Why vertex form is so useful

It reveals the vertex instantly

In vertex form y = a(x − h)² + k, the vertex is (h, k). No extra steps, no formulas to remember in the moment. The vertex is the turning point of the parabola: the lowest point when a > 0 (opens upward), or the highest point when a < 0 (opens downward).

It reveals the axis of symmetry

The axis of symmetry is the vertical line through the vertex: x = h. If you are sketching a graph, that one line helps you place points correctly and mirror them to the other side. In real problems, the axis can represent the time of peak height, the most efficient value, or the center of symmetry.

It makes min/max questions easy

Since (x − h)² is always ≥ 0, the smallest possible value of a(x − h)² when a > 0 occurs at x = h and equals 0. So the minimum y-value is simply k. If a < 0, the parabola opens downward and the maximum y-value is k. This is why completing the square is often the cleanest path for optimization and modeling questions.

How to complete the square step-by-step

Start with a quadratic in standard form: ax² + bx + c. The goal is to rewrite it as a(x − h)² + k. There are two common cases: when a = 1, and when a ≠ 1. The logic is the same, but the factoring step changes.

Case 1: a = 1

If you have x² + bx + c, follow this pattern:

  • Take half of b: b/2
  • Square it: (b/2)² = b²/4
  • Add and subtract that square: x² + bx + b²/4 − b²/4 + c
  • Rewrite the first three terms as a square: (x + b/2)²
  • Combine constants to get k

Case 2: a ≠ 1

If a is not 1, you first factor out a from the x-terms:

  • Start: ax² + bx + c
  • Factor a from the first two terms: a(x² + (b/a)x) + c
  • Inside parentheses, take half of (b/a) and square it
  • Add and subtract that square inside the parentheses (then distribute a)
  • Rewrite as a(x + p)² + k

The calculator on this page does all of that automatically and shows the steps in a readable sequence.

How completing the square connects to the vertex formula

You may have learned the vertex x-coordinate formula: h = −b/(2a). Completing the square produces the same value, because the “center” of the squared binomial ends up being the opposite of half the x-coefficient after scaling. Once you have h, you can compute k by plugging h into the original quadratic or using k = c − b²/(4a).

The reason this matters is that it gives you two equivalent ways to get to the same destination: vertex form is the conceptual route (build a square), while the vertex formula can feel like a shortcut. If you understand completing the square, the shortcut becomes easier to trust because you know where it came from.

What the numbers mean in a(x − h)² + k

What does a do?

The value a controls the opening direction and steepness. If a > 0, the parabola opens upward. If a < 0, it opens downward. If |a| is large, the graph is narrower (steeper). If |a| is between 0 and 1, the graph is wider.

What does h do?

The value h shifts the graph left or right. Note the sign: (x − h) means “shift right by h” if h is positive. If the form becomes (x + 3), that equals (x − (−3)), so it shifts left by 3.

What does k do?

The value k shifts the graph up or down. More importantly, k is the y-value at the vertex, so it tells you the minimum or maximum value of the quadratic depending on the sign of a.

Completing the square to solve quadratic equations

Completing the square is not only for rewriting expressions; it can also solve equations. If you have ax² + bx + c = 0, you can complete the square on the left side and isolate the square: a(x − h)² + k = 0 becomes a(x − h)² = −k. Then you divide by a and take the square root: x − h = ±√(−k/a), so x = h ± √(−k/a).

This method is one of the most intuitive routes to the quadratic formula because you can see how the ± appears: it comes directly from taking a square root. If the expression under the root is negative, you get complex solutions, which is a useful insight for graphing: the parabola does not cross the x-axis in that case.

How to avoid common completing-the-square mistakes

Forgetting to factor out a

If a ≠ 1, you must factor it out from the x² and x terms before you take “half of the coefficient of x.” Completing the square happens inside the parentheses after scaling, otherwise your square term will not match the original expression.

Adding a square without subtracting it

You can’t change the value of an expression while “rewriting.” When you add a value, you must also subtract the same value (in the correct place) to keep the expression equivalent. The whole trick is: add and subtract the same square term, then regroup.

Sign confusion with h

In vertex form a(x − h)² + k, the shift is the opposite of what’s inside the parentheses. If you see (x + 4)², that means h = −4, not +4. This is one of the easiest errors to make when reading vertex form quickly.

Rounding too early

If you round intermediate values, h and k can drift, especially when coefficients are decimals. Use fraction output for exact work when possible, or keep enough precision until the final answer.

When fractions are the best output

Teachers and textbooks often prefer exact results, especially in algebra and precalculus. Completing the square naturally creates halves and quarters, like b/2 and b²/4. That’s why fractions show up even if you start with integers. If your result is h = 3/2 and k = −7/4, fractions preserve the exact meaning and avoid rounding issues in later steps.

Real-world intuition: why squares show up everywhere

Squares appear in geometry (distance), physics (energy), statistics (variance), and many optimization models. Completing the square is a way to reveal the “center” of a quadratic relationship. In physics, it can expose equilibrium points. In business or economics, it can show a peak or minimum cost. In pure graphing, it shows the turning point of the parabola.

If you treat completing the square as “finding the center,” it becomes much easier to remember the goal: you’re rewriting the quadratic so you can see what value of x makes the squared part smallest (or largest if a is negative).

What if the quadratic is already factored?

Factored form, like a(x − r)(x − s), is excellent for seeing roots (x-intercepts). Vertex form is excellent for seeing the turning point. You can switch between forms depending on what you need. If you know the roots, you can also find the axis of symmetry as the average of the roots, then find k by substitution. But completing the square is often the most direct way from standard form to vertex form.

Extra checks to confirm your answer is correct

Expand the vertex form

A reliable check is to expand a(x − h)² + k back out and confirm you get the original coefficients. If you expand correctly, the x² coefficient will be a, the x coefficient will be b, and the constant will be c.

Plug in x = h

If you plug x = h into vertex form, the squared part becomes 0 and y becomes k. That means the point (h, k) lies on the curve. You can also plug x = h into the original expression to confirm you get the same k.

FAQ

Completing the Square Calculator – Frequently Asked Questions

Quick answers about vertex form, steps, axis of symmetry, solving quadratics, and fraction outputs.

Completing the square is a method that rewrites a quadratic expression in the form a(x − h)² + k. This makes it easy to identify the vertex, axis of symmetry, and key graph features of the parabola.

You factor out a from the x-terms, take half of the coefficient of x inside the parentheses, square it, then add and subtract that square to keep the expression equivalent. Finally, simplify to reach vertex form.

Vertex form is a(x − h)² + k, where (h, k) is the vertex. It shows the parabola’s peak/lowest point and makes graphing and optimization problems easier.

For y = ax² + bx + c, the vertex is at h = −b/(2a) and k = c − b²/(4a). Completing the square is a direct way to see the same result in vertex form.

The axis of symmetry is the vertical line x = h that passes through the vertex. In standard form it is x = −b/(2a); in vertex form it is x = h.

If you set ax² + bx + c = 0, completing the square lets you rewrite it as a(x − h)² = −k, then take square roots to solve for x. This is one route to the quadratic formula.

Yes. It generates step-by-step working: factoring out a, adding/subtracting the square term, rewriting as a perfect square, and simplifying into a(x − h)² + k.

Yes. Switch the output format to fractions to see h and k as rational values where possible (helpful for exact algebra answers).

If a = 0, the expression is not quadratic (it becomes linear). Completing the square requires a non-zero a, so the calculator will show an error.

Not exactly. Factoring rewrites a quadratic as a product, while completing the square rewrites it as a squared binomial plus/minus a constant. Both are useful, but for different goals (roots vs vertex/graph).

Results are for education and practice. For graded work, show your steps and keep exact values (fractions) until the final line when required.