Calculators.Life Calculator
Math

Complete the Square Calculator

Input Parameters

Scenarios
The coefficient of x² (must not be 0)
The coefficient of x
The constant term

Computed Results

Vertex / Completed Square Form
(x - 3)² - 4
Vertex (h, k)(3, -4)
Root 1 (x₁)5
Root 2 (x₂)1
Discriminant (Δ)16

The complete the square calculator converts standard quadratic equations into vertex form. By entering the coefficients of your equation, you can quickly determine the vertex coordinates, the roots (x-intercepts), and the discriminant to understand the exact shape and position of the parabola.

How to Use the Calculator

Follow these steps to convert your quadratic equation from standard form to vertex form:

  1. Enter Coefficient a (x²): Input the leading coefficient. This value determines the direction and width of the parabola and must not be zero.
  2. Enter Coefficient b (x): Input the coefficient of the linear term.
  3. Enter Constant c: Input the constant term of the equation.
  4. Review the Results: The calculator will display the completed square form, the exact (h, k) vertex coordinates, both roots, and the discriminant. You can also view the generated parabola curve chart to visualize the equation.

Formula and Calculation Method

Completing the square transforms a quadratic equation from standard form to vertex form. The standard form is written as ax² + bx + c, while the vertex form is written as:

a(x − h)² + k

To find the vertex coordinates (h, k), the calculator uses the following mathematical relationships:

h = −b ÷ (2 × a)
k = c − (b² ÷ (4 × a))

The calculator also determines the discriminant (Δ), which dictates the nature of the roots:

Δ = b² − 4 × a × c

If the discriminant is positive, there are two real roots. If it is zero, there is one repeated real root. If it is negative, the equation yields two complex roots.

Inputs and Outputs Reference

FieldTypeDescription
Coefficient a (x²)InputThe leading coefficient of the quadratic equation (cannot be 0).
Coefficient b (x)InputThe coefficient of the x term.
Constant cInputThe constant numerical term.
Vertex / Completed Square FormOutputThe equation rewritten in vertex form.
Vertex (h, k)OutputThe coordinates of the parabola's peak or valley.
Root 1 & Root 2OutputThe x-values where the parabola crosses the x-axis (or complex roots if it does not cross).
Discriminant (Δ)OutputThe value used to determine the number and type of roots.

Verified Scenario Walkthroughs

Simple Monic Quadratic

Consider a standard quadratic equation where a = 1, b = -5, and c = 6. The calculator determines the vertex form is (x - 2.5)² - 0.25. The vertex is located at (2.5, -0.25). Because the discriminant is 1, the equation has two real roots: 3 and 2.

Negative Leading Coefficient with Complex Roots

If you input an equation with a = -3, b = 2, and c = -5, the parabola opens downward. The vertex form is -3(x - 0.3333)² - 4.6667, with the vertex at (0.3333, -4.6667). The discriminant is -56, meaning the parabola never crosses the x-axis, resulting in the complex roots 0.333333 + 1.247219i and 0.333333 - 1.247219i.

Practical Use Cases

Converting to vertex form is highly useful in algebra and physics. It allows you to immediately identify the maximum or minimum value of a quadratic function, which is represented by the k value of the vertex. This is applied in projectile motion to find the maximum height of an object. Additionally, completing the square provides a direct method for solving quadratic equations without relying solely on factoring or the standard quadratic formula.

Frequently Asked Questions

What happens if coefficient 'a' is zero?

If coefficient 'a' is zero, the equation is linear rather than quadratic. The complete the square method only applies to quadratic equations, so 'a' must be a non-zero number.

What does a negative discriminant mean?

A negative discriminant indicates that the quadratic equation has no real roots. Geometrically, this means the parabola does not intersect the x-axis. The calculator will output two complex roots containing an imaginary component (i).

How does the vertex form help with graphing?

The vertex form, a(x - h)² + k, explicitly provides the coordinates of the vertex (h, k). This gives you the exact starting point (the peak or valley) of the parabola, making it much easier to graph compared to the standard form.

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.