Skip to main content
math

Completing the Square Calculator

Convert ax² + bx + c to vertex form a(x - h)² + k by completing the square, and find the vertex and roots.

Reviewed by Chase FloiedUpdated

This free online completing the square calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

Coefficient of x² (must not be zero)

Coefficient of x

Constant term

Results

h (x-shift)

0

k (y-shift / minimum or maximum)

0

b/(2a)

0

Discriminant

0

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Completing the Square Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Completing the Square Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Completing the Square Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Completing the Square Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The Completing the Square Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Convert ax² + bx + c to vertex form a(x - h)² + k by completing the square, and find the vertex and roots. The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About Completing the Square Calculator

The Completing the Square Calculator transforms a quadratic expression ax² + bx + c into its vertex form a(x - h)² + k. This technique is one of the most versatile tools in algebra, used not only to solve quadratic equations but also to derive the quadratic formula itself, convert equations of conic sections to standard form, and evaluate integrals in calculus. The vertex form immediately reveals the vertex (h, k) of the parabola, its axis of symmetry x = h, and whether it opens upward (a > 0) or downward (a < 0). The value k represents the minimum (when a > 0) or maximum (when a < 0) of the quadratic function. Completing the square is essential for graphing parabolas, solving optimization problems, and understanding transformations of functions.

The Math Behind It

Completing the square works by adding and subtracting a strategic constant to create a perfect square trinomial. Starting with ax² + bx + c, first factor out a from the first two terms: a(x² + (b/a)x) + c. To complete the square inside the parentheses, take half the coefficient of x, which is b/(2a), and square it to get b²/(4a²). Add and subtract this inside: a(x² + (b/a)x + b²/(4a²) - b²/(4a²)) + c. The first three terms form a perfect square: a((x + b/(2a))² - b²/(4a²)) + c. Distribute a: a(x + b/(2a))² - b²/(4a) + c. Thus h = -b/(2a) and k = c - b²/(4a). This process explains why the vertex of any parabola y = ax² + bx + c is at (-b/(2a), c - b²/(4a)). The completed-square form is particularly useful for integration of quadratic expressions, deriving the quadratic formula, and converting between standard and vertex forms of parabolas. In multivariable calculus, completing the square extends to quadratic forms and is used to classify critical points. The technique also appears in statistics when working with the normal distribution's probability density function.

Formula Reference

Vertex Form

a(x - h)² + k

Variables: h = -b/(2a), k = c - b²/(4a)

Completing the Square Identity

x² + bx = (x + b/2)² - (b/2)²

Variables: Add and subtract (b/2)² to create a perfect square

Worked Examples

Example 1: Monic quadratic

Complete the square for x² + 6x + 2

Step 1:Take half of 6: 6/2 = 3
Step 2:Square it: 3² = 9
Step 3:Add and subtract 9: x² + 6x + 9 - 9 + 2
Step 4:Rewrite: (x + 3)² - 7
Step 5:Vertex form: (x + 3)² - 7, vertex at (-3, -7)

(x + 3)² - 7

Example 2: Non-monic quadratic

Complete the square for 2x² - 8x + 5

Step 1:Factor out 2: 2(x² - 4x) + 5
Step 2:Half of -4 is -2, squared is 4
Step 3:2(x² - 4x + 4 - 4) + 5
Step 4:2(x - 2)² - 8 + 5
Step 5:2(x - 2)² - 3

2(x - 2)² - 3, vertex at (2, -3)

Common Mistakes & Tips

  • !Forgetting to factor out the leading coefficient a before completing the square
  • !Adding (b/2)² inside the parentheses but forgetting to subtract a·(b/2)² outside (when a was factored out)
  • !Confusing the sign of h: vertex form is a(x - h)², so x² + 6x gives (x + 3)² meaning h = -3
  • !Not dividing b by a first when a ≠ 1

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

Why is completing the square useful when we have the quadratic formula?

Completing the square gives the vertex form, which is essential for graphing and optimization. The quadratic formula only finds roots. Additionally, completing the square is used in calculus for integration and in converting conic section equations.

Does completing the square work for all quadratics?

Yes, every quadratic expression can be written in vertex form using completing the square. The process always works, regardless of whether the roots are real or complex.