How Complete The Square Calculator Works
To use the Complete The Square Calculator, enter the 3 coefficients a, b, and c from a quadratic equation ax² + bx + c = 0. The calculator performs 5 operations:
- Divide all terms by the leading coefficient a, if a ≠ 1.
- Move the constant term to the right side of the equation.
- Compute (b/2a)² and add the value to both sides.
- Factor the left side into a perfect square binomial (x + b/2a)².
- Rewrite the equation in vertex form a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a).
The Complete The Square Calculator displays each algebraic transformation as a numbered step. A geometric proof canvas animates the area model — splitting the bx rectangle, rearranging the two halves into an L-shape, and filling the missing corner square (b/2a)² to form a complete square. The parabola graph tab plots the resulting curve with the vertex, roots, and axis of symmetry labeled.
Complete the Square Formula
The complete the square formula transforms ax² + bx + c into vertex form through 2 core identities:
x² + bx + (b/2)² = (x + b/2)² This identity creates a perfect square trinomial on the left. For a general quadratic ax² + bx + c, the completing the square formula produces:
a(x + b/(2a))² + (c − b²/(4a)) The vertex is located at h = −b/(2a) and k = c − b²/(4a). The axis of symmetry is the vertical line x = h. The discriminant Δ = b² − 4ac determines the number and type of roots: Δ > 0 gives 2 distinct real roots, Δ = 0 gives 1 repeated root, and Δ < 0 gives 2 complex conjugate roots.
Complete the Square Examples
Example 1: x² + 6x + 5 = 0
- The leading coefficient a = 1, so no division is needed.
- Move the constant: x² + 6x = −5.
- Half of b is 6/2 = 3. Square the result: 3² = 9. Add 9 to both sides: x² + 6x + 9 = −5 + 9.
- Factor: (x + 3)² = 4.
- Vertex form: (x + 3)² − 4. Vertex: (−3, −4). Roots: x = −3 ± 2, so x = −1 and x = −5.
Example 2: 2x² + 8x + 3 = 0
- Divide by a = 2: x² + 4x + 1.5 = 0.
- Move constant: x² + 4x = −1.5.
- Half of 4 is 2. Square: 2² = 4. Add 4: x² + 4x + 4 = −1.5 + 4 = 2.5.
- Factor: (x + 2)² = 2.5.
- Multiply back by 2: 2(x + 2)² − 5. Vertex: (−2, −5). Roots: x = −2 ± √(2.5) ≈ −0.42 and −3.58.
Example 3: x² − 4x + 4 = 0
- a = 1, no division needed.
- Move constant: x² − 4x = −4.
- Half of −4 is −2. Square: (−2)² = 4. Add 4: x² − 4x + 4 = 0.
- Factor: (x − 2)² = 0.
- Vertex form: (x − 2)². Vertex: (2, 0). One repeated root: x = 2. Discriminant Δ = 0.
What is Completing the Square?
Completing the square is an algebraic method that rewrites a quadratic expression ax² + bx + c as a perfect square binomial plus a constant, in the form a(x − h)² + k. The method works by adding and subtracting the value (b/(2a))² inside the expression. This value "completes" the square — it fills the gap needed to form a perfect square trinomial that factors into a squared binomial.
Completing the square serves 4 main purposes in algebra and calculus:
- Convert standard form to vertex form for graphing parabolas.
- Derive the quadratic formula x = (−b ± √(b² − 4ac)) / (2a).
- Solve quadratic equations that resist standard factoring, including equations with irrational coefficients or complex conjugate roots.
- Rewrite conic section equations (circles, ellipses, hyperbolas) into standard form during calculus integration steps and before graphing parabolas.
The term "completing the square" comes from geometry. A quadratic x² + bx represents a square (area x²) attached to a rectangle (area bx). Splitting the rectangle and rearranging the halves creates an L-shape with a missing corner. Filling the corner — adding (b/2)² — completes the full square (x + b/2)².
How to Complete the Square
To complete the square for ax² + bx + c, follow these 5 steps:
- Factor out the leading coefficient a from the x² and x terms, if a ≠ 1. Write a(x² + (b/a)x) + c.
- Find half of the coefficient of x. The coefficient of x inside the parentheses is b/a. Half of b/a is b/(2a).
- Square the half-coefficient. Compute (b/(2a))² = b²/(4a²).
- Add and subtract the squared value inside the parentheses: a(x² + (b/a)x + b²/(4a²) − b²/(4a²)) + c.
- Factor the perfect square trinomial and simplify: a(x + b/(2a))² + c − b²/(4a). This is the vertex form a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a).
The step-by-step completing the square process produces the exact vertex (h, k), axis of symmetry x = h, and the direction the parabola opens (upward when a > 0, downward when a < 0).
Completing the Square when a is Not Equal to 1
Completing the square when a is not equal to 1 requires 1 extra step at the start: divide every term by a, or factor a out of the first 2 terms. For non-monic quadratics like 3x² − 12x + 7, the process works as follows:
- Factor out a = 3 from x² and x terms: 3(x² − 4x) + 7.
- Half of −4 is −2. Square: (−2)² = 4.
- Add and subtract 4 inside the parentheses: 3(x² − 4x + 4 − 4) + 7.
- Factor the trinomial and distribute: 3(x − 2)² − 12 + 7 = 3(x − 2)² − 5.
Vertex: (2, −5). The parabola opens upward because a = 3 > 0. When the leading coefficient is negative, the parabola opens downward and the vertex is a maximum point instead of a minimum.
Common error: forgetting to multiply the subtracted value by a when moving the correction term outside the parentheses. In the example above, the −4 inside the parentheses becomes −12 (not −4) after distributing the factor of 3.
Completing the Square When b is 0
Completing the square when b is 0 produces the simplest case. The quadratic ax² + c has no linear term, so no square completion is needed. The equation is already in vertex form: a(x − 0)² + c.
The vertex is at (0, c), and the axis of symmetry is x = 0 (the y-axis). The roots, if they exist, are x = ±√(−c/a). Real roots exist when −c/a ≥ 0. For example, x² − 9 = 0 has roots x = ±3 because −(−9)/1 = 9, and √9 = 3.
When b = 0 and c > 0 with a > 0, the discriminant Δ = 0² − 4ac = −4ac < 0, and the equation has 2 complex conjugate roots: x = ±i√(c/a).
Can You Always Complete the Square?
Yes, completing the square works for every quadratic expression ax² + bx + c where a ≠ 0. The method does not depend on the discriminant, the sign of coefficients, or whether the roots are real or complex. Completing the square succeeds for:
- Perfect square trinomials like x² + 6x + 9 = (x + 3)².
- Equations with no real roots, such as x² + 2x + 5 = (x + 1)² + 4, where the roots are complex: x = −1 ± 2i.
- Equations with irrational coefficients or fractional values, including completing the square with fractions calculator scenarios like x² + 3x + 1 = (x + 3/2)² − 5/4.
- Equations with a negative leading coefficient like −2x² + 8x − 3.
The only restriction is a ≠ 0. When a = 0, the expression becomes linear (bx + c) and is not quadratic.
Complete the Square Steps
The complete the square steps convert any quadratic from standard form to vertex form. Here is the full procedure for ax² + bx + c:
| Step | Action | Result |
|---|---|---|
| 1 | Factor out a from x² and x terms | a(x² + (b/a)x) + c |
| 2 | Find half the coefficient of x | b/(2a) |
| 3 | Square the half-coefficient | b²/(4a²) |
| 4 | Add and subtract inside parentheses | a(x² + (b/a)x + b²/(4a²) − b²/(4a²)) + c |
| 5 | Factor and simplify | a(x + b/(2a))² + c − b²/(4a) |
The vertex is (h, k) where h = −b/(2a) and k = c − b²/(4a). The axis of symmetry is the vertical line x = h.
Completing the Square: 5 Easy Steps
Complete squares step by step using this simplified method for standard quadratics (when a = 1):
- Write the equation as x² + bx = −c (move the constant to the right side).
- Halve the x-coefficient: compute b/2.
- Square the result: compute (b/2)².
- Add (b/2)² to both sides of the equation: x² + bx + (b/2)² = −c + (b/2)².
- Factor the left side as (x + b/2)² and solve for x: x = −b/2 ± √(−c + (b/2)²).
For x² + 10x + 21 = 0: move 21 → x² + 10x = −21. Half of 10 = 5. Square: 25. Add: x² + 10x + 25 = 4. Factor: (x + 5)² = 4. Roots: x = −5 ± 2, giving x = −3 and x = −7.
Complete the Square vs Quadratic Formula
The quadratic formula x = (−b ± √(b² − 4ac)) / (2a) is derived directly from completing the square. Both methods solve every quadratic equation, but they serve different purposes:
| Feature | Complete the Square | Quadratic Formula |
|---|---|---|
| Output | Vertex form + roots | Roots only |
| Vertex (h, k) | Directly visible | Requires extra calculation |
| Speed for roots | 5 steps | 1 substitution |
| Graphing utility | High — gives vertex form | Low — gives roots only |
| SAT/ACT use | Required for vertex questions | Preferred for root-only questions |
| Conic sections | Required | Not applicable |
Use the complete the square method when the goal is to find vertex form, graph a parabola, convert conic section equations to standard form, or solve optimization problems. Use the quadratic formula when the goal is finding roots quickly without needing the vertex. Online algebra calculators like Wolfram Alpha, Symbolab, Mathway, Desmos, and GeoGebra offer both methods. The complete the square calculator on this page provides both the vertex form conversion and roots in a single solve.
Complete the Square Diagram
The complete the square diagram shows the geometric proof behind the algebraic method. The diagram has 4 stages:
- Start with x² + bx. Draw a square with side length x (area = x²) and a rectangle with dimensions x × b (area = bx). Total area = x² + bx.
- Split the rectangle. Cut the bx rectangle into 2 equal pieces, each with dimensions x × (b/2). Area of each piece = bx/2.
- Rearrange into an L-shape. Place one piece on the right side of the x² square and the other below the x² square. The arrangement forms an L-shape with a missing corner.
- Fill the corner. The missing corner is a small square with side length b/2 and area (b/2)². Adding the corner piece completes a larger square with side length (x + b/2) and total area (x + b/2)².
The complete the square diagram proves that x² + bx + (b/2)² = (x + b/2)². The geometric proof makes the algebra visible — the "completing" action is literally filling a missing square in the diagram. The interactive visual proof section above this calculator animates all 4 stages with labeled dimensions.