Completing the square turns a quadratic expression into the form , where the variable appears only once, inside a square. This calculator does the rewriting for you with exact fractions — no rounded decimals — and shows each step of the method exactly as you would write it on paper: factor out , halve the coefficient of , square it, add and subtract it, then group the perfect square.
From the completed square you can read three things at once:
- the vertex of the parabola , and therefore its minimum or maximum value;
- the solutions of , obtained by isolating the square and taking a square root — written as integers, fractions, simplified surds such as , or complex numbers when there is no real solution;
- the discriminant, since the number on the right-hand side is .
Use it to check homework, to convert to vertex form before graphing, or to see where the quadratic formula comes from.
How to use this calculator
- Enter the coefficients a, b and c of . Use negative numbers for minus signs: for , enter 2, −8 and 3. Decimals such as 0.5 are converted to exact fractions.
- Read the completed square at the top, then the vertex, the minimum or maximum, and the solutions.
- Open the steps to follow the method line by line. The last steps solve from the completed square.
The formula
For , factor out of the terms, then add and subtract the square of half the new -coefficient:
So and . Setting the expression to 0:
which is exactly the quadratic formula. A negative right-hand side means complex solutions; zero means a double root.
Worked example
Complete the square for .
- Factor 2 out of the terms: .
- Half of is , and .
- Add and subtract 4 inside: .
- Result: 2(x − 2)² − 5. The vertex is , a minimum because .
To solve : , so and , that is or .
With the result is : the square would have to equal , so the solutions are complex, .
Completing the square or the quadratic formula?
Both give the same solutions — the quadratic formula is simply completing the square done once and for all in letters. Completing the square is the better choice when you also need the vertex form (graphing, finding a maximum profit or a minimum cost), when is even and (the numbers stay small), and in later topics where the formula does not apply: putting the equation of a circle into centre–radius form, identifying conic sections, or preparing an integral such as . To study the curve itself (axis, focus, directrix), see the parabola calculator.
Typical mistakes
- Forgetting to factor out a. The “half the coefficient” rule works only when the coefficient of is 1.
- Adding without subtracting. Adding inside the bracket changes the value unless you remove outside.
- Sign of h. In , means .
- Dropping ±. Taking the square root of both sides gives two values, , not one.
Frequently asked questions
What does it mean to complete the square?
It means adding and subtracting the right constant so that part of a quadratic becomes a perfect square trinomial, like x² + 6x + 9 = (x + 3)². The expression is then written as a(x − h)² + k.
How do I complete the square when a is not 1?
Factor a out of the x² and x terms first, complete the square inside the bracket using half of b/a, and multiply the subtracted square by a when you move it outside. The calculator shows this case step by step.
How do I get the vertex from the completed square?
In a(x − h)² + k the vertex is (h, k). The square is never negative, so k is the minimum value when a > 0 and the maximum value when a < 0, reached at x = h.
Can completing the square solve every quadratic equation?
Yes. It works for any a ≠ 0, including equations that cannot be factored over the integers. When the isolated square equals a negative number the solutions are complex, and the calculator writes them with i.
Why are the results fractions and not decimals?
Halving b/a usually produces fractions, and exact fractions keep the vertex form exact. Approximate decimal solutions are shown separately.
Sources
- OpenStax, College Algebra 2e — §2.5 Quadratic Equations (Completing the Square)
- OpenStax, College Algebra 2e — §5.1 Quadratic Functions (vertex form)
Last updated: