Completing the Square Calculator

Step-by-step transformation to vertex form with live graph interpretation.

This completing the square calculator rewrites a quadratic from standard form into vertex form with full steps. Enter coefficients from $ax^2 + bx + c$ to get $a(x-h)^2 + k$, including the vertex $(h,k)$, axis of symmetry, and method trace. If you are studying transformations, graph interpretation, or structure, this page is designed as both a calculator and a method reference. For related concepts and methods, explore Algebra Calculators.

Quick links: What It Solves | Step-by-Step | Solve from Vertex Form | Comparative Profiles | Worked Examples

Rewrite a quadratic into vertex form using completing the square:

$$ax^2 + bx + c = a(x-h)^2 + k$$

Quick links: Live Chart | Completing the Square

Must not be 0 for a quadratic equation.


Results

Vertex:

Quadratic summary

  • Root type:
  • Discriminant (Δ):
  • Standard form:
  • Vertex form:
  • Roots:

Quadratic curve and vertex

What You Can Solve with Completing the Square

Completing the square rewrites a quadratic into vertex form so structure becomes immediately readable. Instead of inferring behavior from $ax^2 + bx + c$, you can read the vertex, axis, and opening directly from $a(x-h)^2 + k$. Use this tool when you need a transparent transformation path, not just a final answer.

The output is built for verification: each transformation is explicit, so sign and factoring errors are easier to catch. If your goal is graph interpretation, stop at vertex form. If your goal includes roots, continue from the same form to square isolation and branch solving.

Core Formula and Variable Meaning

The key identity behind completing the square is: $x^2 + px = (x + \frac{p}{2})^2 - (\frac{p}{2})^2$. This identity adds and subtracts the same square term, so the expression changes shape but not value. For general quadratics, the method rewrites $ax^2 + bx + c$ as $a(x-h)^2 + k$, where $h=-\frac{b}{2a}$ and $k=c-\frac{b^2}{4a}$.

Variable meaning stays consistent across every case: $a$ controls opening direction and stretch, $h$ sets horizontal shift, and $k$ sets vertical shift. The vertex is $(h,k)$ and the axis of symmetry is $x=h$.

How to Complete the Square Step by Step

Start from $ax^2+bx+c$. If $a \ne 1$, factor $a$ from the $x^2$ and $x$ terms only. Inside the bracket, take half of the x-coefficient, square it, then add and subtract that square. Convert the three-term pattern into a perfect square, distribute $a$ back if needed, and combine constants. The final result must be in the form $a(x-h)^2+k$.

A compact template for the non-unit leading coefficient case is: $$ax^2 + bx + c = a\left(x^2 + \frac{b}{a}x\right) + c$$ $$= a\left[\left(x + \frac{b}{2a}\right)^2 - \left(\frac{b}{2a}\right)^2\right] + c$$ $$= a\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)$$ This is the high-value pattern behind most completing the square formula calculator workflows.

How to Solve from Vertex Form

Completing the square is also a solving method. After rewriting, set the quadratic equal to zero and isolate the square term: $$a(x-h)^2 + k = 0 \Rightarrow (x-h)^2 = -\frac{k}{a}$$ $$x = h \pm \sqrt{-\frac{k}{a}}$$ If $-\frac{k}{a} < 0$, the equation has complex roots; if it is zero, there is one repeated real root; if positive, there are two distinct real roots.

When your objective is direct root output with discriminant classification, continue with the Quadratic Equation Solver. On this page, the focus is transformation transparency: standard form to vertex form, then optional root extraction. Use this workflow when you need a complete step trace instead of only final numeric roots.

How to Read the Graph from Vertex Form

Vertex form is effectively a graph map. The point $(h,k)$ is the turning point, the axis $x=h$ gives mirror symmetry, and $a$ controls orientation and steepness. If $a>0$, the parabola opens upward and $k$ is a minimum value. If $a<0$, it opens downward and $k$ is a maximum value. This makes vertex-form output practical for fast interpretation before deeper solving.

A fast consistency check is to expand your final vertex form back to standard form. If coefficients do not match the original input exactly (within rounding tolerance for decimals), a sign or distribution error likely occurred. This reverse-expansion check catches most mistakes before you use the result in graphing or solving.

Comparative Quadratic Profiles

The live chart above reflects your exact coefficients. These static profiles provide two educational anchors: one unit-leading case and one non-unit-leading case. Both visuals show the same ideas: the parabola shape, axis of symmetry, and vertex location after completing the square.

Profile A: Unit Leading Coefficient

For $x^2 + 6x + 5$, vertex form is $(x+3)^2-4$. The vertex is $(-3,-4)$ and the axis is $x=-3$.

Parabola profile for x squared plus 6x plus 5 with highlighted vertex at negative 3, negative 4.

