Completing the Square Calculator tool

Completing the Square Calculator

Completing the square turns ax² + bx + c into vertex form a(x − h)² + k.

What is a completing the square calculator?

A completing the square calculator rewrites a quadratic ax² + bx + c into vertex form a(x − h)² + k. It exposes the vertex (h, k), the discriminant, and real roots when they exist. You enter a, b, and c; a must not be zero.

How to use the Completing the Square Calculator

  1. Enter coefficient a on x² (non-zero).
  2. Enter b on x and constant c.
  3. Read vertex coordinates h and k.
  4. Check discriminant b² − 4ac for root count.
  5. Use vertex form to sketch the parabola quickly.

About this calculator

Completing the square turns ax² + bx + c into vertex form a(x − h)² + k. The vertex sits at (h, k). For x² − 6x + 5, h = 3 and k = −4, so the parabola bottoms out at (3, −4).

The same algebra behind vertex form also feeds the quadratic formula. Discriminant b² − 4ac tells you whether roots are real: positive gives two, zero gives one, negative gives none in the reals.

For full root-finding with complex numbers use [[quadratic]]. For linear cases when a = 0 try [[linear-equation]]. FOIL expansion checks go through [[foil-method]].

Formula for completing the square

h = −b ÷ (2a)
k = c − b² ÷ (4a)
Vertex form: a(x − h)² + k
Δ = b² − 4ac
  • h is the x-coordinate of the vertex
  • k is the y-coordinate of the vertex
  • Δ discriminant tells how many real roots exist

Completing the square example: x² − 6x + 5

Set a = 1, b = −6, c = 5. Compute h = −(−6)/(2×1) = 3. Then k = 5 − (−6)²/4 = 5 − 9 = −4, so vertex form is (x − 3)² − 4 with vertex (3, −4).

Discriminant Δ = (−6)² − 4(1)(5) = 36 − 20 = 16, so two real roots exist. Factoring gives (x − 1)(x − 5) = 0, roots 1 and 5.

Enter the same coefficients to match h = 3, k = −4, and Δ = 16 in the result panel.

For a = −1, b = 4, c = 0, h = 2 and k = 4, vertex form −(x − 2)² + 4 opens downward with maximum 4 at x = 2. Enter those coefficients to read h, k, and Δ on the panel.

For x² + 4x + 1, enter a = 1, b = 4, c = 1. Then h = −4/(2×1) = −2 and k = 1 − 16/4 = −3. Vertex form is (x + 2)² − 3 with vertex (−2, −3).

Discriminant Δ = 16 − 4 = 12, so two irrational roots appear. Enter the same coefficients to read h = −2, k = −3, and Δ = 12.

For 2x² − 8x + 5, use a = 2, b = −8, c = 5. Then h = 2 and k = −3. The parabola opens upward with minimum y = −3 at x = 2.

Set the expression to zero at the vertex x = 2: 2(4) − 16 + 5 = −3, matching k. That quick substitution checks your h and k before you sketch the curve on graph paper.

Common uses

  • Convert x² − 6x + 5 to vertex form
  • Find the vertex of a parabola for graphing
  • Check discriminant before solving quadratics
  • Prepare completing-the-square homework steps
  • Locate min or max of a quadratic model

Frequently asked questions

What is the vertex of x² − 6x + 5?

h = −(−6)/(2×1) = 3. k = 5 − (−6)²/4 = 5 − 9 = −4. Vertex: (3, −4).

What does a negative discriminant mean?

b² − 4ac < 0 means no real roots. The parabola never crosses the x-axis.

Can a be zero?

No. a = 0 makes the equation linear, not quadratic. Use the linear equation calculator instead.

How is vertex form used in graphing?

Plot the vertex (h, k), then use a to sketch opening up or down. Symmetry about x = h makes plotting fast.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026