Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library

Unlock Unlimited Help

Try unlimited chats, explanations, practice, flashcards, and more free for 7 days.

7 days free · cancel anytime

MathGPT Unlimited

  • Chats and explanations
  • Personalized practice exams
  • Custom study guides
  • Flashcard sets
  • Interactive graphs
  • Cancel anytime
Choose a billing period
Ask a parent to pay

No charge for 7 days. After the trial, your selected plan renews automatically until cancelled. Cancel anytime from your plan page; payments are processed securely by Stripe.

Complete the square on any quadratic

Use the free completing the square calculator to model the algebraic relationship, calculate the requested quantity, and verify it in the original expression. Choose a focused operation below to calculate, inspect the method, and connect the result to a visual model.

The visual updates with your calculation.

Result—Choose a mode, enter the known values, and calculate.
Show your work Step-by-step method
  1. The calculation method and verification will appear here.
Ask MathGPT for a full symbolic explanation →
Algebra

Completing the Square Calculator explained

The short version

  • Completing the square rewrites x² + bx as a single squared bracket plus a leftover number.
  • The number you add is always half of b, then squared. Add it, and subtract it straight back so the value does not change.
  • If the leading number in front of x² is not 1, pull it out before you halve anything, or every later step is off.

The formula this page uses

x² + bx → (x + b/2)² − (b/2)² a x² + bx + c → a(x + b/(2a))² + c − b²/(4a)

What each part means

SymbolWhat it means
b — Coefficient of xThe number in front of the single x, with its sign. Half of it goes inside the bracket.
b/2 — Half of bThis exact number appears inside the finished bracket, sign and all.
(b/2)² — The completing numberWhat you add and subtract. It is never negative, because it is something squared.
a — Coefficient of x²If a is not 1, factor it out of the x² and x terms first. It stays outside the bracket.

Show your work: a full example

  1. Start with the equation3x² − 12x + 5 = 0
  2. Factor the 3 out of the first two terms only3(x² − 4x) + 5 = 0
  3. Half of −4 is −2, and (−2)² is 43(x² − 4x + 4 − 4) + 5 = 0
  4. Pull the spare −4 out through the 3, so it becomes −123(x − 2)² − 12 + 5 = 0
  5. Tidy the constants3(x − 2)² = 7
  6. Divide by 3, then take both square roots(x − 2)² = 7/3, so x − 2 = ±1.5275
  7. Write the two answersx = 3.5275 or x = 0.4725

A second, different case

  1. A different case: the leftover goes negativex² + 4x + 9 = 0
  2. Move the constant acrossx² + 4x = −9
  3. Half of 4 is 2, and 2² is 4, so add 4 to both sidesx² + 4x + 4 = −9 + 4
  4. Fold the left side into one bracket(x + 2)² = −5
  5. Read the right sideno real number squares to −5, so there is no real solution
  6. Carry on into the complex numbersx + 2 = ±i√5, so x = −2 ± 2.2361i
Copy-ready example

3x² − 12x + 5 = 0

Start with the equation

The number that completes the square, for each value of b

bHalf of b(b/2)²x² + bx + (b/2)²Folded bracket
639x² + 6x + 9(x + 3)²
10525x² + 10x + 25(x + 5)²
−4−24x² − 4x + 4(x − 2)²
52.56.25x² + 5x + 6.25(x + 2.5)²
−7−3.512.25x² − 7x + 12.25(x − 3.5)²
10.50.25x² + x + 0.25(x + 0.5)²
−3−1.52.25x² − 3x + 2.25(x − 1.5)²

Three mistakes to check for

What students writeWhy it's wrongDo this instead
x² + 6x = 7 becomes (x + 6)² = 7 + 36The whole b was used instead of half of it, so the bracket is wrong and the answers come out 0.557 and −12.557.Halve first: (x + 3)² = 7 + 9 = 16, giving x = 1 and x = −7.
3(x² − 4x + 4 − 4) + 5 = 3(x − 2)² − 4 + 5The spare −4 is still inside the bracket, so it has to be multiplied by the 3 on the way out.Take it out as −12: 3(x − 2)² − 12 + 5 = 3(x − 2)² − 7.
(x − 2)² = 7/3, so x = 2 + 1.5275Only the positive root was taken, which quietly deletes the second answer.Keep both: x = 2 ± 1.5275, so x = 3.5275 and x = 0.4725.

Questions about the Completing the Square Calculator

Why do I have to factor a out before halving b?

Because the rule 'half of b, squared' was built for x² + bx, where the x² has nothing in front of it. In 3x² − 12x the b you see is −12, but the b that matters inside the bracket is −4, which only appears after the 3 comes out.

What if b is an odd number?

Nothing breaks, you just get a fraction. For x² + 5x, half of 5 is 2.5 and 2.5² is 6.25, so the bracket is (x + 2.5)². Many people keep it as (x + 5/2)² and add 25/4 instead, which avoids decimals entirely.

Is completing the square the same thing as the quadratic formula?

The formula is what you get if you complete the square on a general ax² + bx + c once and remember the result. That is why the 2a in the formula's denominator exists: it is the b/(2a) from this method, still sitting there.

When is completing the square worth the extra work?

When you want the turning point rather than the roots. 3(x − 2)² − 7 tells you instantly that the lowest point is at (2, −7). The formula would hand you 3.5275 and 0.4725 and leave you to average them.

Where to go next

Calculate, interpret, verify.

This workspace keeps the formula and the meaning together. Decimal results are rounded for display; retain full precision when you continue a calculation.

01

Enter known values

Match each input to the quantities in the problem and keep units consistent.

02

Use the relationship

The result panel identifies the formula or algorithm and shows the main substitutions.

03

Read the visual

Use the diagram, plot, or data display to check scale, direction, and plausibility.

04

Practice unaided

Move to targeted questions once you can explain why the method applies.

Continue from this result

Turn one calculation into understanding.

Compare another tool, review the underlying idea, then solve a fresh problem without copying the example.

Recommended next tools

Calculators that work well with this one

See all calculators →

Algebra calculator

Evaluate algebraic relationships and inspect the working.

Open free tool

Quadratic formula calculator

Find roots and connect the discriminant to the graph.

Open free tool

Graphing calculator

Compare equations, roots, intercepts, and inequalities visually.

Open free tool
Learn the mathematics

Understand algebra behind this calculator

A calculator confirms an answer. Working the method yourself is what makes the next problem faster.