Profile B: Non-Unit Leading Coefficient

For $2x^2 + 8x + 1$, vertex form is $2(x+2)^2-7$. The vertex is $(-2,-7)$ and the axis is $x=-2$.

Parabola profile for 2x squared plus 8x plus 1 with highlighted vertex at negative 2, negative 7.

Comparison takeaway: completing the square preserves the same quadratic curve while making vertex and symmetry explicit. Changing $a$ affects width and opening intensity, but the method to recover $h$ and $k$ is the same.

Worked Examples

Example 1: Unit Leading Coefficient

Rewrite: $$x^2 + 6x + 5$$ Half of 6 is 3, and $3^2=9$.

$$x^2 + 6x + 5 = (x^2 + 6x + 9) + 5 - 9$$ $$= (x + 3)^2 - 4$$

Vertex form: $(x+3)^2-4$
Vertex: $(-3,-4)$, axis: $x=-3$.

Example 2: Non-Unit Leading Coefficient

Rewrite: $$2x^2 + 8x + 1$$ Factor 2 from the first two terms: $$2(x^2+4x)+1$$

Complete the square inside: $$2[(x^2+4x+4)-4]+1$$ $$=2(x+2)^2-8+1$$ $$=2(x+2)^2-7$$

Vertex form: $2(x+2)^2-7$
Vertex: $(-2,-7)$, axis: $x=-2$.

Example 3: Already a Perfect Square

Rewrite: $$x^2 - 4x + 4$$ This is already a perfect-square trinomial: $$x^2 - 4x + 4 = (x-2)^2$$

Vertex form: $(x-2)^2+0$
Vertex: $(2,0)$, axis: $x=2$.

Example 4: Solving by Completing the Square

Solve: $$x^2 + 2x - 3 = 0$$ Move constant and complete square: $$x^2+2x = 3$$ $$x^2+2x+1 = 4$$ $$(x+1)^2=4$$

$$x+1=\pm2 \Rightarrow x=1,\,-3$$ This is the standard "solve quadratic equation by completing the square" route.

Why This Method Is Reliable

Completing the square is an identity-based rewrite, not an approximation method. The operation adds and subtracts the same square term, so the polynomial remains algebraically equivalent at every step. That is why the transformation is reliable for vertex extraction, axis detection, and controlled root solving. The curve itself does not change; only the form used to read it changes.

A robust interpretation flow is:

  1. Rewrite to $a(x-h)^2+k$.
  2. Read geometry from $a,h,k$.
  3. Isolate the square term only when root solving is required.

This keeps structure and solving logic separated, which reduces sign drift and interpretation errors.

Input Scope, Precision, and Edge Cases

This calculator assumes a quadratic expression with $a \ne 0$. If $a=0$, the model is linear and should be solved as a first-degree equation. Integer, decimal, and fractional coefficients follow the same transformation rules, including non-unit and negative leading coefficients.

  • Valid quadratic condition: $a \ne 0$.
  • For $a<0$, the parabola opens downward; the same completion steps still apply.
  • Fraction and decimal inputs are valid; exact symbolic steps remain the same even when decimal display is used.
  • If the trinomial is already a perfect square, the workflow collapses to a short verification path.

Common Mistakes and Fast Validation

Most incorrect outputs come from step-order mistakes, not from the core identity. Use this checklist to validate every result before graphing or solving.

  • Add/subtract imbalance: introducing the square term but not subtracting the same term on the same side.
  • Sign inversion between $x+\frac{b}{2a}$ and $x-h$ where $h=-\frac{b}{2a}$.
  • Incorrect factoring when $a \ne 1$ (factoring from the constant term is a frequent source of drift).
  • Dropping terms while distributing or expanding back to standard form.
  • Missing the $\pm$ branch after square-root isolation in root-solving mode.

Minimum verification routine: expand the final vertex form back to $ax^2+bx+c$, confirm the axis is exactly $x=h$, and if roots are computed, substitute them into the original equation. This three-step check is fast and catches nearly all practical transformation errors.

When to Use This Method vs Other Quadratic Methods

Use factoring when factor pairs are obvious, use completing the square when representation and geometry matter, and use formula-first solving when only roots are required quickly. Completing the square is the strongest option when you need a transparent conversion from standard form to vertex form, plus optional root extraction from the same transformed structure.

In practical terms, decide the output target before starting: vertex/axis interpretation, roots, or both. If your target is geometric interpretation, stop at $a(x-h)^2+k$. If your target includes roots, continue from that form to square isolation and branch solving.

Where to Go Next

Continue with Math Calculators to explore algebra, number theory, calculus, and other equation-focused workflows.



Questions About Completing the Square

Quick answers about vertex form, solving flow, and common mistakes.