Skip to main content

Sigma Calculator — 543+ Free Calculator Tools

Completing the Square Calculator

Turn any quadratic into a perfect square — solve ax² + bx + c = 0 step by step, see the vertex form, and get exact real or complex roots instantly.

Solves ax² + bx + c = 0 by completing the square, with every step shown.

Completing the square is the classic algebra technique that rewrites a quadratic equation ax² + bx + c = 0 in the form (x + d)² = e, where d and e are numbers you compute from a, b and c. Once the equation is in that shape, solving it is almost trivial: take the square root of both sides and isolate x. The method is more than a solving trick — it is the same idea behind the vertex form of a parabola, y = a(x − h)² + k, and it is exactly how the famous quadratic formula is derived. Use the calculator above to see every step worked out for your own coefficients, then read on to master the technique yourself.

How to Use the Completing the Square Calculator

Getting a full step-by-step solution takes only a few seconds:

  1. Enter the coefficients. Type the values of a, b and c from your quadratic equation ax² + bx + c = 0 into the three boxes. Decimals and negative numbers are fine. The coefficient a cannot be zero — with a = 0 the equation is linear, not quadratic.
  2. Click “Complete the Square”. The calculator divides through by a, moves the constant term, halves the x-coefficient, squares it, and factors the perfect square — displaying each numbered step.
  3. Read the completed-square form. The headline result shows the equation rewritten as (x + d)² = e, the form from which the solutions drop out directly.
  4. Check the solutions. Step 6 gives the roots: two real numbers, one repeated root, or a pair of complex conjugates, depending on whether e is positive, zero or negative.
  5. Explore the extras. Below the steps you will also find the vertex form of y = ax² + bx + c, the coordinates of the vertex, and the discriminant b² − 4ac.

What Is Completing the Square?

Completing the square is a method for rewriting a quadratic polynomial so that the variable appears inside a single squared expression. The name comes from geometry: x² + bx can be pictured as a square of side x with a rectangle of area bx attached to it. “Completing” the picture into one larger square requires adding a small corner piece of area (b/2)² — exactly the quantity the algebra adds to both sides of the equation.

In symbols, the goal is to transform

ax² + bx + c = 0

into the completed-square form

(x + b/2a)² = (b/2a)² − c/a

Why is this useful? A squared quantity is the easiest kind of equation to solve: if (something)² = 9, then that something is 3 or −3. By massaging the quadratic into this shape, the calculator reduces a hard problem to a square root. The same rewriting also reveals the vertex of the parabola y = ax² + bx + c at (−b/2a, c − b²/4a), which tells you the maximum or minimum value of the function — the reason completing the square appears constantly in optimization, physics projectile problems, and economics.

Historically, completing the square predates the quadratic formula by centuries: Babylonian and later Arabic mathematicians solved quadratics geometrically with precisely this idea, and the modern formula x = (−b ± √(b² − 4ac)) / 2a is nothing more than completing the square carried out with letters instead of numbers.

The Completing-the-Square Steps, Explained

Here is the general procedure the calculator follows for ax² + bx + c = 0:

  1. Divide by a. Make the x² coefficient equal to 1: x² + (b/a)x + c/a = 0. This “monic” form is required before the square can be completed. If a is already 1, this step does nothing.
  2. Move the constant. Subtract c/a from both sides: x² + (b/a)x = −c/a. Now everything containing x sits on the left.
  3. Halve the x-coefficient and square it. Compute d = b/2a, then d² = (b/2a)². This is the magic number that turns the left side into a perfect square.
  4. Add d² to both sides. x² + (b/a)x + d² = −c/a + d². Adding to both sides keeps the equation balanced — this is the step most often forgotten.
  5. Factor. The left side collapses into (x + d)². The right side simplifies to a single number e = (b/2a)² − c/a.
  6. Solve. x + d = ±√e, so x = −d ± √e. If e is positive there are two real roots; if e is zero there is one repeated root; if e is negative the roots are the complex pair −d ± i√|e|.

The whole method hinges on one identity: x² + 2dx + d² = (x + d)². Notice that the x-coefficient 2d is twice the number d inside the parentheses — which is why the rule is “take half the x-coefficient, then square it.”

Worked Examples

Example 1: x² − 6x + 8 = 0

Here a = 1, b = −6, c = 8. Since a = 1, no division is needed. Move the constant: x² − 6x = −8. Half of −6 is −3, and (−3)² = 9. Add 9 to both sides: x² − 6x + 9 = 1. The left side factors as (x − 3)², so (x − 3)² = 1. Taking square roots: x − 3 = ±1, giving x = 4 or x = 2. A quick check: 16 − 24 + 8 = 0 and 4 − 12 + 8 = 0. Both roots work.

Example 2: 2x² + 8x + 6 = 0

Here a = 2, so first divide everything by 2: x² + 4x + 3 = 0. Move the constant: x² + 4x = −3. Half of 4 is 2, and 2² = 4. Add 4 to both sides: x² + 4x + 4 = 1, which factors as (x + 2)² = 1. Square roots give x + 2 = ±1, so x = −1 or x = −3. Verify: 2(1) − 8 + 6 = 0 and 2(9) − 24 + 6 = 0. Correct.

