Skip to the calculator
Rule Calculator

Completing the Square Calculator

With a — the x² coefficient 2, b — the x coefficient -12, c — the constant 23, completing the square comes to 5.0000 — k — the vertex y. It is reached in 8 steps, the last of which is 23 - -12 * -12 / (4 * 2), and each one is printed on the page with its numbers filled in. The formula is the one published by NIST Digital Library of Mathematical Functions, not an approximation fitted to it.

Turns ax² + bx + c into a(x − h)² + k, giving the vertex, the axis of symmetry and the roots that fall straight out of the completed form.

Formula and sources checked · How we check

a — the x² coefficient 2, b — the x coefficient -12, c — the constant 23

5.0000

k — the vertex y for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.

It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.

k — the vertex y
5.0000
h — the vertex x, −b ÷ 2a
--12 / (2 * 2)3
k — the vertex y, c − b² ÷ 4a
23 - -12 * -12 / (4 * 2)5
Axis of symmetry, x =
3
Discriminant, b² − 4ac
-12 * -12 - 4 * 2 * 23-40
Distance from the vertex to each root
0
Smaller root
0
Larger root
0
Where it crosses the y-axis
23

Ask about this in the chat

Worked example

2x² − 12x + 23 completes to 2(x − 3)² + 5. The vertex sits at (3, 5) and the parabola opens upward, so 5 is the minimum value and the curve never reaches the x-axis — which the discriminant confirms at −40.

How to work it out yourself

  1. 1.Read the vertex straight off the completed form: a(x − h)² + k has its turning point at (h, k). That is the whole reason to complete the square rather than use the quadratic formula, which gives the roots and hides the shape.
  2. 2.The sign of a says which way it opens and therefore whether k is a minimum or a maximum. Positive opens upward and k is the smallest value the expression takes.
  3. 3.A negative discriminant means no real roots — the completed form shows why: the square is never negative, so a(x − h)² + k cannot reach zero when k has the same sign as a.

The formula

  1. h — the vertex x, −b ÷ 2a--12 / (2 * 2)
  2. k — the vertex y, c − b² ÷ 4a23 - -12 * -12 / (4 * 2)
  3. Axis of symmetry, x =
  4. Discriminant, b² − 4ac-12 * -12 - 4 * 2 * 23
  5. Distance from the vertex to each root
  6. Smaller root
  7. Larger root
  8. Where it crosses the y-axis

Source: NIST Digital Library of Mathematical Functions — quadratic equations, OpenStax College Algebra — quadratic functions and vertex form

Questions people actually ask

How do you complete the square?
Factor a out of the first two terms, halve the resulting x coefficient, square it, and add and subtract it inside. The result is a(x − h)² + k with h = −b/2a and k = c − b²/4a. Those two formulas are what this page evaluates; the algebra behind them is the same either way.
What is vertex form for?
Reading the graph without drawing it. a(x − h)² + k gives the turning point at (h, k), the axis of symmetry at x = h, the direction from the sign of a, and the width from its size. Standard form gives none of that at a glance.
Why does the quadratic formula work?
It is completing the square done once, in general. Complete the square on ax² + bx + c = 0 and solve for x and the formula falls out — which is why the discriminant b² − 4ac appears in both, and why it decides the number of real roots in both.

Related

Put this calculator on your site

Free, no attribution required beyond the link.

<iframe src="https://rulecalculators.com/embed/completing-the-square" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Completing the Square Calculator"></iframe>
Did this answer your question?