Skip to content
Other

Completing the Square Calculator

Enter the coefficients a, b, and c of your quadratic equation ax² + bx + c = 0 and this calculator solves it by completing the square. You get the discriminant, both roots (real or complex), the vertex form of the parabola, and a full show-your-work panel that walks through each algebraic step. Completing the square always works, for every quadratic with any coefficients, even when the roots are irrational or complex numbers.

Your details

The coefficient of x². Must not be zero (that would not be a quadratic).
The coefficient of x. Can be any real number, including zero.
The constant term. Can be any real number, including zero.
Root x₁Complex roots
2 + 3i

First solution of the quadratic equation

Root x₂2 - 3i
Discriminant (Δ)-36
Vertex form(x - 2)² + 9
Vertex x (h)2
Vertex y (k)9
Root typeTwo complex conjugate roots
-36
Complex roots<-0.001One repeated root-0.001-0.001Two real roots0.001+
01734-327
x
y = ax² + bx + c
xParabola
-334
-2.7531.56
-2.529.25
-2.2527.06
-225
-1.7523.06
-1.521.25
-1.2519.56
-118
-0.7516.56
-0.515.25
-0.2514.06
013
0.2512.06
0.511.25
0.7510.56
110
1.259.56
1.59.25
1.759.06
29
2.259.06
2.59.25
2.759.56
310
3.2510.56
3.511.25
3.7512.06
413
4.2514.06
4.515.25
4.7516.56
518
5.2519.56
5.521.25
5.7523.06
625
6.2527.06
6.529.25
6.7531.56
734

Two complex conjugate roots: x = 2 + 3i, 2 - 3i

  • The roots are complex: 2 + 3i and 2 - 3i.
  • The discriminant is -36 (negative), so the parabola does not cross the x-axis.
  • Completing the square still works; the method always produces the correct roots, real or complex.
  • The vertex is at (2, 9), which is the minimum point of the parabola.

Next stepCompleting the square always works for any quadratic. If you only need the roots, the quadratic formula gives the same answer. Use vertex form when graphing or finding the maximum or minimum value.

Does completing the square always work?

Yes, completing the square always works for any quadratic equation of the form ax² + bx + c = 0, as long as a is not zero. Unlike factoring by inspection, which only works cleanly when the roots happen to be rational, completing the square is a universal algebraic procedure. It transforms any quadratic into the form a(x - h)² = k, from which you solve for x by taking the square root of both sides. When k is positive you get two real roots, when k is zero you get one repeated root, and when k is negative you get two complex conjugate roots. In every case the method terminates with a correct answer. The quadratic formula itself is derived by applying completing the square to the general equation ax² + bx + c = 0, which is why the two methods always agree.

How to complete the square: the five steps

Starting from ax² + bx + c = 0, follow these steps. First, if a is not equal to 1, divide every term by a so the x² coefficient becomes 1. Second, move the constant term to the right side of the equation. Third, take half the x-coefficient, square it, and add that value to both sides. Fourth, the left side is now a perfect square trinomial: factor it as (x + b/2a)². Fifth, take the square root of both sides (remembering the plus-or-minus sign) and isolate x. This calculator shows every numbered sub-step with your actual coefficients substituted in. When b is odd or a is not 1 the intermediate fractions look messier, but the algebra is identical and the method still works.

Vertex form and why it matters

Completing the square converts ax² + bx + c into the vertex form a(x - h)² + k. The point (h, k) is the vertex of the parabola: if a is positive the vertex is the minimum value of the function, and if a is negative it is the maximum. Vertex form makes graphing straightforward because you immediately know the turning point and the axis of symmetry (x = h) without any further computation. This is one reason completing the square is taught beyond root-finding: it gives you the parabola geometry at the same time.

Completing the square versus the quadratic formula

Both methods always produce the correct roots for any quadratic. The quadratic formula x = (-b ± √(b² - 4ac)) / (2a) is a ready-to-use shortcut, but completing the square is the derivation behind it. If you substitute a, b, c as variables into the completing-the-square procedure you arrive at exactly that formula. In practice, the quadratic formula is faster when you only need the roots. Completing the square is more educational because it reveals vertex form as a by-product, and it is preferred in proofs and in completing the square for conic sections in analytic geometry. For numerical work with irrational or complex answers, both approaches produce the same result.

Discriminant and root types

Discriminant (Δ)Root typeCompleting the square gives
Δ > 0 Two distinct real roots Two different real numbers
Δ = 0 One repeated real root One real number (double root)
Δ < 0 Two complex conjugate roots a + bi and a - bi

The discriminant b² - 4ac tells you what kind of roots the quadratic has before you solve it.

Frequently asked questions

Does completing the square always work for quadratic equations?

Yes. Completing the square is an algebraic identity that applies to every quadratic equation ax² + bx + c = 0 where a is not zero. It works regardless of whether the coefficients are integers, fractions, or irrationals, and regardless of whether the roots are real or complex. The only thing that changes depending on the discriminant (b² - 4ac) is the nature of the roots: two distinct reals, one repeated real, or two complex conjugates.

What happens when completing the square gives a negative number under the square root?

When the right-hand side after completing the square is negative, the square root produces an imaginary number. You write it as plus or minus i times the square root of the absolute value. The two resulting roots are complex conjugates, for example 2 + 3i and 2 - 3i. This is a correct and complete answer; it means the parabola does not cross the x-axis. Completing the square has not failed: it has correctly identified complex roots.

When is completing the square more useful than factoring?

Factoring by inspection is fast when the roots are small integers, but it becomes trial-and-error for non-integer roots and it fails entirely for irrational or complex roots. Completing the square always terminates in a finite number of arithmetic steps, so it is the better choice when you are not sure whether the equation factors nicely. It is also the only elementary method that simultaneously gives you the vertex form of the parabola.

What is the discriminant and what does it tell you?

The discriminant is b² - 4ac. If it is positive, there are two distinct real roots. If it is exactly zero, there is one repeated real root (the parabola is tangent to the x-axis). If it is negative, the roots are complex conjugates and the parabola does not cross the x-axis. The discriminant appears automatically when you complete the square because the right-hand side after all steps equals the discriminant divided by 4a².

How does completing the square relate to the quadratic formula?

The quadratic formula is derived by applying completing the square to the general equation ax² + bx + c = 0 with symbolic coefficients. Dividing by a, moving c/a to the right, adding (b/2a)² to both sides, and taking the square root gives x = (-b ± √(b² - 4ac)) / (2a). The two methods are mathematically identical; the formula is just the completing-the-square result written as a single expression.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…