Completing the Square Calculator - Solve With Steps

Try an example:

Enter the coefficients of ax2 + bx + c

Completing the square on x26x + 8.

Vertex form

(x 3)2 1

Vertex

(3, -1)

Axis of symmetry

x = 3

Minimum value

-1

Discriminant b² − 4ac

4

Solve for x

Set the vertex form to 0, so (x 3)2 = 1, then take the square root of both sides.

x = 4  or  x = 2

Discriminant is positive → two distinct real roots.

Step-by-step

  1. 1

    Take half of that x-coefficient: -3. Square it: 9.

  2. 2

    Add and subtract 9 to build a perfect square. The first three terms collapse into (x 3)2.

  3. 3

    Combine the leftover constants into k = -1, giving the vertex form (x 3)2 1.

How to Use This Calculator

  1. Enter the leading coefficient in the a field (the number in front of x²). It can be any nonzero value, including negatives and decimals.
  2. Enter the middle coefficient in b and the constant in c. For x² − 6x + 8, that's b = −6 and c = 8.
  3. Read the Vertex form card for the a(x − h)² + k rewrite, plus the vertex, axis of symmetry, and minimum or maximum value.
  4. Check the Solve for x card for the roots — real, repeated, or complex, found straight from the completed square.
  5. Follow the numbered Step-by-step panel to see exactly how the square was completed, so you can reproduce it by hand.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Completing the Square Calculator: Convert and Solve Any Quadratic

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Completing the Square Calculator diagram showing a quadratic rewritten as vertex form a(x−h)²+k, with vertex and axis of symmetry marked.

