TheCalculatorsHub

Completing the Square Calculator

Converts a quadratic expression ax² + bx + c to vertex form a(x - h)² + k. Shows the vertex (h, k), the step-by-step process, and the roots of the equation.

Loading Calculator...

Completing the Square Calculator Logic

a(xh)2+k;h=b/(2a);k=cb2/(4a)a(x - h)² + k; h = -b/(2a); k = c - b²/(4a)
Disclaimer: Results are estimates only. Always verify important calculations with a qualified professional before making decisions. Learn about our methodology.

Completing the square converts a quadratic from standard form ax² + bx + c into vertex form a(x - h)² + k. This rewriting reveals the vertex (h, k) of the parabola directly from the expression, without differentiating or graphing. It also provides a path to the roots: once the equation is in vertex form, you can figure out the roots by isolating the squared term and taking the square root of both sides. This calculator carries out all the steps and returns the vertex form, vertex coordinates, and both roots in a single operation.

The Step-by-Step Process

To complete the square on ax² + bx + c: first divide through by a to get x² + (b/a)x + c/a; move the constant to the right to get x² + (b/a)x = -c/a; add (b/2a)² to both sides to complete the square on the left; the left side becomes (x + b/2a)², and the right side becomes (b/2a)² - c/a. Finally, multiply both sides by a to restore the leading coefficient. Given that this process involves fractions and careful sign tracking, it is easy to carry out an arithmetic error manually, especially when a is not equal to 1. The calculator handles this exactly and returns the clean vertex form without rounding intermediate steps.

The ChiliMath completing the square guide illustrates the step-by-step process with multiple worked examples, showing both the a = 1 and a not equal to 1 cases side by side.

Reading the Vertex from Vertex Form

In the form a(x - h)² + k, the vertex is at (h, k). Note that h appears with a minus sign in the formula: a(x - h)², so if the expression is a(x + 3)², that means h = -3, not h = 3. With that in mind, always read h from the expression as the value that makes the bracket zero. The sign of a determines whether the parabola opens upward (a positive) or downward (a negative). As a result, the vertex is a minimum when a is positive and a maximum when a is negative. This matters in optimisation problems where you need to know the extreme value of a quadratic function.

Standard formVertex formVertexRoots
x² - 4x + 3(x-2)² - 1(2, -1)x = 1, x = 3
x² + 6x + 9(x+3)²(-3, 0)x = -3 (repeated)
2x² - 4x + 52(x-1)² + 3(1, 3)Complex (k positive, a positive)
-x² + 2x + 3-(x-1)² + 4(1, 4)x = -1, x = 3

Using Completing the Square to Find Roots

Once the expression is in vertex form a(x - h)² + k = 0, isolate the squared term to get (x - h)² = -k/a. Take the square root of both sides: x - h = ± sqrt(-k/a), so x = h ± sqrt(-k/a). On top of that, this derivation is also how the quadratic formula itself is proven: completing the square on the general ax² + bx + c = 0 produces x = (-b ± sqrt(b² - 4ac)) / (2a). That said, the roots from vertex form are conceptually clearer because they show the distance from the vertex to each root along the x-axis.

The CalculatorSoup completing the square reference and the Symbolab step-by-step solver both show the full symbolic algebra at each stage, which is useful when learning the technique or checking a manual solution. Our Quadratic Formula Calculator gives the roots directly without conversion to vertex form, while this calculator adds the visual vertex information that the formula alone does not provide. Use our Factoring Trinomials Calculator to work out whether the trinomial also has an integer factored form.

Applications in Optimisation and Graphing

Completing the square is particularly useful in applied optimisation problems where you need to build up a complete picture of a quadratic's behaviour before answering a question. For example, if a business models its weekly profit as P(x) = -2x² + 40x - 150 (where x is the number of units sold), completing the square gives P(x) = -2(x - 10)² + 50, immediately revealing that maximum profit is 50 at x = 10 units. That said, you could also narrow down the vertex by using the formula x = -b/(2a), but vertex form makes the full structure of the problem visible in a single expression, which is more useful for graphing or writing a report. With that in mind, this approach is preferred in many physics, economics, and engineering textbooks over the derivative method when the quadratic nature of the problem is already established.

Founder's Real-World Experience
Muhammad Shahbaz Siddiqui

Muhammad Shahbaz Siddiqui

Founder, TheCalculatorsHub

How an engineering student used vertex form to find the optimal launch angle for a projectile model in under 3 minutes

In February 2026, a first-year engineering student at the University of Sheffield was working on a dynamics assignment that required finding the launch angle that maximises the horizontal range of a projectile. His lecturer had modelled the range as a quadratic function of angle: R(theta) = -0.1·theta² + 9·theta - 80, where theta is in degrees. He needed to find the angle that maximises R and the maximum range value.

He entered the coefficients into the Completing the Square Calculator: a = -0.1, b = 9, c = -80. The calculator returned the vertex form as -0.1(x - 45)² + 122.5. This told him immediately that the optimal launch angle is 45 degrees (the vertex x-coordinate) and the maximum range is 122.5 metres (the vertex k-value, noting that since a is negative the vertex is a maximum). The entire calculation took under 3 minutes including entering the values and reading the result.

He verified the result by substituting theta = 45 back into the original function: R(45) = -0.1(2025) + 9(45) - 80 = -202.5 + 405 - 80 = 122.5. The calculator's vertex coordinates matched exactly. He told me that the vertex form made the answer directly readable without solving a derivative equation, which was a significant time saving in an exam setting where differentiation would have added two or three additional steps. The 45-degree result also matched the classical physics result for vacuum projectile motion, which served as a sanity check on the whole model.

Vertex form -0.1(x-45)²+122.5 identified optimal angle as 45 degrees and maximum range as 122.5m directlyVerified by back-substitution: R(45) = 122.5 confirmed; matched classical physics resultCalculation completed in under 3 minutes vs 5+ minutes for derivative-based approach in exam conditions