Complete the Square Calculator
Enter the coefficients and watch the square get completed — every step in exact fractions, from factoring out a to the finished vertex form, with the vertex read off at the end.
How this calculator works
The calculator performs the textbook procedure on your exact coefficients and narrates every move: factor the leading coefficient out of the x-terms, take half of what multiplies x, square it, add and subtract that quantity inside the parentheses, recognize the perfect square, and carry the subtracted piece out (multiplied by a — the step everyone forgets). Integer inputs stay in exact reduced fractions from start to finish, so the steps look like what your instructor writes, not like a calculator rounding.
The finished vertex form hands you the parabola's vertex by inspection — no memorized −b/2a required, though the result agrees with it. To go on and solve the equation from vertex form, set it to zero and take a square root, or hand the same coefficients to the quadratic equation solver, which continues that exact path.
The formula
ax² + bx + c = a(x + b/2a)² + (c − b²/4a) vertex form: a(x − h)² + k with h = −b/2a, k = c − b²/4a
The identity follows from expanding (x + d)² = x² + 2dx + d² and matching coefficients: 2d must equal b/a, so d = b/2a. The full method with worked examples is in Paul's Online Math Notes (Lamar University), Solving Quadratic Equations by Completing the Square — the same university reference our quadratic solver cites, because the quadratic formula is this procedure done in general.
Worked example
Complete the square on 2x² + 12x + 5 (the calculator's default):
- Factor the 2 from the x-terms: 2(x² + 6x) + 5
- Half of 6 is 3; squared: 9
- Add and subtract inside: 2(x² + 6x + 9 − 9) + 5
- Perfect square, and the −9 leaves ×2: 2(x + 3)² − 18 + 5
- Combine: 2(x + 3)² − 13
- Vertex: (−3, −13) — a minimum, since a = 2 > 0
Check by expanding: 2(x² + 6x + 9) − 13 = 2x² + 12x + 18 − 13 = 2x² + 12x + 5 ✓. Expansion is always the free proofread for this method.
Assumptions & tips
- The −(b/2a)² leaves the parentheses multiplied by a. In the example, the −9 became −18 outside. Miss that and every later constant is wrong — it's the method's one famous trap.
- Fractions are normal; don't decimalize mid-problem. Half of an odd coefficient is a fraction and stays one. Exact fractions survive the arithmetic; rounded decimals compound error and lose marks.
- Expand to check, every time. Multiplying the vertex form back out must reproduce the original — ten seconds that catches nearly every slip.
- Solving? One square root finishes it. From a(x + d)² + e = 0: (x + d)² = −e/a, take the root, subtract d. That continuation, done in general, is literally the quadratic formula.
- The same move appears beyond parabolas. Turning x² + y² + 6x − 4y = 3 into a circle's center-radius form is completing the square twice — the technique is a lifetime investment, not a chapter.
Frequently asked questions
What does completing the square actually accomplish?
It rewrites ax² + bx + c as a(x + d)² + e — a perfect square plus a constant. In that shape the expression's behavior is transparent: the vertex of the parabola is at (−d, e), the minimum or maximum value is e, and solving the equation becomes a matter of one square root instead of factoring. It is the algebraic move behind the quadratic formula, circle equations from general form, and integrals in calculus.
Why add and subtract the same number?
Because adding zero changes nothing — and (b/2a)² is precisely the zero-sum pair that makes the first three terms a perfect square. The technique looks like a trick the first time and becomes an instinct: any time an expression is one term away from a recognizable pattern, add and subtract that term.
Why half the coefficient of x?
Because expanding (x + d)² gives x² + 2dx + d² — the x-coefficient of a perfect square is always twice the constant inside. Matching your b to that 2d forces d = b/2 (after the leading coefficient is factored out), and then d² is the number that completes the pattern. The "half, then square" recipe is just reading (x + d)² backwards.
What if a is not 1?
Factor it out of the two x-terms first — only those two — and complete the square inside the parentheses. The constant term stays outside. Forgetting to multiply the subtracted (b/2a)² back through by a when it leaves the parentheses is the single most common error in the method, and the calculator's step display shows that multiplication explicitly.
How does this relate to vertex form and graphing?
a(x + d)² + e is vertex form (usually written a(x − h)² + k with h = −d, k = e). Read the graph straight off it: vertex at (h, k), opening upward if a is positive, wider or narrower by |a|, axis of symmetry x = h. If a graphing assignment gives you standard form, completing the square is the bridge.
Sources
- Algebra - Quadratic Equations - Part II — Paul's Online Notes, Paul Dawkins, Lamar University, 2003–2026. tutorial.math.lamar.eduThe completing-the-square procedure this calculator narrates step by step — factor the leading coefficient out of the x-terms, halve the x-coefficient, square it, add and subtract it — and its use to derive the quadratic formula.
- Algebra - Parabolas — Paul's Online Notes, Paul Dawkins, Lamar University, 2003–2026. tutorial.math.lamar.eduVertex form a(x − h)² + k reached by completing the square, reading the vertex and axis of symmetry off it, and the opens-up / opens-down rule this page reports with every result.
Related calculators
Quadratic Equation Solver
Roots (real or complex, in exact and decimal form), discriminant, vertex, and factored form — with every step shown.
t-Test Calculator
One-sample, Welch two-sample, or paired — t statistic, degrees of freedom, and exact p-values from your data.
Chi-Square Test Calculator
Goodness of fit and independence tests with expected counts shown and small-cell warnings.
Plot Digitizer (Graph → Data)
Turn a picture of a chart back into numbers: calibrate the axes, click the points, export CSV.