By Tim King · Updated
Completing the Square Calculator
Vertex Form, Axis of Symmetry and Roots of a Quadratic, Real or Complex
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Completing the Square Calculator works
This completing the square calculator rewrites a quadratic y = ax² + bx + c in vertex form, a(x − h)² + k, and shows each step. It also gives the vertex, the axis of symmetry and the roots, including complex roots when the parabola never crosses the x-axis.
Completing the square turns the x² and x terms into a single perfect square, such as (x + 3)². The leftover constant then tells you how far the parabola sits above or below the axis. It is the method behind the quadratic formula and the quickest way to find a vertex by hand.
How the completing the square calculator works
Take out a from the x terms, halve the x coefficient, square it, then add and subtract that square. The formula that drops out is h = −b ÷ 2a and k = c − b² ÷ 4a, giving y = a(x − h)² + k with the vertex at (h, k).
First example. For x² + 6x + 5, half of 6 is 3 and 3² is 9, so x² + 6x + 5 = (x + 3)² − 9 + 5 = (x + 3)² − 4. The vertex is (−3, −4).
Second example. For 2x² − 12x + 10, factor 2 to get 2(x² − 6x) + 10. Half of −6 is −3, so 2(x − 3)² − 18 + 10 = 2(x − 3)² − 8, with the vertex at (3, −8).
How many real roots does y = (x + 1)² + 4 have? None. A square is never negative, so y is always at least 4.
Standard form, vertex form and vertex for 22 quadratics
| Standard form | Vertex form | Vertex |
|---|---|---|
| y = x² + 6x + 5 | y = (x + 3)² − 4 | (-3, -4) |
| y = x² + 4x + 1 | y = (x + 2)² − 3 | (-2, -3) |
| y = x² − 2x − 3 | y = (x − 1)² − 4 | (1, -4) |
| y = x² + 8x + 15 | y = (x + 4)² − 1 | (-4, -1) |
| y = x² − 6x + 9 | y = (x − 3)² | (3, 0) |
| y = x² + 2x + 5 | y = (x + 1)² + 4 | (-1, 4) |
| y = x² + 10x + 21 | y = (x + 5)² − 4 | (-5, -4) |
| y = x² − 4x − 5 | y = (x − 2)² − 9 | (2, -9) |
| y = x² + 3x + 2 | y = (x + 3/2)² − 1/4 | (-3/2, -1/4) |
| y = x² − 5x + 6 | y = (x − 5/2)² − 1/4 | (5/2, -1/4) |
| y = 2x² + 8x + 3 | y = 2(x + 2)² − 5 | (-2, -5) |
| y = 2x² − 12x + 10 | y = 2(x − 3)² − 8 | (3, -8) |
| y = 3x² + 6x − 9 | y = 3(x + 1)² − 12 | (-1, -12) |
| y = −x² + 4x + 5 | y = −(x − 2)² + 9 | (2, 9) |
| y = -2x² + 8x − 3 | y = -2(x − 2)² + 5 | (2, 5) |
| y = x² − 16 | y = x² − 16 | (0, -16) |
| y = x² + x + 1 | y = (x + 1/2)² + 3/4 | (-1/2, 3/4) |
| y = 4x² + 4x + 1 | y = 4(x + 1/2)² | (-1/2, 0) |
| y = x² − 8x + 12 | y = (x − 4)² − 4 | (4, -4) |
| y = x² + 12x + 20 | y = (x + 6)² − 16 | (-6, -16) |
| y = 5x² + 10x + 2 | y = 5(x + 1)² − 3 | (-1, -3) |
| y = x² − 7x + 10 | y = (x − 7/2)² − 9/4 | (7/2, -9/4) |
Tips
- Halve, then square. The number you add is always (b ÷ 2a)², never b².
- Watch the sign inside. x² + 6x becomes (x + 3)², so the vertex x-value is −3, not 3.
- Negative a flips the shape. The vertex becomes a maximum instead of a minimum.
FAQ
How do you convert standard form to vertex form?
Factor a out of the first two terms, add half the new x coefficient squared inside the bracket and subtract the same amount so nothing changes, then tidy the constant outside. The calculator writes each of these lines so you can copy the method into your own working.
How do you find the roots after completing the square?
Set a(x − h)² + k = 0, so (x − h)² = −k ÷ a. Take the square root of both sides, remembering the plus or minus, then add h. If −k ÷ a is negative there are no real roots, only a complex pair.
Is completing the square the same as the quadratic formula?
The quadratic formula is completing the square done once for the general ax² + bx + c and written out as a result. Both give the same roots. Completing the square also gives the vertex directly, which the formula does not, so it is the better choice for sketching.
What if b is odd or a is not 1?
The method still works but produces fractions. For 3x² + 5x + 1, half of 5/3 is 5/6, so the square is (x + 5/6)² and the constant becomes −13/12. The calculator keeps these as exact fractions rather than rounded decimals.
See also: all Algebra and Geometry tools, Arithmetic, Number Theory, Statistics, Trigonometry and Calculus.
Related tools
Quadratic Equation Calculator
Solve ax² + bx + c = 0, with exact roots and the vertex.
Polynomial Root Calculator
Real and complex roots of any polynomial, with factorisation.
Slope-Intercept Form Calculator
Slope, intercepts and every form of a line from two points.
Linear Equation Calculator
Solve one-variable linear equations with full working.
Arc Length And Sector Area Calculator
Arc length, sector area, chord and segment from radius and angle.