LazyTools

🔒 Every tool runs in your browser, the files and values you enter are never uploaded to any server. How it works

⬜ Completing the Square Calculator

2x² − 4x + 5 = 2(x − 1)² + 3, completed exactly, with the halve-and-square working written out, plus the vertex (1, 3) it hands you for free.

x² +x +

Coefficients accept integers, decimals and fractions. Need the roots too? Use the quadratic solver.

2(x − 1)² + 3

(1, 3)

vertex (h, k)

x = 1

axis of symmetry

minimum 3

extreme value

Working (completing the square)

  1. Factor a out of the x-terms: 2(x² − 2x) + 5
  2. Take half of the x-coefficient, -2 ÷ 2 = -1, and square it: 1
  3. Add and subtract it inside, regroup: 2(x − 1)² − 2·1 + 5
  4. Collect the constants: k = 5 − 2 = 32(x − 1)² + 3

Vertex form with exact fractions, 2x² − 4x + 5 becomes 2(x − 1)² + 3, every constant exact. Runs locally.

Rate this tool:
Anonymous, no account, no identifier

How the completing the square calculator works

Completing the square rewrites a quadratic in vertex form: factor a out of the x-terms, take half the x-coefficient and square it, add and subtract that square inside, regroup. The calculator performs each of those steps in exact rational arithmetic and displays them numbered, so 3x² + 5x − 1 comes out as 3(x + 5/6)² − 37/12 with honest fractions, where decimal calculators print 3(x + 0.833…)² − 3.083… and the exactness is gone. The vertex (−h, k), axis of symmetry and minimum/maximum value are read straight off the result.

Completing the square is the technique. It's how the quadratic formula is derived, how circles are extracted from x² + y² + Dx + Ey + F = 0, and how integrals with quadratics get solved. The vertex form answers a different question than the roots: where is the extreme point? For the roots themselves, the quadratic solver is the right tool, and the two pages cross-link.

Frequently asked questions

What are the steps to complete the square?

Factor a from the x-terms; take half of the x-coefficient and square it; add and subtract that square; regroup into a(x + h)² + k. The calculator shows each step with your exact numbers.

What is vertex form good for?

It exposes the parabola's vertex (−h, k), axis of symmetry and minimum or maximum instantly, the form for optimization problems and graphing. Standard form hides all three.

How does this relate to the quadratic formula?

The formula IS completing the square done once in general: apply the steps to ax² + bx + c = 0 symbolically and x = (−b ± √(b² − 4ac))/2a falls out. Doing it numerically here is the same walk.

What if a isn't 1?

Factor it out of the x-terms first, the step decimal calculators fumble. 2x² − 4x + 5 → 2(x² − 2x) + 5 → 2(x − 1)² + 3, kept exact throughout.

Does it solve for the roots too?

That's the quadratic equation solver's job (linked on this page). It gives exact roots, the discriminant and the factored form. This page gives the vertex-form identity of the same quadratic.

Related math tools