Skip to main content

Interactive Math Workbooks

Practice, learn and master mathematics with interactive exercises and instant feedback.

Completing the Square Calculator

Mathematics - Completing the Square with vertex form

Completing the Square Calculator — Rewrite Quadratics in Vertex Form

Rewrite any quadratic expression in vertex form a(x - h)² + k using the completing the square method. Get step-by-step working for solving equations and finding the vertex. For solving, try our quadratic equation solver.

Complete the Square

Enter a quadratic expression in the form ax² + bx + c. Use ^ for exponents (e.g., x^2 + 6x + 5). Click Calculate to see the vertex form and solution steps.

Vertex form and steps will appear here.
Note: The calculator accepts expressions with or without "= 0". For solving equations, enter the quadratic expression and the result will show the roots as well.

Completing the Square – Complete Explanation

Completing the square is a powerful algebraic technique that transforms any quadratic expression ax² + bx + c into vertex form a(x - h)² + k. This method reveals the vertex of the parabola, solves quadratic equations, and forms the basis for deriving the quadratic formula.

Completing the Square Formula

For ax² + bx + c:
Factor out a: a(x² + (b/a)x) + c
Add and subtract (b/(2a))²: a[x² + (b/a)x + (b/(2a))² - (b/(2a))²] + c
Rewrite: a(x + b/(2a))² + (c - b²/(4a))

Vertex: (-b/(2a), c - b²/(4a))

1. Why Complete the Square?

This technique is essential for:

  • Finding the vertex of a parabola without graphing
  • Solving quadratic equations when factoring is difficult
  • Deriving the quadratic formula
  • Integrating certain rational functions in calculus
  • Identifying conic sections (circles, ellipses, hyperbolas)
  • Finding maximum/minimum values of quadratic functions

2. Step-by-Step Examples

2.1 Example 1: Simple Case (a = 1)

Complete the square for: x² + 6x + 5

Step 1: Coefficient of x is 6. Half of 6 is 3.
Step 2: Square it: 3² = 9.
Step 3: Add and subtract 9:
        x² + 6x + 9 - 9 + 5
Step 4: Group the perfect square:
        (x + 3)² - 4

Vertex Form: (x + 3)² - 4
Vertex: (-3, -4)

Solve x² + 6x + 5 = 0:
x = -1 or x = -5

2.2 Example 2: Leading Coefficient a ≠ 1

Complete the square for: 2x² - 8x + 3

Step 1: Factor out a = 2: 2(x² - 4x) + 3
Step 2: Half of -4 is -2. Square: (-2)² = 4.
Step 3: Add and subtract 4: 2(x² - 4x + 4 - 4) + 3
Step 4: Rewrite: 2((x - 2)² - 4) + 3
Step 5: Distribute: 2(x - 2)² - 5

Vertex Form: 2(x - 2)² - 5
Vertex: (2, -5)

Solve 2x² - 8x + 3 = 0:
x = 2 ± √2.5 ≈ 3.581 or 0.419

3. More Examples

Example 1: x² - 10x + 21

(x - 5)² - 4 | Vertex: (5, -4)

Example 2: 3x² + 12x + 7

3(x + 2)² - 5 | Vertex: (-2, -5)

Example 3: -x² + 6x - 2

-(x - 3)² + 7 | Vertex: (3, 7) — maximum

4. Geometric Interpretation

Completing the square has a geometric meaning: you're literally "completing" a square. For x² + bx, think of a square of side x and a rectangle of dimensions b by x. By adding (b/2)², you form a perfect square of side (x + b/2).

Visual Understanding

The area x² + bx becomes a complete square when you add the missing corner piece (b/2)², giving total area (x + b/2)².

5. Solving Quadratic Equations

Once in vertex form a(x - h)² + k = 0, solving is straightforward:

a(x - h)² = -k
(x - h)² = -k/a
x - h = ±√(-k/a)
x = h ± √(-k/a)

This method always works, even when factoring fails or the roots are irrational.

6. The Discriminant Connection

In vertex form a(x - h)² + k, the term -k/a determines the nature of the roots:

  • -k/a > 0: Two distinct real roots
  • -k/a = 0: One repeated real root (vertex on x-axis)
  • -k/a < 0: No real roots (two complex conjugate roots)

This connects directly to the discriminant b² - 4ac from the quadratic formula.

