Completing the Square Calculator — Step-by-Step Solutions
The Completing the Square Calculator converts quadratic expressions from standard form (ax² + bx + c) to vertex form a(x - h)² + k. It finds the vertex, axis of symmetry, and solves the equation step by step.
Enter the coefficients a, b, and c to see the complete transformation, graph the parabola, and find the roots of the equation.
Enter coefficients for ax² + bx + c
Your calculations will appear here
How to Use the Completing the Square Calculator
- Enter the coefficients of your quadratic ax^2 + bx + c. The coefficient a cannot be 0. If your expression has no x term, enter b = 0.
- Choose a mode: Complete the Square writes the vertex form, Convert to Vertex Form lists the standard and vertex forms side by side with the vertex and y-intercept, Graph Parabola plots the curve, and Solve Equation solves ax^2 + bx + c = 0 by completing the square.
- Read the vertex form a(x - h)^2 + k and the vertex (h, k). The axis of symmetry is the line x = h.
- The step-by-step working shows how the constant is added and subtracted, so you can copy the method into your homework.
Formula and Theory
Completing the square rewrites a quadratic ax^2 + bx + c in vertex form a(x - h)^2 + k. The vertex of the parabola is the point (h, k), the axis of symmetry is x = h, and k is the minimum value if a is positive or the maximum if a is negative.
The method: factor a out of the x terms, giving a(x^2 + (b/a)x). Add and subtract the square of half the coefficient, (b / 2a)^2, inside the bracket. The first three terms become a perfect square (x + b/2a)^2, and the leftover constant gives k. The results are h = -b / 2a and k = c - b^2 / 4a.
To solve a quadratic equation this way, move k across and take square roots: a(x - h)^2 = -k leads to x = h plus or minus sqrt(-k / a). When -k / a is negative there are no real roots and the solutions are a pair of complex numbers. Completing the square on the general equation is exactly how the quadratic formula is derived.
Worked Examples
Example 1: Monic quadratic
Problem: Write x^2 + 6x + 5 in vertex form.
Solution: Half of 6 is 3, and 3^2 = 9. Add and subtract 9: x^2 + 6x + 9 - 9 + 5 = (x + 3)^2 - 4. So h = -3 and k = -4.
Answer: (x + 3)^2 - 4, vertex (-3, -4)
Example 2: Leading coefficient other than 1
Problem: Write 2x^2 - 8x + 3 in vertex form and find its roots.
Solution: Factor 2 from the x terms: 2(x^2 - 4x) + 3. Half of -4 is -2, and (-2)^2 = 4. Then 2(x^2 - 4x + 4 - 4) + 3 = 2(x - 2)^2 - 8 + 3 = 2(x - 2)^2 - 5. Roots: 2(x - 2)^2 = 5, so x - 2 = plus or minus sqrt(2.5) = plus or minus 1.5811.
Answer: 2(x - 2)^2 - 5, vertex (2, -5), roots x = 3.5811 and x = 0.4189
Example 3: Solving a quadratic equation
Problem: Solve x^2 + 4x - 12 = 0 by completing the square.
Solution: Move the constant: x^2 + 4x = 12. Add (4/2)^2 = 4 to both sides: x^2 + 4x + 4 = 16, so (x + 2)^2 = 16. Take square roots: x + 2 = plus or minus 4, so x = 2 or x = -6.
Answer: x = 2 or x = -6
Example 4: No real roots
Problem: Write x^2 + 2x + 5 in vertex form and describe its roots.
Solution: Half of 2 is 1, and 1^2 = 1. Then x^2 + 2x + 1 - 1 + 5 = (x + 1)^2 + 4. The square is never negative, so (x + 1)^2 + 4 is at least 4 and never reaches 0. Setting it to zero gives (x + 1)^2 = -4, so x = -1 plus or minus 2i.
Answer: (x + 1)^2 + 4, vertex (-1, 4), complex roots -1 + 2i and -1 - 2i
Frequently Asked Questions
What does completing the square mean?
How do I complete the square when a is not 1?
How do I find the vertex of a parabola?
Is completing the square the same as the quadratic formula?
What if the roots are complex?
Why would I need vertex form?
Related Algebra Calculators
Slope Calculator
Calculate slope from two points, find slope-intercept and point-slope form. Free online slope calculator with graphing.
Quadratic Formula Calculator
Solve quadratic equations using the quadratic formula. Find roots, discriminant, and vertex. Free online quadratic formula calculator.
Solve For X Calculator
Solve algebraic equations for x. Handles linear, quadratic, polynomial, and simple equations. Free online equation solver.
Inverse Calculator
Find the inverse of functions and matrices. Calculate inverse matrices and inverse functions. Free online inverse calculator.
System of Equations Calculator
Solve systems of linear equations with 2 or 3 unknowns. Step-by-step solutions using substitution, elimination, and Cramer's rule. Free online tool.
Complex Number Calculator
Calculate with complex numbers: arithmetic, modulus, conjugate, polar form, powers, and Euler form. Free online complex number calculator.