What Is Completing the Square?
Completing the square is an algebra method for rewriting a quadratic expression so that part of it becomes a squared binomial. For a quadratic function, this is especially useful because it changes the function from standard form into vertex form.
A quadratic in standard form is usually written as:
$$
f(x)=ax^2+bx+c
$$
where \(a \ne 0\). Completing the square rewrites the same function as:
$$
f(x)=a(x-h)^2+k
$$
This second form is called vertex form. It makes the vertex visible: the vertex is \((h,k)\). Once you know the vertex, you can identify the axis of symmetry and the minimum or maximum value of the quadratic without graphing first.
Completing the square does not change the function. It only changes how the same function is written. The standard form is often convenient for seeing the coefficients, while vertex form is often better for understanding the shape and location of the parabola.
Why Completing the Square Matters
Completing the square helps connect algebraic symbols to the graph of a quadratic function. Instead of plotting many points to estimate where a parabola turns, you can rewrite the function and read the turning point directly from the result.
This is useful in algebra classes, graphing, optimization problems, and any situation where a quadratic model has a highest or lowest value. For example, a quadratic can model projectile height, area, revenue, or another quantity that increases and then decreases, or decreases and then increases. The vertex tells you where that turning point occurs.
Completing the square is also one of the ideas behind the quadratic formula. When the general quadratic equation is solved symbolically, the completing-the-square process creates the familiar formula for the roots.
Key Terms to Know
-
Quadratic function: A function whose highest power of the variable is \(2\), commonly written as \(f(x)=ax^2+bx+c\) with \(a \ne 0\).
-
Standard form: The form \(f(x)=ax^2+bx+c\).
-
Vertex form: The form \(f(x)=a(x-h)^2+k\), where \((h,k)\) is the vertex.
-
Parabola: The U-shaped graph of a quadratic function.
-
Vertex: The turning point of a parabola. It is the lowest point when the parabola opens upward and the highest point when it opens downward.
-
Axis of symmetry: The vertical line that passes through the vertex and divides the parabola into two matching halves.
-
Minimum value: The lowest output value of an upward-opening quadratic.
-
Maximum value: The highest output value of a downward-opening quadratic.
How Completing the Square Works
The key idea is based on the binomial square pattern:
$$
(x+p)^2=x^2+2px+p^2
$$
If the expression begins as \(x^2+qx\), then half of \(q\) is the value that belongs inside the binomial. The square to add is:
$$
\left(\frac{q}{2}\right)^2
$$
For a general quadratic function,
$$
f(x)=ax^2+bx+c
$$
first factor \(a\) from the \(x^2\) and \(x\) terms:
$$
f(x)=a\left(x^2+\frac{b}{a}x\right)+c
$$
The coefficient of \(x\) inside the parentheses is \(\frac{b}{a}\). Half of that is:
$$
\frac{b}{2a}
$$
So the square needed inside the parentheses is:
$$
\left(\frac{b}{2a}\right)^2
$$
To keep the function equivalent, the added square must also be balanced by adjusting the outside constant:
$$
f(x)=a\left[\left(x+\frac{b}{2a}\right)^2-\left(\frac{b}{2a}\right)^2\right]+c
$$
Now simplify:
$$
f(x)=a\left(x+\frac{b}{2a}\right)^2+c-a\left(\frac{b}{2a}\right)^2
$$
Because vertex form is \(a(x-h)^2+k\), the vertex coordinates are:
$$
h=-\frac{b}{2a}
$$
and
$$
k=c-a\left(\frac{b}{2a}\right)^2
$$
The value of \(h\) gives the axis of symmetry:
$$
x=h
$$
The value of \(k\) is the function value at the vertex. If \(a>0\), the parabola opens upward and \(k\) is the minimum value. If \(a<0\), the parabola opens downward and \(k\) is the maximum value.
Examples of Completing the Square in Practice
Example 1: A monic quadratic
Rewrite:
$$
f(x)=x^2+6x+1
$$
The coefficient of \(x\) is \(6\). Half of \(6\) is \(3\), and its square is \(9\).
Add and subtract \(9\) so the expression stays equivalent:
$$
f(x)=x^2+6x+9-9+1
$$
The first three terms are a perfect square trinomial:
$$
f(x)=(x+3)^2-8
$$
So the vertex form is:
$$
f(x)=(x+3)^2-8
$$
Since \((x+3)^2=(x-(-3))^2\), the vertex is:
$$
(-3,-8)
$$
The axis of symmetry is \(x=-3\). Because \(a=1\) is positive, the parabola opens upward and the minimum value is \(-8\).
Example 2: A non-monic quadratic
Rewrite:
$$
f(x)=2x^2-8x+5
$$
First factor \(2\) from the \(x^2\) and \(x\) terms:
$$
f(x)=2(x^2-4x)+5
$$
The coefficient of \(x\) inside the parentheses is \(-4\). Half of \(-4\) is \(-2\), and its square is \(4\).
Add and subtract \(4\) inside the parentheses:
$$
f(x)=2\left[(x^2-4x+4)-4\right]+5
$$
Rewrite the perfect square and distribute the outside \(2\) over the subtraction:
$$
f(x)=2(x-2)^2-8+5
$$
Simplify:
$$
f(x)=2(x-2)^2-3
$$
The vertex is:
$$
(2,-3)
$$
The axis of symmetry is \(x=2\). Since \(a=2\) is positive, the parabola opens upward and the minimum value is \(-3\).
Example 3: A downward-opening quadratic
Rewrite:
$$
f(x)=-x^2+4x+1
$$
Factor \(-1\) from the \(x^2\) and \(x\) terms:
$$
f(x)=-(x^2-4x)+1
$$
Half of \(-4\) is \(-2\), and its square is \(4\):
$$
f(x)=-\left[(x^2-4x+4)-4\right]+1
$$
Rewrite the perfect square:
$$
f(x)=-\left[(x-2)^2-4\right]+1
$$
Distribute the negative sign and simplify:
$$
f(x)=-(x-2)^2+4+1
$$
$$
f(x)=-(x-2)^2+5
$$
The vertex is:
$$
(2,5)
$$
The axis of symmetry is \(x=2\). Since \(a=-1\) is negative, the parabola opens downward and the maximum value is \(5\).
How to Interpret the Result
A completed-square result gives the same quadratic function in a form that reveals the graph’s main features.
If the result is:
$$
f(x)=a(x-h)^2+k
$$
then:
| Result part |
Meaning |
| \(a\) |
Controls whether the parabola opens upward or downward, and how narrow or wide it is. |
| \(h\) |
The x-coordinate of the vertex. |
| \(k\) |
The y-coordinate of the vertex and the minimum or maximum value. |
| \((h,k)\) |
The vertex of the parabola. |
| \(x=h\) |
The axis of symmetry. |
When \(a\) is positive, the squared term can never be negative, so the vertex is the lowest point of the graph. In that case, \(k\) is the minimum value.
When \(a\) is negative, the parabola is reflected downward, so the vertex is the highest point of the graph. In that case, \(k\) is the maximum value.
Do not confuse \(k\) with the y-intercept. In standard form, the y-intercept is \(c\), because \(f(0)=c\). In vertex form, \(k\) is the output value at the vertex, not necessarily the output value when \(x=0\).
Common Mistakes and Misconceptions
One common mistake is forgetting to factor out the leading coefficient before completing the square. For example, in \(2x^2-8x+5\), the square is completed inside \(2(x^2-4x)+5\), not directly from \(2x^2-8x\) as though the leading coefficient were \(1\).
Another common mistake is using the wrong sign for \(h\). In vertex form, \(f(x)=a(x-h)^2+k\), the expression inside the parentheses uses \(x-h\). So \(f(x)=(x+3)^2-8\) has \(h=-3\), not \(3\).
It is also easy to mistake the vertex value for a root. The vertex \((h,k)\) tells where the parabola turns. Roots, if they exist, are the \(x\)-values where \(f(x)=0\). Completing the square can help solve for roots, but the vertex and the roots are different features.
A quadratic with a negative leading coefficient does not have a minimum. It has a maximum. The sign of \(a\) determines whether the vertex is the lowest point or the highest point.
Finally, decimal outputs should be treated as rounded numerical values. A rounded decimal can be very useful for graphing and interpretation, but it may not show the exact fractional form of the answer.
When to Use Completing the Square
Use completing the square when you want to:
-
Rewrite a quadratic from standard form to vertex form.
-
Find the vertex of a parabola from an equation.
-
Find the axis of symmetry.
-
Identify the minimum or maximum value of a quadratic function.
-
Understand how a parabola has shifted horizontally or vertically.
-
Prepare a quadratic equation for solving with the square root property.
-
See the algebraic idea behind the quadratic formula.
Completing the square is especially helpful when graphing or interpreting a quadratic function, because vertex form shows the graph’s turning point directly.
Limitations and Things to Keep in Mind
Completing the square applies to quadratic expressions, so the leading coefficient must not be zero. If \(a=0\), the expression \(ax^2+bx+c\) is not quadratic; it is linear or constant.
The method also assumes a single-variable quadratic in \(x\). It does not directly handle multivariable expressions, symbolic parameters, or full equations typed as one expression unless they are first rewritten into the needed coefficient form.
When results are displayed numerically, they may be rounded. Rounded decimal-style output is convenient, but it is not the same as exact symbolic algebra. For example, a value that is exactly \(\frac{1}{3}\) may appear as a decimal approximation.
Very large, very small, or nearly zero leading coefficients can also cause unreliable numerical results. In those cases, it is better to check the algebra by hand or with a symbolic algebra tool.
Completing the square reveals the vertex, axis of symmetry, opening direction, and minimum or maximum value. It does not automatically give a full graph, intercepts, or roots unless you do additional work.
How to Use This Calculator
-
Enter the coefficient A from the standard-form quadratic \(f(x)=Ax^2+Bx+C\).
-
Enter the coefficient B.
-
Enter the coefficient C.
-
Review the vertex form, vertex, axis of symmetry, opening direction, and minimum or maximum value.
-
Read the step-by-step algebra to see how the square was completed.
-
Use an example preset to load sample coefficients, or clear the fields to start over.
Enter the coefficients separately. Do not put the whole quadratic expression into one field. The value of A must not be \(0\) or extremely close to \(0\), because the expression must be quadratic.
Frequently Asked Questions
What does completing the square mean?
Completing the square means adding and subtracting the right value so that part of a quadratic expression becomes a perfect square trinomial. That trinomial can then be rewritten as a squared binomial, such as \((x+3)^2\) or \((x-2)^2\).
Why is vertex form useful?
Vertex form makes the vertex easy to identify. In \(f(x)=a(x-h)^2+k\), the vertex is \((h,k)\), the axis of symmetry is \(x=h\), and \(k\) is the minimum or maximum value depending on the sign of \(a\).
Is completing the square the same as solving a quadratic equation?
Not always. Completing the square is a rewriting method. It can be used to solve quadratic equations, but it can also be used simply to change a quadratic function into vertex form for graphing and interpretation.
Why do I have to factor out the leading coefficient first?
The basic completing-square pattern works cleanly when the coefficient of \(x^2\) inside the parentheses is \(1\). If the original leading coefficient is not \(1\), factoring it out first makes the inside expression match the pattern \(x^2+qx\).
Why is the sign of h easy to mix up?
Vertex form is written as \(a(x-h)^2+k\). Because of the minus sign in the form, \((x+3)^2\) means \(x-(-3)\), so \(h=-3\). The sign inside the parentheses is the opposite of the vertex’s x-coordinate.
Can every quadratic be written in vertex form?
Yes, every single-variable quadratic function with \(a \ne 0\) can be written in vertex form. Some results may be more convenient as fractions or radicals, while numerical tools may display rounded decimals.
Sources and References
Books and Textbooks
-
Lynn Marecek and Andrea Honeycutt Mathis. Intermediate Algebra 2e. OpenStax, 2020. Sections 9.2 “Solve Quadratic Equations by Completing the Square” and Chapter 9 Key Concepts. Section 9.2; Chapter 9 Key Concepts.
-
Jay Abramson. College Algebra 2e. OpenStax, 2021. Section 5.1 “Quadratic Functions.” Section 5.1.