The completing the square calculator above rewrites any quadratic as a(x − h)2 + k and shows the full method: factoring out the leading coefficient, halving the middle coefficient, squaring it, adding and subtracting it, and collecting the constants. It is built around the working rather than the answer, because completing the square is a technique students are assessed on line by line.
This page is about the method and the vertex form it produces. If you only want the roots of an equation, Arb Digital's quadratic equation solver gives them directly without the intermediate algebra. Come here when the question says "complete the square" or asks for the vertex, the turning point, or the maximum value.
What This Completing the Square Calculator Does
Enter a, b and c. The calculator returns the completed-square expression, the vertex coordinates (h, k), whether that vertex is a minimum or a maximum, and the roots read directly off the completed form. The working panel prints each stage with your numbers in place, including the number you add and subtract, which is the step most people cannot reconstruct later.
It also handles the awkward cases correctly: a negative leading coefficient, an odd middle coefficient that produces a fraction, and a quadratic whose vertex sits above the axis so that no real roots exist.
How to Use It
- Write the quadratic in standard form, ax2 + bx + c, in descending order of power.
- Enter the three coefficients with their signs. For 2x2 + 12x + 10 they are 2, 12 and 10.
- Press Complete the square to get the vertex form and the working.
- Read the vertex from the result — h and k are the turning point coordinates, and their signs are already handled for you.
- Expand your answer to check. Multiplying out a(x − h)2 + k must return the original quadratic exactly.
The Method, Line by Line
Start with ax2 + bx + c. Factor a out of the first two terms only, giving a(x2 + (b/a)x) + c. The constant stays outside — that is the step people most often get wrong, by factoring a out of all three terms and then forgetting to put it back.
Halve the coefficient of x inside the bracket, so b/a becomes b/(2a), and square it to get b2/(4a2). Add and subtract that quantity inside the bracket. Adding and subtracting the same thing changes nothing, but it lets you rewrite the first three terms as a perfect square: a[(x + b/(2a))2 − b2/(4a2)] + c.
Distribute a across the bracket and collect the constants: a(x + b/(2a))2 − b2/(4a) + c. That is the vertex form, with h = −b/(2a) and k = c − b2/(4a). Wolfram MathWorld's entry on completing the square states the identity in the same form.
A Fully Worked Example
Complete the square on 2x2 + 12x + 10.
Step 1 — factor a out of the first two terms. 2(x2 + 6x) + 10. The 10 stays where it is.
Step 2 — halve and square. Half of 6 is 3, and 32 = 9. This is the number to add and subtract.
Step 3 — add and subtract inside the bracket. 2(x2 + 6x + 9 − 9) + 10.
Step 4 — write the perfect square. x2 + 6x + 9 = (x + 3)2, so we have 2[(x + 3)2 − 9] + 10.
Step 5 — distribute and collect. 2(x + 3)2 − 18 + 10 = 2(x + 3)2 − 8. Note that the −9 became −18 when it passed through the factor of 2 — forgetting to multiply it is the classic error.
Reading off the vertex: the expression is smallest when (x + 3)2 = 0, so h = −3 and k = −8, and the turning point is (−3, −8). Since a = 2 is positive the parabola opens upward, so that is a minimum. Expanding to check: 2(x2 + 6x + 9) − 8 = 2x2 + 12x + 18 − 8 = 2x2 + 12x + 10.
Reading the Roots Straight Off the Completed Square
Vertex form solves the equation almost for free. Set 2(x + 3)2 − 8 = 0, so (x + 3)2 = 4, so x + 3 = ±2, giving x = −1 and x = −5. Two things are worth noticing here.
First, the ± appears because a square root has two values — dropping the negative branch loses half the answer, and it is the most common slip in this method. Second, this route works because the variable now appears exactly once, whereas in standard form it appears twice and cannot be isolated. That single-occurrence property is the whole reason completing the square exists.
Run this in general and you get the quadratic formula itself. Completing the square on ax2 + bx + c = 0 gives (x + b/(2a))2 = (b2 − 4ac)/(4a2), and taking the square root of both sides produces x = (−b ± √(b2 − 4ac))/(2a). The formula is not a separate technique — it is this method applied once, symbolically, so nobody has to repeat it.
What the Vertex Form Tells You That Standard Form Hides
Standard form is convenient for reading the y-intercept, which is just c. It tells you almost nothing else at a glance. Vertex form is the opposite: the turning point is sitting right there in the expression.
The sign of a tells you which way the parabola opens, so k is a minimum value when a is positive and a maximum when a is negative. That makes vertex form the direct answer to any optimisation question — maximum profit, minimum cost, peak height of a projectile — without calculus. The value of k also settles the root question immediately: if a and k have the same sign, the vertex sits on the wrong side of the axis for the curve ever to reach it, and there are no real roots. If k is exactly zero, the vertex is on the axis and there is one repeated root.
Vertex form is also the form graph transformations are written in. a(x − h)2 + k reads as the basic parabola y = x2 shifted h to the right, k upward, and stretched vertically by a factor of a. The sign trap is real: (x + 3)2 means h = −3, a shift to the left, because the standard form is (x − h)2.
When b Is Odd and Fractions Appear
Nothing goes wrong when b/a is odd — the halving simply produces a fraction, and the method continues unchanged. For x2 + 5x + 3, half of 5 is 5/2 and its square is 25/4, so the expression becomes (x + 5/2)2 − 25/4 + 3 = (x + 5/2)2 − 13/4, with vertex (−5/2, −13/4).
Students frequently round 5/2 to 2.5 and then to 2 or 3, which shifts the vertex and makes the identity false. Keep the fraction exact until the very end. The fraction calculator is useful for the −25/4 + 3 step, where the common denominator matters.
Beyond Quadratics: Where This Method Turns Up Again
Completing the square is not only a quadratic technique. It is the standard way to convert the general equation of a circle, x2 + y2 + Dx + Ey + F = 0, into centre-radius form — you complete the square separately in x and in y, and the centre falls out as (−D/2, −E/2). The same move puts ellipses and hyperbolas into their standard forms.
In calculus it makes integrals tractable: an integrand with x2 + 6x + 13 underneath becomes (x + 3)2 + 4 after completing the square, which is a standard arctangent form. In statistics it is the algebraic step that turns the exponent of a normal distribution into a recognisable squared deviation; the resulting Gaussian form is catalogued in the NIST Digital Library of Mathematical Functions, section 7.2. The technique keeps reappearing because it does one specific, valuable thing: it reduces two occurrences of a variable to one.
Arb Digital builds fast, dependency-free interactive calculators designed to rank and be genuinely useful. Browse the free library or tell us what you need.
Browse Free Tools Talk To UsCommon Mistakes to Avoid
- Factoring a out of the constant term too. Only the x2 and x terms get the leading coefficient pulled out; c stays outside the bracket.
- Forgetting to multiply the subtracted square by a. If you subtract 9 inside a bracket multiplied by 2, you have actually subtracted 18.
- Getting the sign of h backwards. (x + 3)2 corresponds to h = −3, so the vertex is at x = −3, not +3.
- Dropping the negative root. Square-rooting both sides gives ±, and omitting the minus branch loses one of the two solutions.
- Rounding fractions mid-method. Halving an odd coefficient gives an exact fraction; rounding it makes the final identity false.
Related Free Tools From Arb Digital
For the roots without the intermediate algebra, use the quadratic equation solver. The fraction calculator keeps the halving step exact, the square root calculator handles the final square-rooting, the exponent calculator covers the squaring, and the slope calculator is useful when a question mixes a parabola with a straight line. The full free online tools hub has the rest.
Frequently Asked Questions
It means rewriting a quadratic so the variable appears only once, inside a perfect square bracket, plus a constant. The result is the vertex form a times x minus h all squared, plus k.
Half the coefficient of x inside the bracket, then squared. If the bracket contains x squared plus six x, half of six is three and three squared is nine, so you add and subtract nine.
Factor a out of the x squared and x terms only, leaving the constant outside the bracket. Complete the square inside, then multiply the subtracted amount by a as you distribute.
In the form a times x minus h all squared plus k, the vertex is the point h, k. If the bracket reads x plus three, then h is minus three because the standard form subtracts h.
It is a minimum when a is positive, because the parabola opens upward, and a maximum when a is negative. The value of that extreme is k.
Completing the square on the general quadratic and then taking the square root of both sides produces the formula directly. The formula is this method carried out once with letters instead of numbers.
Halving it gives a fraction, which is fine. Keep the fraction exact rather than rounding it, or the completed square will no longer equal the original quadratic.
This calculator is provided for study and reference. Expand your completed-square answer to confirm it reproduces the original quadratic before submitting it.