A Completing the Square Calculator takes any quadratic ax² + bx + c and rewrites it as a(x − h)² + k, the vertex form that hands you the parabola's turning point for free. Type in x² − 6x + 8 and it returns (x − 3)² − 1, a vertex at (3, −1), and roots of x = 2 and x = 4 — all in one pass. Below, we'll unpack why the technique is called "completing" a square (it's literally geometry), walk the five moves that work on any quadratic, and finish by using the method to derive the quadratic formula itself.

Why It's Called Completing a Square

Picture x² + 6x as areas. The x² term is a literal square with side length x. The 6x term is a rectangle you can split into two strips of 3x each and glue onto two adjacent sides of that square. Now you have an L-shape that is almost a bigger square with side x + 3 — except one small corner is missing. That corner measures 3 by 3, an area of exactly 9. Add 9 and the figure becomes a complete (x + 3)² square. That missing corner is the "+9" the algebra tells you to add, and 9 is (6/2)² — half the middle coefficient, squared. The name is not a metaphor; you are finishing a geometric square.

This is why the magic number is always (b/2)². Halving b splits the middle rectangle into two equal strips, and squaring gives the area of the one corner needed to close the figure. Once you see the picture, the formula stops feeling arbitrary.

The Five Moves That Work on Any Quadratic

The calculator above automates these, but the rhythm is worth owning because it never changes — even when a is not 1 or the numbers turn into fractions.

  1. Factor a out of the x-terms. Rewrite ax² + bx + c as a(x² + (b/a)x) + c. If a is already 1, skip straight to move two. This step is the one most people forget, and it quietly wrecks the answer whenever the leading coefficient is not 1.
  2. Halve the x-coefficient. Inside the parentheses the coefficient of x is b/a. Take half of it: b/(2a).
  3. Square that half to get (b/2a)², the number that completes the square.
  4. Add and subtract it inside so the value of the expression never changes. The first three terms now factor as (x + b/2a)².
  5. Collect the constants into a single k. What's left is a(x − h)² + k with h = −b/(2a) and k = c − b²/(4a).

A Full Worked Example Where a Isn't 1

The easy examples always use a = 1. The real test is a quadratic like 2x² + 8x + 5, so let's do that one by hand. Factor 2 out of the x-terms: 2(x² + 4x) + 5. Half of 4 is 2; squaring gives 4. Add and subtract 4 inside: 2(x² + 4x + 4 − 4) + 5. The first three terms are (x + 2)², so we get 2((x + 2)² − 4) + 5.

Distribute the 2 back over the −4: 2(x + 2)² − 8 + 5, which tidies to 2(x + 2)² − 3. Vertex form, done. The vertex sits at (−2, −3), and because a = 2 is positive, −3 is the minimum value of the whole parabola. Notice the trap: the −4 lived inside the parentheses, so pulling it out multiplied it by 2. Forgetting that factor is the single most common mistake when a ≠ 1. If you just want the roots and not the vertex, the quadratic formula calculator gets you there in one substitution instead.

Three Things Vertex Form Tells You Instantly

Standard form ax² + bx + c is great for reading off the y-intercept and little else. The moment you complete the square, three facts drop out with zero extra work — which is the whole reason the technique earns its keep.

What vertex form a(x − h)² + k reveals about a parabola
You wantRead it from a(x − h)² + kFor 2(x + 2)² − 3
VertexThe point (h, k)(−2, −3)
Axis of symmetryThe vertical line x = hx = −2
Min or max valuek (a min if a > 0, a max if a < 0)minimum of −3

That axis-of-symmetry line and vertex are exactly what you need to sketch the curve or read off its range. Turning standard form into this shape is precisely what a parabola calculator and a full graphing calculator do under the hood with this same rewrite.

Completing the Square Is Where the Quadratic Formula Comes From

Here's the part textbooks rush past: the quadratic formula is not a separate trick you memorize. It is completing the square done once, symbolically, on the general equation ax² + bx + c = 0. Watch it fall out.

Start by dividing through by a: x² + (b/a)x + c/a = 0. Move the constant over: x² + (b/a)x = −c/a. Half of b/a is b/(2a); its square is b²/(4a²). Add that to both sides. The left becomes a perfect square: (x + b/2a)² = b²/(4a²) − c/a. Put the right side over a common denominator of 4a²: it becomes (b² − 4ac)/(4a²). Take the square root of both sides, subtract b/(2a), and you land on x = (−b ± √(b² − 4ac)) / (2a) — the quadratic formula, digit for digit.

That b² − 4ac under the root is the discriminant, and it decides everything: positive gives two real roots, zero gives one repeated root, negative gives a complex conjugate pair. Our calculator surfaces the discriminant next to the roots so you can see which case you're in. For a deeper proof of the identity, the Wikipedia article on completing the square walks through the same derivation with full rigor.

Where Students Slip: Fractions and Signs

Completing the square by hand is reliable, but a few specific errors show up again and again. Each one produces a believable-looking answer, which is what makes them dangerous.

  • Adding to only one side. When you're solving an equation, whatever you add to complete the square on the left must be added to the right too. Add (b/2a)² to one side alone and you've changed the equation.
  • Forgetting to multiply the added constant by a. If you complete the square inside a(... ), the number you subtract gets multiplied by a when you distribute. That's the −4 becoming −8 in the 2x² + 8x + 5 example.
  • Sign slips on h. Vertex form uses (x − h). If the square is (x + 3)², then h = −3, not 3, so the vertex x-coordinate is negative. The parentheses hide a sign flip.
  • Rounding fractions too early. b/(2a) is often a fraction like −5/2. Keep it exact until the final step; rounding to −2.5 partway through can snowball into a wrong vertex.

When a Completing the Square Calculator Beats Factoring

Factoring is faster when a quadratic has clean integer roots, but it stalls the instant the roots are irrational or complex — and most real quadratics are. Completing the square never stalls: it works on every quadratic, hands you the vertex as a bonus, and is the go-to move for converting to vertex form, integrating certain expressions in calculus, and deriving equations of circles from x² + y² + Dx + Ey + F = 0. When you only need roots from a messy trinomial, factoring tools like the factoring trinomials calculator or the broader quadratic equation calculator are quicker. But when you need the vertex, the range, or a proof that generalizes, completing the square is the method that keeps giving.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.