Completing the Square Calculator
Complete the square for any quadratic equation ax² + bx + c. Get vertex form, vertex coordinates, step-by-step solution, and roots instantly.
About
Completing the square converts a standard quadratic ax2 + bx + c into vertex form a(x − h)2 + k. The procedure is mechanical but error-prone: a sign mistake when halving the linear coefficient or forgetting to multiply the correction term by a will silently produce a wrong vertex. This calculator performs exact rational arithmetic with full GCD-reduced fractions and outputs every intermediate algebraic step. It assumes real coefficients with a ≠ 0.
Results include the vertex (h, k), axis of symmetry x = h, direction of opening, and exact roots (real or complex). Fractional and radical values are simplified. Note: this tool works with rational inputs only. Irrational coefficients like π must be approximated as decimals before entry.
Formulas
The completing-the-square procedure transforms the general quadratic into vertex form by algebraic manipulation of the linear and constant terms.
where the vertex coordinates are:
The discriminant Δ = b2 − 4ac determines root nature. When Δ > 0, two distinct real roots exist. When Δ = 0, one repeated real root. When Δ < 0, two complex conjugate roots.
Where a = coefficient of x2, b = coefficient of x, c = constant term, h = x-coordinate of vertex, k = y-coordinate of vertex, Δ = discriminant.
Reference Data
| Standard Form | Vertex Form | Vertex (h, k) | Axis of Symmetry | Opens |
|---|---|---|---|---|
| x2 + 6x + 5 | (x + 3)2 − 4 | (−3, −4) | x = −3 | Upward |
| 2x2 − 8x + 3 | 2(x − 2)2 − 5 | (2, −5) | x = 2 | Upward |
| −1x2 + 4x − 7 | −1(x − 2)2 − 3 | (2, −3) | x = 2 | Downward |
| x2 − 10x + 25 | (x − 5)2 | (5, 0) | x = 5 | Upward |
| 3x2 + 12x + 7 | 3(x + 2)2 − 5 | (−2, −5) | x = −2 | Upward |
| −2x2 + 6x | −2(x − 1.5)2 + 4.5 | (1.5, 4.5) | x = 1.5 | Downward |
| x2 + 2x + 5 | (x + 1)2 + 4 | (−1, 4) | x = −1 | Upward |
| 5x2 − 20x + 15 | 5(x − 2)2 − 5 | (2, −5) | x = 2 | Upward |
| 4x2 + 4x + 1 | 4(x + 0.5)2 | (−0.5, 0) | x = −0.5 | Upward |
| x2 − 1 | (x)2 − 1 | (0, −1) | x = 0 | Upward |
| −3x2 + 18x − 24 | −3(x − 3)2 + 3 | (3, 3) | x = 3 | Downward |
| 0.5x2 + 3x + 1 | 0.5(x + 3)2 − 3.5 | (−3, −3.5) | x = −3 | Upward |