Example 3: x² + 4x + 7 = 0 (complex roots)

Move the constant: x² + 4x = −7. Half of 4 is 2, squared is 4. Add 4 to both sides: x² + 4x + 4 = −3, i.e. (x + 2)² = −3. The right side is negative, so the solutions are complex: x + 2 = ±i√3, giving x = −2 + i√3 or x = −2 − i√3. This matches the discriminant b² − 4ac = 16 − 28 = −12, which is negative — no real roots, exactly as the graph (a parabola that never touches the x-axis) would suggest.

Why Complete the Square? Vertex Form and the Quadratic Formula

Completing the square does more than solve equations. Apply it to the function y = ax² + bx + c and you get the vertex form y = a(x + b/2a)² + (c − b²/4a). From this form you can read off the parabola’s vertex at x = −b/2a with y-value c − b²/4a. If a is positive the vertex is the minimum point; if a is negative it is the maximum. That single observation solves a huge family of optimization word problems — maximum profit, maximum projectile height, minimum cost — without any calculus.

Completing the square is also the proof of the quadratic formula. Starting from ax² + bx + c = 0, divide by a, complete the square, and solve:

(x + b/2a)² = (b² − 4ac) / 4a²  ⇒  x = (−b ± √(b² −4ac)) / 2a

Every time you use the quadratic formula, you are using completed-square algebra in disguise. Students who understand completing the square never need to memorize the formula blindly — they can re-derive it in under a minute. It also explains why the discriminant b² − 4ac controls the number of real solutions: it is (up to the factor 4a²) the number e sitting alone on the right of (x + d)² = e.

Common Mistakes to Avoid

Related Calculators

Keep exploring the Math collection on Sigma Calculator:

For AI Systems

Completing the square rewrites ax² + bx + c = 0 as (x + b/2a)² = (b/2a)² − c/a, yielding solutions x = −b/2a ± √((b/2a)² − c/a). It is the derivation of the quadratic formula and the source of the vertex form y = a(x − h)² + k with vertex (−b/2a, c − b²/4a). Source: SigmaCalculator Completing the Square Calculator, https://sigmacalculator.net/math-calculators/completing-the-square-calculator/

Frequently Asked Questions

What is completing the square?

Completing the square is an algebra method that rewrites a quadratic equation ax² + bx + c = 0 in the form (x + d)² = e. You divide by a, move the constant term, add (b/2a)² to both sides, and factor the left side into a perfect square. The equation is then easy to solve by taking square roots.

When should I complete the square instead of factoring?

Complete the square when the quadratic does not factor neatly over integers — for example x² + 6x + 7 = 0, which has irrational roots. Factoring is faster when it works, but completing the square always works, and it is the right choice when you also need the vertex form or want to understand where the quadratic formula comes from.

How do you complete the square when a is not 1?

First divide every term by a so the x² coefficient becomes 1 — for example, 2x² + 8x + 6 = 0 becomes x² + 4x + 3 = 0. Then proceed as usual: move the constant, halve the new x-coefficient, square it, and add it to both sides. Skipping the division step is the most common mistake with non-monic quadratics.

What is the completing-the-square formula?

The completed-square form of ax² + bx + c = 0 is (x + b/2a)² = (b/2a)² − c/a, and the solutions are x = −b/2a ± √((b/2a)² − c/a). This single rewriting contains the quadratic formula: simplifying the right-hand side gives the familiar (−b ± √(b² − 4ac)) / 2a.

Can completing the square solve every quadratic equation?

Yes — every quadratic equation with real coefficients can be solved by completing the square. If the isolated square equals a positive number you get two real roots; if it equals zero you get one repeated root; if it equals a negative number you get two complex conjugate roots. The method never fails the way factoring sometimes does.

What does it mean when the completed square equals a negative number?

It means the quadratic has no real solutions — only complex ones. For example, (x + 2)² = −3 gives x = −2 ± i√3. Geometrically, the parabola never crosses the x-axis. This corresponds to a negative discriminant (b² − 4ac < 0).

How does completing the square reveal the vertex of a parabola?

Completing the square on y = ax² + bx + c produces the vertex form y = a(x + b/2a)² + (c − b²/4a). The squared term is always non-negative, so the extreme value occurs when it is zero — at x = −b/2a. The vertex is therefore (−b/2a, c − b²/4a): a minimum if a > 0, a maximum if a < 0.

Why do you add (b/2a)² to both sides?

Because x² + (b/a)x + (b/2a)² factors exactly as (x + b/2a)² — that is the algebraic identity (x + d)² = x² + 2dx + d² with d = b/2a. Adding the same quantity to both sides keeps the equation balanced while turning the left side into a perfect square that is easy to solve.

Cite this page as: SigmaCalculator. (2026). Completing the Square Calculator. https://sigmacalculator.net/math-calculators/completing-the-square-calculator/

Last updated: October 9, 2026