Math
Completing the Square Calculator
Enter a, b, and c from ax^2 + bx + c = 0 and this completing the square calculator writes out each algebraic line: dividing by a, moving the constant, halving and squaring the x-coefficient, factoring the perfect square, and taking the square root.
You get vertex form a(x - h)^2 + k, the vertex, and exact roots with simplified radicals.
Cannot be 0. If a ≠ 1 the first step divides every term by a.
Enter 0 if there is no x term.
Enter 0 if there is no constant.
Try an example
Result
Vertex form
—
- Roots (exact)
- —
- Roots (decimal)
- —
- Vertex
- —
- Axis of symmetry
- —
- Square added
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What completing the square does
Completing the square rewrites a quadratic so the variable appears in exactly one squared term. That form solves the equation with a square root instead of the quadratic formula, and it is also how you convert to The turning point of a parabola, or a corner point of a shape. form to read the vertex of a parabola.
The steps this calculator shows
- If a ≠ 1, divide every term by a so the x^2 The number multiplying a variable, like the 3 in 3x. becomes 1.
- Move the constant to the right side.
- Take half of the x-coefficient and square it. Add that number to both sides.
- Factor the left side as a perfect square (x + b/2a)^2 and simplify the right side to a single fraction.
- Take the square root of both sides, remembering ±, and solve for x.
- Read the vertex form: a(x - h)^2 + k, with vertex (h, k).
How to read the answer
The right side after completing the square is (b^2 - 4ac)/(4a^2), the The b² − 4ac part of the quadratic formula; its sign tells you how many real solutions exist. divided by 4a^2. If it is positive, there are two real roots; zero means one repeated root; negative means the roots are complex because a real square can never be negative. The number h is the The vertical line that splits a parabola into two mirror-image halves., and k is the minimum (a > 0) or maximum (a < 0) value of the quadratic.
Common mistakes
- Adding (b/2)^2 to one side only. Whatever you add on the left must be added on the right.
- Forgetting to halve b before squaring: for x^2 + 8x the number to add is (8/2)^2 = 16, not 64.
- Dropping the ± when taking the square root.
- Mixing up the sign of h: (x + 2)^2 has vertex at x = -2, not x = 2.
- Using a = 0. There is no square to complete without an x^2 term.
Worked examples
Leading coefficient 2
2x^2 + 8x + 3 becomes 2(x + 2)^2 - 5
Vertex form
2(x + 2)^2 - 5
Classic a = 1
x^2 - 6x + 5 becomes (x - 3)^2 - 4 with roots 1 and 5
Vertex form
(x - 3)^2 - 4
Odd middle coefficient gives fractions
x^2 + 3x - 1 becomes (x + 3/2)^2 - 13/4
Vertex form
(x + 3/2)^2 - 13/4
Negative leading coefficient
-x^2 + 4x - 1 becomes -(x - 2)^2 + 3 (maximum 3)
Vertex form
-(x - 2)^2 + 3
Complex roots
x^2 + 2x + 5 becomes (x + 1)^2 + 4, so (x + 1)^2 = -4
Vertex form
(x + 1)^2 + 4
Decimal coefficients
0.5x^2 - 2x + 1 becomes (1/2)(x - 2)^2 - 1
Vertex form
(1/2)(x - 2)^2 - 1
a = 0 is not allowed
0x^2 + 4x + 1 has no square to complete
Vertex form
—
Frequently asked questions
What number do I add when completing the square?+
After the x^2 coefficient is 1, take half of the x-coefficient and square it: for x^2 + bx, add (b/2)^2. Add the same number to both sides of the equation.
How do I complete the square when a is not 1?+
Divide every term by a first (or factor a out of the x^2 and x terms). Then complete the square on the resulting x^2 + (b/a)x. The calculator shows that division as its first line.
Why does completing the square give the vertex?+
Vertex form a(x - h)^2 + k has its squared term equal to 0 exactly when x = h, so the quadratic reaches its extreme value k there. Completing the square is the algebra that produces this form.
What if the right side becomes negative?+
A real number squared is never negative, so there are no real solutions. The solutions are complex: x = -b/(2a) ± i times the square root of the positive version.
Is completing the square the same as the quadratic formula?+
Yes. Completing the square on the general equation ax^2 + bx + c = 0 is exactly how the quadratic formula is derived, so both methods always give the same roots.
Can I use this to convert standard form to vertex form without solving?+
Yes. Ignore the roots and read the vertex form line. Enter any a, b, c and you get a(x - h)^2 + k plus the vertex (h, k) and axis of symmetry.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Quadratic Formula Calculator
Solve ax^2 + bx + c = 0 with exact simplified radicals, reduced fractions, or complex roots, plus discriminant, vertex, factored and vertex forms, a graph, and every step.
Vertex Form Calculator
Convert a quadratic between standard form ax^2 + bx + c and vertex form a(x - h)^2 + k in either direction, with the vertex, axis of symmetry, direction, intercepts, and steps.
Discriminant Calculator
Find the discriminant b^2 - 4ac of a quadratic, classify the roots as rational, irrational, repeated, or complex, and preview the exact roots with steps.
Factoring Trinomials Calculator
Factor ax^2 + bx + c over the integers with the ac-method: the full factor-pair search table, splitting the middle term, grouping, and the roots when it does not factor.
Square Root Calculator
Calculate square roots, simplify exact radicals for whole numbers, and identify perfect squares.
Perfect Square Trinomial Calculator
Check whether ax^2 + bx + c is a perfect square trinomial and factor it as (px + q)^2, or find the missing a, b, or c that completes the square. Uses the b^2 = 4ac test with exact fractions and shows the expansion check.
Last updated: September 4, 2026