Completing the Square Calculator
Convert ax²+bx+c to vertex form a(x−h)²+k instantly. See every step, the vertex, and x-intercepts.
Enter a, b, and c above then click Complete the Square.
Or choose a Quick Load preset to see a worked example instantly.
Completing the Square — Visual Guide
The algorithm converts any parabola to vertex form. The diagram below shows every transformation step for x² + 6x + 5.
The Completing the Square Algorithm
Completing the square rewrites any quadratic ax²+bx+c into the equivalent vertex form a(x−h)²+k. This form immediately reveals the vertex (h, k), the axis of symmetry x=h, and whether the parabola has real roots.
| Step | Action | Example (x²+6x+5) |
|---|---|---|
| 1 | Write the standard form | x² + 6x + 5 |
| 2 | Factor out a (if a≠1) | a=1, no factoring needed |
| 3 | Find (b/2a)² | (6/2)² = 9 |
| 4 | Add and subtract (b/2a)² | x² + 6x + 9 − 9 + 5 |
| 5 | Factor the perfect square | (x + 3)² − 9 + 5 |
| 6 | Simplify the constant → vertex form | (x + 3)² − 4 |
What Is Completing the Square?
Completing the square is an algebraic technique that transforms a quadratic expression ax²+bx+c into the equivalent vertex form a(x−h)²+k. The technique was historically used to solve quadratic equations before the quadratic formula was derived — and in fact the quadratic formula itself is proved by completing the square on the general form.
The key insight is that (x+p)² = x²+2px+p² is a perfect square trinomial. By adding and subtracting p² = (b/2a)², we can group the first three terms into a perfect square while keeping the equation balanced.
The resulting vertex form a(x−h)²+k directly shows: the vertex (h, k), the axis of symmetry x=h, the direction the parabola opens (a>0 upward, a<0 downward), and the minimum or maximum value k. Finding roots is then straightforward: set the expression equal to zero and solve for x.
How to Find Vertex Form from Standard Form
Given ax²+bx+c, the vertex form a(x−h)²+k is found using two formulas: h = −b/(2a) and k = c − b²/(4a). These can also be expressed as: h is the x-coordinate of the axis of symmetry, and k = f(h), the function value at the vertex.
The completion term (b/2a)² is the quantity added and subtracted in the working. When a≠1, factoring out a first keeps the algebra inside the bracket clean: a(x² + (b/a)x) + c, then complete the square on x² + (b/a)x.
Vertex form is especially useful in calculus (finding stationary points without differentiating), in physics (describing projectile trajectories), and in graphing (the vertex is immediately visible without computing the axis of symmetry separately).
Solving Quadratics via Completing the Square
Once in vertex form a(x−h)²+k = 0, isolate the square: (x−h)² = −k/a. If −k/a is negative, the equation has no real solutions (the parabola does not cross the x-axis). If −k/a = 0, there is one double root x = h. If −k/a > 0, take the square root of both sides: x = h ± √(−k/a).
This derivation is cleaner than the quadratic formula for understanding why discriminant b²−4ac determines the nature of roots: b²−4ac = 0 means −k/a = 0 (vertex touches the axis), and b²−4ac < 0 means −k/a < 0 (no real square root exists).
Discriminant Reference Table
| D = b²−4ac | Root count | Parabola |
|---|---|---|
| D > 0 | Two distinct real roots | Crosses x-axis at two points |
| D = 0 | One repeated root | Touches x-axis at vertex only |
| D < 0 | No real roots | Does not cross x-axis |
Frequently Asked Questions
Why do we add and subtract (b/2a)² rather than just adding it?
What does the vertex (h, k) tell you about the parabola?
Can you complete the square when a is not 1?
What is the relationship between completing the square and the quadratic formula?
When does completing the square have no real solution?
Why is vertex form useful compared to standard form?
What is the axis of symmetry in a parabola?
Can completing the square be used for equations with complex roots?
Related Calculators
Quadratic Formula Calculator
Solve ax²+bx+c=0 with the quadratic formula
Polynomial Roots Calculator
Find roots of higher-degree polynomials
Absolute Value Calculator
Solve |ax+b|=c and absolute value inequalities
Inequality Solver
Solve linear and quadratic inequalities step-by-step
Fraction Calculator
Add, subtract, multiply, and divide fractions
Coordinate Geometry Calculator
Distance, midpoint, slope, and section formula