CompoundPage

Completing the square calculator

x² + 6x + 5 becomes (x + 3)² - 4 in the completing the square calculator, so x = -1 or x = -5 and the vertex is (-3, -4).

Roots-1 and -5

Exact form
x = -1 or x = -5
Discriminant Positive, so two distinct real roots, and a perfect square, so both are rational.
16
The formula applied
x = (-6 +/- sqrt(16)) / 2
Vertex A minimum, since a is positive and the parabola opens upward.
(-3, -4)
Axis of symmetry
x = -3
Factored form
(x + 1)(x + 5) = 0
Y-intercept
(0, 5)
Sum and product of the roots
-6 and 5
Completed square
(x + 3)^2 - 4

How the Quadratic Formula Calculator works

Completing the square rewrites ax² + bx + c in vertex form, a(x - h)² + k. The completing the square formula is h = -b ÷ 2a and k = c - b² ÷ 4a.

By hand, for x² + 6x + 5: take half the coefficient of x, 6 ÷ 2 = 3, and square it, 9. Add it and take it away again: x² + 6x + 9 - 9 + 5. The first three terms are now a perfect square, so the expression is (x + 3)² - 4.

To solve (x + 3)² - 4 = 0, move the 4 across and take square roots: x + 3 = ±2, so x = -1 or x = -5.

When a is not 1, factor it out of the x terms first. 2x² + 8x + 3 = 2(x² + 4x) + 3 = 2(x + 2)² - 8 + 3 = 2(x + 2)² - 5, with its vertex at (-2, -5).

Done with letters instead of numbers, the same steps derive the quadratic formula: a(x + b/2a)² = b²/4a - c, which rearranges to x = (-b ± √(b² - 4ac)) ÷ 2a.

Vertex form also draws the graph. The parabola's lowest point, or its highest when a is negative, is at (h, k), and the axis of symmetry is the line x = h.

Quadratic Formula Calculator FAQ

What is the vertex form of x² - 4x + 1?

(x - 2)² - 3. Half of -4 is -2, its square is 4, and 1 - 4 = -3. The vertex is (2, -3).

Why add and subtract the same number?

Adding (b/2)² makes a perfect square, and subtracting it again keeps the expression equal to the original. Together they add zero.

When is completing the square easier than the quadratic formula?

When a is 1 and b is even, because halving b leaves whole numbers. It is also the one of the two that gives the vertex directly.

Related calculators

Embed this calculator
<div id="compoundpage-quadratic-formula-calculator"></div>
<script src="https://compoundpage.com/embed/quadratic-formula-calculator.js" async></script>

The same calculation as JSON