7. Common Mistakes to Avoid

  • Forgetting to factor out 'a' first: When a ≠ 1, you must factor it from the x² and x terms before completing the square.
  • Not balancing the equation: What you add inside the parentheses must be subtracted (or accounted for) outside.
  • Sign errors with the constant term: Remember to multiply the subtracted term by 'a' when moving it outside.
  • Incorrect vertex coordinates: Vertex is (-b/(2a), f(-b/(2a))). The x-coordinate sign flips from (x - h).
  • Arithmetic with fractions: When b is odd, b/2 is a fraction — work carefully.

8. Deriving the Quadratic Formula

Completing the square on the general form ax² + bx + c = 0 yields the quadratic formula:

ax² + bx + c = 0
x² + (b/a)x = -c/a
x² + (b/a)x + (b/(2a))² = -c/a + (b/(2a))²
(x + b/(2a))² = (b² - 4ac)/(4a²)
x = [-b ± √(b² - 4ac)] / (2a)

9. Applications in Calculus

  • Integration: Transforms integrands like 1/(ax² + bx + c) into arctangent or logarithmic forms.
  • Optimization: Vertex form reveals maximum/minimum values instantly.
  • Differential equations: Solving characteristic equations with complex roots.

10. Real-World Applications

  • Physics: Projectile motion — vertex gives maximum height and time.
  • Economics: Maximizing profit or minimizing cost.
  • Engineering: Optimization problems in design.
  • Architecture: Parabolic arches and cable structures.
  • Computer graphics: Parabolic trajectories and collision detection.

11. Practice Problems with Solutions

Problem 1: Complete the square: x² + 8x + 12

Solution: (x + 4)² - 4 | Vertex: (-4, -4)

Problem 2: Complete the square: 2x² - 12x + 10

Solution: 2(x - 3)² - 8 | Vertex: (3, -8)

Problem 3: Solve: x² - 4x - 5 = 0

Solution: (x - 2)² - 9 = 0 → x = 5 or x = -1

Problem 4: Complete the square: 4x² + 4x + 1

Solution: 4(x + 0.5)² | Vertex: (-0.5, 0)

12. Tips for Mastering

  • Always write the quadratic in standard form first.
  • If a ≠ 1, factor it out before finding (b/2)².
  • Remember: p = b/(2a).
  • Check by expanding — you should get the original expression.
  • Practice with integer and fractional coefficients.

13. Final Thoughts

Completing the square is one of the most elegant techniques in algebra. It transforms a seemingly complex quadratic expression into a form that reveals its deepest properties — the vertex, the axis of symmetry, and the roots.

While this calculator performs the steps automatically, practicing the method by hand develops algebraic fluency that pays dividends throughout mathematics.

14. Frequently Asked Questions

Completing the square does more than solve equations — it reveals the vertex form, which shows the maximum or minimum point immediately. It's essential for graphing, optimization, integration in calculus, and identifying conic sections. The quadratic formula only gives roots; completing the square gives geometric insight.

Factor out the negative along with the coefficient. For -x² + 6x - 2, factor out -1: -(x² - 6x) - 2. Then complete the square on x² - 6x. The negative sign means the parabola opens downward, so the vertex represents a maximum instead of a minimum.

Work with fractions carefully. If b is odd, b/2 is a fraction like 5/2 or -3/2. Squaring gives 25/4 or 9/4. Keep fractions as fractions rather than decimals to avoid rounding errors. For example, x² + 5x + 2 becomes (x + 5/2)² - 17/4.

Expand the vertex form and verify it equals the original expression. For a(x - h)² + k, expand to a(x² - 2hx + h²) + k = ax² - 2ahx + ah² + k. Compare coefficients: b should equal -2ah and c should equal ah² + k. Also verify the vertex by substituting into the original function.

The vertex (h, k) is the turning point of the parabola. If a > 0 (opens upward), the vertex is the minimum point. If a < 0 (opens downward), it's the maximum. The x-coordinate h is the axis of symmetry. In applications, this gives the optimal value and where it occurs — like maximum height or minimum cost.

Explore Math Topics

Continue your learning journey with our other math guides

Conclusion

Completing the square is one of the most elegant techniques in algebra. While this calculator performs the steps automatically, practicing the method by hand develops algebraic fluency that pays dividends throughout mathematics.

Readers who wish to continue practicing and reinforce what they've learned can explore the companion learning resource for guided exercises.