Completing the square calculator

Enter the quadratic's coefficients to get its completed-square form, handy for graphing and finding the maximum or minimum.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter coefficient a, coefficient b and coefficient c.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

ax² + bx + c = a(x - h)² + k with h = -b / 2a and k = c - b² / 4a. If a > 0 the parabola opens up and k is a minimum; if a < 0 it opens down and k is a maximum.

Example

Inputs: Coefficient a = 2, Coefficient b = 8, Coefficient c = 3. Result: Vertex form: y = 2(x + 2)^2 - 5; h: -2; k: -5.

Limits and caveats

  • h and k are shown as decimals, not fractions.
  • a must be non-zero.

Questions about this tool

Why complete the square?

It shows the parabola's vertex directly and is how the quadratic formula is derived.

How do I read the vertex from the form?

In y = a(x - h)² + k the vertex is (h, k). Note that (x + 2) means h = -2.

Does it give the maximum or minimum?

Yes. k is the minimum when a is positive and the maximum when a is negative, reached at x = h.