a□

Completing the Square Calculator

Convert ax²+bx+c to vertex form a(x−h)²+k instantly. See every step, the vertex, and x-intercepts.

Vertex Form Step-by-Step Parabola Diagram X-Intercepts
Share this tool

Quadratic Coefficients

Enter a, b, c for the equation ax² + bx + c

What You Get

  • ✓Vertex form a(x−h)²+k
  • ✓Vertex (h, k) coordinates
  • ✓Step-by-step working
  • ✓Parabola SVG diagram
  • ✓x-intercepts (if real)
  • ✓Discriminant & root count
Quick Load:
Completing the square…
a□

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.

x y x = −3 (−3, −4) x=−1 x=−5 Standard form: x² + 6x + 5 → Vertex form: (x + 3)² − 4 Completion term: (b/2a)² = (3)² = 9 Vertex: (−3, −4) Roots: x = −1, x = −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.

StepActionExample (x²+6x+5)
1Write the standard formx² + 6x + 5
2Factor out a (if a≠1)a=1, no factoring needed
3Find (b/2a)²(6/2)² = 9
4Add and subtract (b/2a)²x² + 6x + 9 − 9 + 5
5Factor the perfect square(x + 3)² − 9 + 5
6Simplify 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²−4acRoot countParabola
D > 0Two distinct real rootsCrosses x-axis at two points
D = 0One repeated rootTouches x-axis at vertex only
D < 0No real rootsDoes not cross x-axis

Frequently Asked Questions

Why do we add and subtract (b/2a)² rather than just adding it?

Adding (b/2a)² without subtracting it would change the value of the expression. By adding and immediately subtracting the same quantity, the net change is zero — the expression is equivalent to the original. We are simply rewriting, not changing.

What does the vertex (h, k) tell you about the parabola?

The vertex (h, k) is the turning point of the parabola. h gives the axis of symmetry x = h, and k is the minimum value of the function when a > 0 (parabola opens upward) or the maximum value when a < 0 (parabola opens downward).

Can you complete the square when a is not 1?

Yes. Factor out a from the x² and x terms first: a(x² + (b/a)x) + c. Then complete the square inside the bracket on x² + (b/a)x by finding (b/2a)². Remember to multiply the completion term by a when subtracting it from outside the bracket.

What is the relationship between completing the square and the quadratic formula?

The quadratic formula is derived by completing the square on the general form ax²+bx+c = 0. Starting with vertex form a(x−h)²+k = 0, solving for x gives x = h ± √(−k/a). Substituting h = −b/(2a) and k = c − b²/(4a) simplifies to x = (−b ± √(b²−4ac)) / (2a) — the quadratic formula.

When does completing the square have no real solution?

When the discriminant b²−4ac is negative (equivalently, when −k/a < 0 in vertex form). This means the vertex is above the x-axis for an upward parabola (a > 0, k > 0) or below for a downward parabola (a < 0, k < 0). The parabola never crosses the x-axis.

Why is vertex form useful compared to standard form?

Vertex form a(x−h)²+k immediately tells you the vertex, the axis of symmetry, whether the parabola opens upward or downward, and the minimum or maximum value — without any further calculation. Standard form is better for quickly reading off the y-intercept (c) and the coefficients for the quadratic formula.

What is the axis of symmetry in a parabola?

The axis of symmetry is the vertical line x = h that divides the parabola into two mirror-image halves. It passes through the vertex. In standard form the axis of symmetry is x = −b/(2a), which is also the x-coordinate of the vertex h.

Can completing the square be used for equations with complex roots?

Yes. When −k/a < 0 in vertex form, taking the square root introduces the imaginary unit i = √(−1). The complex roots are x = h ± i√(k/a). Our calculator currently shows real roots only, consistent with most pre-calculus and A-level curricula.