Skip to content

Completing the square calculator with working

Free TutorAura tool · no sign-up · Updated

Enter aa, bb and cc, and the calculator rewrites ax2+bx+cax^2 + bx + c in completed square form:

a(x+p)2+qa(x + p)^2 + q

From that form you can read the turning point (−p,q)(-p, q) straight away and solve the equation exactly, even when it doesn't factorise.

Loading the tool

Method when a = 1

Example: x2+6x+5x^2 + 6x + 5

  1. Halve the coefficient of xx: 6÷2=36 \div 2 = 3.
  2. Write (x+3)2(x + 3)^2, which expands to x2+6x+9x^2 + 6x + 9.
  3. That's 9 too many compared with the 5 we need, so subtract: (x+3)2+5−9(x + 3)^2 + 5 - 9.
  4. Answer: (x+3)2−4(x + 3)^2 - 4.

Turning point: (−3,−4)(-3, -4), a minimum.

Method when a ≠ 1

Example: 2x2+8x+32x^2 + 8x + 3

  1. Factor 2 out of the xx terms: 2(x2+4x)+32(x^2 + 4x) + 3.
  2. Complete the square inside: x2+4x=(x+2)2−4x^2 + 4x = (x + 2)^2 - 4.
  3. Multiply back: 2[(x+2)2−4]+3=2(x+2)2−8+32[(x + 2)^2 - 4] + 3 = 2(x + 2)^2 - 8 + 3.
  4. Answer: 2(x+2)2−52(x + 2)^2 - 5, with turning point (−2,−5)(-2, -5).

Solving equations

From (x+3)2−4=0(x + 3)^2 - 4 = 0: (x+3)2=4(x + 3)^2 = 4, so x+3=±2x + 3 = \pm 2, giving x=−1x = -1 or x=−5x = -5.

When the number isn't a square, the answer is a surd: x2+4x−1=0x^2 + 4x - 1 = 0 becomes (x+2)2=5(x + 2)^2 = 5, so x=−2±5x = -2 \pm \sqrt{5}. If the right-hand side is negative, there are no real solutions.

Turning points and graphs

The graph of y=a(x+p)2+qy = a(x + p)^2 + q has its turning point at (−p,q)(-p, q). If a>0a > 0 it's a minimum (∪ shape); if a<0a < 0 it's a maximum (∩ shape). The minimum value of (x+3)2−4(x + 3)^2 - 4 is −4-4, which happens when x=−3x = -3. Sketch it with our graphing calculator.

Common mistakes

  • Forgetting to subtract the square of the half: (x+3)2(x + 3)^2 adds an extra 9.
  • Getting the sign of the turning point wrong: (x+3)2(x + 3)^2 gives x=−3x = -3.
  • Not factoring out aa first when a≠1a \neq 1.

Practise with our completing the square questions, and compare with the quadratic equation solver.

Exam tips

  • "Write in the form (x+p)2+q(x + p)^2 + q" wants pp and qq stated, so write them out.
  • Use completed square form to explain why an expression is always positive: (x+3)2+1≥1(x + 3)^2 + 1 \geq 1.
  • Completing the square is Higher tier at GCSE and Extended at IGCSE.

Where the quadratic formula comes from

The quadratic formula is completing the square done once in general. Starting from ax2+bx+c=0ax^2 + bx + c = 0, completing the square gives

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

So any quadratic you can solve with the formula, you can also solve by completing the square. Completing the square has the bonus of giving the turning point, which the formula doesn't.

Frequently asked questions

How do you complete the square?

Halve the coefficient of x to get p, write (x + p)², then subtract p² and add the constant: x² + bx + c = (x + b/2)² − (b/2)² + c.

How do you find the turning point from completed square form?

For a(x + p)² + q, the turning point is (−p, q): a minimum if a > 0, a maximum if a < 0.

Can you complete the square when a is not 1?

Yes: factor a out of the x² and x terms first, complete the square inside the bracket, then multiply back out.

Is anything I type sent to a server?

No. The calculation runs in your browser and nothing is stored.

Sources

  1. GCSE mathematics: subject content and assessment objectives. Department for Education.
  2. Cambridge IGCSE Mathematics 0580 syllabus. Cambridge International.