Enter the coefficients of ax² + bx + c (whole numbers, decimals or fractions) and see every step of completing the square, the vertex form a(x − h)² + k with exact fractions, and the solutions in simplified radical form, real or complex.
Last updated:
Quadratic coefficients
Fractions like 3/4 and decimals are fine.
Enter your values to see the result.
Advertisement
Advertisement
How to use the Completing the Square Calculator
Enter a, b and c for ax² + bx + c. Fractions (1/2) and decimals (0.5) both work.
Press Complete the square (results update as you type).
Follow the steps: factor out a, halve the x-coefficient, square it, add and subtract.
Read the vertex form and the vertex (h, k).
See the solutions of ax² + bx + c = 0 in exact and decimal form.
Completing the square, step by step
Step
General
Example: 2x² + 12x + 7
1. Factor out a
a(x² + (b/a)x) + c
2(x² + 6x) + 7
2. Half of b/a, squared
(b/2a)²
3² = 9
3. Add and subtract it
a(x² + (b/a)x + (b/2a)² − (b/2a)²) + c
2(x² + 6x + 9 − 9) + 7
4. Write the perfect square
a(x + b/2a)² − b²/4a + c
2(x + 3)² − 18 + 7
5. Vertex form
a(x − h)² + k
2(x + 3)² − 11
6. Solve = 0
x = h ± √(−k/a)
x = −3 ± √(11/2) = −3 ± (1/2)√22
Common perfect squares
Expanded
Square form
Number added
x² + 2x + 1
(x + 1)²
1
x² + 4x + 4
(x + 2)²
4
x² − 6x + 9
(x − 3)²
9
x² + 10x + 25
(x + 5)²
25
x² + 3x + 9/4
(x + 3/2)²
9/4
x² − x + 1/4
(x − 1/2)²
1/4
Frequently asked questions
What does completing the square mean?
It is rewriting a quadratic ax² + bx + c as a(x − h)² + k by adding and subtracting the square of half the x-coefficient. The result, called vertex form, shows the vertex (h, k) of the parabola directly and makes the equation easy to solve.
What are the formulas for h and k?
h = −b/(2a) and k = c − b²/(4a). For 2x² + 12x + 7: h = −12/4 = −3 and k = 7 − 144/8 = −11, so the vertex form is 2(x + 3)² − 11.
How do I complete the square when a is not 1?
Factor a out of the x² and x terms first: a(x² + (b/a)x) + c. Then complete the square inside the bracket using half of b/a, and remember that the number you subtract is multiplied by a when it leaves the bracket.
How does completing the square solve an equation?
From a(x − h)² + k = 0 you get (x − h)² = −k/a, so x = h ± √(−k/a). This is exactly how the quadratic formula is derived.
What if the number under the square root is negative?
Then the equation has no real solutions and the parabola does not cross the x-axis. The solutions are complex: x = h ± √(k/a)·i, which the calculator shows.
Why is vertex form useful?
It shows the minimum or maximum point (h, k), the axis of symmetry x = h and how the graph is shifted from y = ax². It is used for graphing, optimisation problems and converting to the equation of a parabola in geometry.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.