Completing the Square Calculator

Published on: November 24, 2026
Final Answer: Free | Full Steps: Plus

This Completing the Square Calculator rewrites a quadratic expression as a number times a bracket squared, plus a number on its own, and shows the working line by line. If the x squared term has a number in front, that number is taken out of the x squared and x terms first. The number in front of x is then halved and squared, and that square is added and taken away inside the bracket. The first three terms then make a perfect square, and the numbers left over are tidied into one.

Step-by-step method

  1. Set up the problem.
  2. Write the completing the square formula.
  3. Substitute a, b and c into the formula.
  4. Work out the numbers.

Depending on the expression, some of these steps are not needed, so they are skipped.

Formula: Completing the Square

This formula rewrites any quadratic ax² + bx + c as a bracket squared plus a number. Halve b/a to get the number in the bracket, then work out what is left over.

\(ax^{2} + bx + c = a\left(x + \frac{b}{2a}\right)^{2} + c - \frac{b^{2}}{4a}\)

Useful Tips to Remember

Make the coefficient of \(x^2\) equal to 1 first, then take half of the coefficient of \(x\), square it, and add and subtract it. The bracket becomes \(\left(x + \frac{b}{2}\right)^2\), with the half coefficient inside the bracket. When solving an equation, taking a square root gives both a positive and a negative answer. The completed form shows the vertex of the parabola directly.

Required knowledge

Where Is Completing the Square Used?

Completing the square rewrites a quadratic in the form \(a(x - h)^2 + k\), which shows its turning point straight away. That makes it the method for finding the highest or lowest value of anything that follows a quadratic pattern, such as the height of a thrown ball or the price that gives the most profit. It is also how the quadratic formula itself is proved, and it is used to find the centre and radius of a circle from its equation. In physics and engineering, it rewrites equations into forms that are easier to read and solve.

  • Finding the maximum height of a thrown ball or a water jet
  • Finding the price or size that gives the most profit or the least cost
  • Finding the centre and radius of a circle from its equation
  • Deriving the quadratic formula
  • Sketching parabolas by locating the vertex

Completing the Square Practice Problems

Example 1 completes the square for \(x^2 + 10x + 21\), and Example 2 handles \(2x^2 - 12x + 5\), where the leading coefficient must be taken out first. Try both yourself, then compare each step. For four more free worked examples, check out the Completing the Square Notes.

The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.

See Example 1 Hide Example 1

Problem

\(x^{2} + 10x + 21\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the completing the square formula.
  3. Substitute a, b and c into the formula.
  4. Work out the numbers.

Depending on the expression, some of these steps are not needed, so they are skipped.

Formula

Formula: Completing the Square

This formula rewrites any quadratic ax² + bx + c as a bracket squared plus a number. Halve b/a to get the number in the bracket, then work out what is left over.

\(ax^{2} + bx + c = a\left(x + \frac{b}{2a}\right)^{2} + c - \frac{b^{2}}{4a}\)

Step 1

Step 1 - Set up the problem.

In this problem: The quadratic is \(x^{2} + 10x + 21\), so \(a = 1\), \(b = 10\) and \(c = 21\).

\(x^{2} + 10x + 21\)

Step 2

Step 2 - Write the completing the square formula.

In this problem: Completing the square writes a quadratic as a number times a bracket squared, plus a number on its own.

\(ax^{2} + bx + c = a\left(x + \frac{b}{2a}\right)^{2} + c - \frac{b^{2}}{4a}\)

Step 3

Step 3 - Substitute a, b and c into the formula.

In this problem: Put \(a = 1\), \(b = 10\) and \(c = 21\) into the formula.

\(x^{2} + 10x + 21 = \left(x + \frac{10}{2 \cdot 1}\right)^{2} + 21 - \frac{10^{2}}{4 \cdot 1}\)

Step 4

Step 4 - Work out the numbers.

In this problem: \(\frac{b}{2a}\) is \(5\) and \(c - \frac{b^{2}}{4a}\) is \(-4\).

\(\left(x + \frac{10}{2 \cdot 1}\right)^{2} + 21 - \frac{10^{2}}{4 \cdot 1} = \left(x + 5\right)^{2} - 4\)

Final Answer

\(x^{2} + 10x + 21 = \left(x + 5\right)^{2} - 4\)
See Example 2 Hide Example 2

Problem

\(2x^{2} - 12x + 5\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the completing the square formula.
  3. Substitute a, b and c into the formula.
  4. Work out the numbers.

Depending on the expression, some of these steps are not needed, so they are skipped.

Formula

Formula: Completing the Square

This formula rewrites any quadratic ax² + bx + c as a bracket squared plus a number. Halve b/a to get the number in the bracket, then work out what is left over.

\(ax^{2} + bx + c = a\left(x + \frac{b}{2a}\right)^{2} + c - \frac{b^{2}}{4a}\)

Step 1

Step 1 - Set up the problem.

In this problem: The quadratic is \(2x^{2} - 12x + 5\), so \(a = 2\), \(b = -12\) and \(c = 5\).

\(2x^{2} - 12x + 5\)

Step 2

Step 2 - Write the completing the square formula.

In this problem: Completing the square writes a quadratic as a number times a bracket squared, plus a number on its own.

\(ax^{2} + bx + c = a\left(x + \frac{b}{2a}\right)^{2} + c - \frac{b^{2}}{4a}\)

Step 3

Step 3 - Substitute a, b and c into the formula.

In this problem: Put \(a = 2\), \(b = -12\) and \(c = 5\) into the formula.

\(2x^{2} - 12x + 5 = 2\left(x + \frac{-12}{2 \cdot 2}\right)^{2} + 5 - \frac{\left(-12\right)^{2}}{4 \cdot 2}\)

Step 4

Step 4 - Work out the numbers.

In this problem: \(\frac{b}{2a}\) is \(-3\) and \(c - \frac{b^{2}}{4a}\) is \(-13\).

\(2\left(x + \frac{-12}{2 \cdot 2}\right)^{2} + 5 - \frac{\left(-12\right)^{2}}{4 \cdot 2} = 2\left(x - 3\right)^{2} - 13\)

Final Answer

\(2x^{2} - 12x + 5 = 2\left(x - 3\right)^{2} - 13\)

Notes and Practice Mode

Example Problems

Click one to load it into the box and solve it.