Solving By Completing The Square Calculator - Vertex Form, Roots, and Discriminant
Use this solving by completing the square calculator to convert ax²+bx+c=0 into vertex form a(x - h)² + k, then read off the roots and the discriminant.
Solving By Completing The Square Calculator
Results
What Is Solving By Completing The Square Calculator?
Solving by completing the square is an algebraic technique that rewrites any quadratic equation ax² + bx + c = 0 into vertex form a(x - h)² + k = 0 so the vertex, axis of symmetry, and x-intercepts are obvious. This solving by completing the square calculator does the algebra for you and returns the vertex, the addend (b/(2a))² that closes the perfect square, and the roots x = h ± √(-k/a) for any real quadratic you enter.
- • Find the vertex of a parabola: Hand a quadratic in standard form and read off (h, k) without graphing.
- • Solve quadratics that resist factoring: Use the completed-square root formula when the discriminant is positive but the equation has no nice integer factors.
- • Derive the quadratic formula in class: Show students how the formula comes from completing the square on ax² + bx + c = 0.
- • Confirm discriminant behavior: Compare D > 0, D = 0, and D < 0 in one place to see what the algebra does in each case.
In a textbook, completing the square means isolating the x terms, taking half of the linear coefficient, squaring it, and adding that value to both sides so the left side becomes (x + b/(2a))². The new right side collapses into a single fraction whose numerator is the discriminant b² - 4ac.
This calculator handles all three root cases the same way: it builds the vertex form, computes the addend (b/(2a))², and then takes the square root of -k/a. When -k/a is negative, that square root is imaginary, so the roots come out as a complex-conjugate pair rather than crashing the script.
If you would rather skip the algebra and just read off the two roots, the quadratic formula calculator applies the closed-form x = (-b ± √(b² - 4ac)) / (2a) to the same coefficients.
How Solving By Completing The Square Calculator Works
The algebra is short: divide by a, complete the square, and read off the vertex and the roots.
- a: Leading coefficient of the quadratic (must be non-zero).
- b: Linear coefficient. Half of b/a is the shift that closes the perfect square.
- c: Constant term. Sets the y-intercept and shifts the parabola vertically.
- h: x-coordinate of the vertex. Equal to -b/(2a), the axis of symmetry.
- k: y-coordinate of the vertex. Equal to c - b²/(4a), the minimum or maximum of the parabola.
- discriminant: b² - 4ac. Sign decides real, repeated, or complex roots.
Once the equation is in vertex form, the roots come from a single square root: x - h = ±√(-k/a), so x = h ± √(-k/a). When -k/a is negative, √(-k/a) becomes an imaginary number, and the same formula gives the two complex-conjugate roots without a separate quadratic-formula step.
x² - 5x + 6 = 0 → (x - 2.5)² - 0.25 = 0
a = 1, b = -5, c = 6
h = -(-5) / (2·1) = 2.5, k = 6 - 25/4 = -0.25, addend (b/(2a))² = 6.25, roots: x = 2.5 ± √0.25 = 2.5 ± 0.5
Roots x = 2 and x = 3, vertex (2.5, -0.25), discriminant 1.
Two distinct real roots, vertex below the x-axis, parabola opens upward.
According to Purplemath, The value added inside the parentheses to complete the square is (b/(2a))², and the resulting roots are x = -b/(2a) ± √((b² - 4ac)/(4a²)).
Because b² - 4ac controls whether the roots are real, repeated, or complex, the discriminant calculator is a useful companion when you only need that single sign test.
Key Concepts Explained
Four ideas cover everything the method needs.
Vertex form a(x - h)² + k
The target form. h is the axis of symmetry and (h, k) is the turning point of the parabola. Reading the vertex is immediate once you have this form.
Half-the-b rule
Take the linear coefficient, divide by 2a, square it, and that square is the addend that closes the perfect square. It is the only algebraic move the method requires.
Discriminant b² - 4ac
The sign of the discriminant decides root type: positive gives two real roots, zero gives one repeated root, and negative gives two complex-conjugate roots.
Addend (b/(2a))²
The number you actually add inside the parentheses. It is positive whenever a is real, so it always closes the square rather than breaking it.
Notice that the addend (b/(2a))² is always positive, even when b is negative. That is why completing the square never produces a negative number under the new parenthesis: the squaring step absorbs the sign.
The vertex (h, k) that completing the square produces is exactly the point a parabola calculator needs to plot the axis of symmetry and the focus of the parabola.
How to Use This Calculator
Five quick steps take you from standard form to vertex form and the roots.
- 1 Enter coefficient a: Type the leading coefficient of your quadratic. The calculator flags a = 0 because that is no longer a quadratic equation.
- 2 Enter coefficient b: Type the linear coefficient, including its sign. Half of b divided by a drives the addend that completes the square.
- 3 Enter constant c: Type the constant term. This sets the y-intercept and shifts the parabola vertically.
- 4 Read the vertex form: The primary result shows the completed-square form, e.g. (x - 2.5)² - 0.25 = 0, plus the vertex coordinates (h, k).
- 5 Read the roots and discriminant: The roots appear as x₁ and x₂, with the discriminant value underneath. Imaginary parts appear only when the discriminant is negative.
Try a = 1, b = -5, c = 6. The calculator shows vertex form (x - 2.5)² - 0.25 = 0, vertex (2.5, -0.25), discriminant 1, and roots x = 2 and x = 3, matching the worked example above.
To double-check that the addend (b/(2a))² really does close a true perfect square, the perfect square calculator tests any integer against a reference table of squares and returns the matching integer root.
Benefits of Using This Calculator
Why reach for completing the square instead of another method?
- • Reveals the vertex directly: Once the equation is in vertex form you can read (h, k) off the page; no second calculation needed to find the turning point.
- • Generates the same roots as the quadratic formula: Completing the square and the quadratic formula are two routes to the same answer, so you can cross-check a quadratic-formula calculator result with this one.
- • Works for every root case: Real, repeated, and complex roots all fall out of the same x = h ± √(-k/a) step, including when -k/a is negative.
- • Builds intuition for calculus: Vertex form is the natural shape for derivative-based work on quadratics, and completing the square shows where the minimum or maximum of ax² + bx + c actually sits.
- • Handles non-unit leading coefficients: The same algebra works when a is 2, 0.5, or any non-zero value, because the formula keeps the a in front of the parenthesis throughout.
For homework checks the practical win is that the calculator returns every quantity a teacher is likely to ask for in one pass: the completed square, the addend, the vertex, the discriminant, and the roots.
When the discriminant is a perfect square and the roots are integers, the factoring trinomials calculator shows the matching (x - r₁)(x - r₂) form, which is the third way to get the same answer.
Factors That Affect Your Results
The output depends on a handful of algebraic inputs, and a couple of edge cases deserve a warning.
Sign of a
Determines whether the parabola opens upward (a > 0, vertex is a minimum) or downward (a < 0, vertex is a maximum). It does not change the root formula but it changes the meaning of k.
Sign of the discriminant
Positive D gives two distinct real roots, zero D gives one repeated root, and negative D gives two complex-conjugate roots. The calculator returns imaginary parts only when needed.
Magnitude of b relative to a
A large |b| shifts the addend (b/(2a))² and the vertex h far from the origin. With a = 1 and b = 100, the vertex sits at h = -50 even when the parabola is otherwise simple.
Magnitude of c
Sets the y-intercept and shifts the parabola vertically, so it changes k but not h. The roots also shift, but only because k does.
- • When a = 0 the input is no longer a quadratic. The calculator returns an invalid-input indicator instead of treating the equation as linear.
- • This page solves standard-form quadratics only. It does not solve systems of equations, factor polynomials, or graph the parabola; pair it with a parabola calculator for a picture.
Internally the formula computes the addend (b/(2a))² with double-precision floating point, so for inputs whose coefficients push (b/(2a))² above about 1e308 the calculation can lose precision. For ordinary textbook problems this is not a concern.
According to Khan Academy, Take half of the b/a coefficient, square it, and add that value to both sides; the left becomes a perfect square and the right side reduces to a single fraction.
If the discriminant is negative and the roots come out as h ± bi, the complex root calculator walks through the same complex arithmetic step by step and confirms the imaginary components.
Frequently Asked Questions
Q: What does solving by completing the square mean?
A: Solving by completing the square is the technique of rewriting ax² + bx + c = 0 as a(x - h)² + k = 0. Once the equation is in vertex form you can read off the vertex (h, k) and the roots x = h ± √(-k/a).
Q: How do you solve ax² + bx + c = 0 by completing the square?
A: Take half of the b/a coefficient, square it, and add that value (b/(2a))² to both sides. With the leading a kept in front, the left side becomes a(x + b/(2a))² and the right side collapses to (b² - 4ac)/(4a), so the roots are x = -b/(2a) ± √((b² - 4ac)/(4a²)).
Q: What is the difference between vertex form and standard form?
A: Standard form ax² + bx + c = 0 is what most textbooks hand you. Vertex form a(x - h)² + k = 0 names the vertex (h, k) and the axis of symmetry x = h directly, which is why completing the square is the bridge between the two.
Q: When should I use completing the square instead of the quadratic formula?
A: Reach for completing the square when you also need the vertex or the addend, when you are deriving the quadratic formula in a class, or when you want to see why a quadratic has no real roots. For pure root-finding the quadratic formula is the faster path.
Q: Can completing the square give complex roots?
A: Yes. When the discriminant b² - 4ac is negative, the value -k/a is negative, so √(-k/a) becomes an imaginary number. The same x = h ± √(-k/a) step then gives the two complex-conjugate roots h ± bi.
Q: Why is completing the square important?
A: Completing the square turns a quadratic into a perfect square plus a constant, which is the shape used in calculus to find minima and maxima, in geometry to write circles and parabolas, and in algebra to derive the quadratic formula itself.