Free Completing the Square Calculator
Result
Enter coefficients a, b, and c, then click Calculate to solve
How to Solve Quadratic Equations by Completing the Square
The Completing the Square Calculator is an online tool that solves quadratic equations of the form using the completing‑the‑square method. After entering the coefficients , , and , the calculator not only returns the roots but also shows each algebraic step required to transform the equation into a perfect square and solve for . This article explains how to use the tool, walks through a detailed example, covers common special cases, and demonstrates how the same process leads directly to the quadratic formula.
Using the Calculator
To begin, input the three coefficients from your equation. The value of must be non‑zero; if , the equation is linear rather than quadratic. Once submitted, the tool computes the solutions and displays a step‑by‑step derivation. You can also adjust the settings:
- Complex number mode – when the discriminant is negative, this mode returns complex roots instead of a “no real roots” message. By default, only real roots are shown.
- Precision – control the number of decimal places used for non‑integer coefficients and results.
These options give you full control over how the solution is presented.
Step‑by‑Step Example
Consider the equation . The completing‑the‑square procedure follows these steps:
-
Isolate the variable terms
Move the constant term to the right side: -
Calculate the completing term
Take one‑half of the coefficient of () → , then square it → . This number is the constant needed to form a perfect‑square trinomial. -
Add the completing term to both sides
-
Factor the left side as a perfect square
The left‑hand side equals because . Therefore, -
Take the square root and solve
Thus the quadratic has two real roots, and , which correspond to the points where the parabola crosses the -axis.
Geometric Interpretation
The name “completing the square” comes from a visual representation: the term is the area of a square with side length , and the term represents a rectangle of dimensions and . By cutting the rectangle in half and rearranging the pieces around the square, you can form a larger square. The number added in step 2 ( is exactly the area of the corner piece needed to “complete” that square.
Special Cases
-
When
If the leading coefficient is not one, divide every term by before starting the steps. For instance, becomes after division, and the same procedure applies. -
When
If the linear term is missing, the equation reduces to . No completing step is necessary; taking square roots directly gives (provided for real roots).
Deriving the Quadratic Formula
Completing the square on a general quadratic (after ensuring ) reveals where the quadratic formula comes from. Start with :
\begin{aligned} x^{2}+bx &= -c \$$2pt] x^{2}+bx+\left(\frac{b}{2}\right)^{2} &= -c + \left(\frac{b}{2}\right)^{2} \$$2pt] \left(x+\frac{b}{2}\right)^{2} &= \frac{b^{2}}{4} - c. \end{aligned}Taking the square root and isolating yields
The expression inside the radical determines the nature of the roots:
- If (equivalently ), two distinct real roots exist.
- If (i.e., ), there is exactly one real root (a repeated root).
- If (i.e., ), no real roots occur; in complex mode the roots become .
Re‑introducing the factor (which was originally divided out) gives the familiar quadratic formula
This connection shows that completing the square is not just a solution technique but also the foundation of the quadratic formula. The calculator automates the entire process, making it easy to solve any quadratic equation while understanding the method behind the result.
FAQ
1. What should I do if the coefficient of x² is not 1?
Divide every term of the equation by that coefficient before starting the completing-the-square steps. For example, 2x² + 12x - 5 = 0 becomes x² + 6x - 2.5 = 0, and then you proceed normally.
2. Does the calculator show the intermediate steps of the solution?
Yes. After you enter the coefficients, the tool displays the full step‑by‑step derivation, including how the square is completed and how the roots are obtained.
3. When will the calculator display complex (imaginary) roots?
By default, only real roots are shown. To see complex roots, enable complex number mode in the calculator settings. When the discriminant is negative, the roots will then be given in terms of i.
4. How is the quadratic formula related to completing the square?
The quadratic formula is derived directly from completing the square on the general equation ax² + bx + c = 0. The method produces (x + b/(2a))² = (b² - 4ac)/(4a²), and solving for x yields the formula x = [-b ± sqrt(b² - 4ac)] / (2a).
How to Use
- Enter the coefficients a, b, and c from your quadratic equation ax² + bx + c = 0
- Toggle complex roots if needed and select your preferred decimal precision
- Click Calculate to see the roots and a complete step-by-step solution