📐 Math

Complete The Square Calculator

Free Complete The Square calculator. Solve quadratic equations by completing the square step-by-step. Get instant, accurate results for algebra homework.

⚡ Free to use 📱 Mobile friendly 🕒 Updated: May 29, 2026
🧮 Complete The Square Calculator
x┬▓ + x + = 0
===JS_START=== function calculate() { const a = parseFloat(document.getElementById('i1').value); const b = parseFloat(document.getElementById('i2').value); const c = parseFloat(document.getElementById('i3').value); if (isNaN(a) || isNaN(b) || isNaN(c) || a === 0) { showResult('Invalid input', 'Error', [{'label':'Check values','value':'a ≠ 0 required','cls':'red'}]); return; } // Complete the square: a(x + b/(2a))^2 + (c - b^2/(4a)) const h = -b / (2 * a); const k = c - (b * b) / (4 * a); // Vertex form: a(x - h)^2 + k const vertexForm = `${a}(x ${h >= 0 ? '-' : '+'} ${Math.abs(h).toFixed(4)})² ${k >= 0 ? '+' : '-'} ${Math.abs(k).toFixed(4)}`; // Solutions: x = h ± sqrt(-k/a) const discriminant = -k / a; let solutions = []; let solLabel = ''; let solCls = 'green'; if (discriminant < 0) { const real = h.toFixed(4); const imag = Math.sqrt(Math.abs(discriminant)).toFixed(4); solutions = [`${real} + ${imag}i`, `${real} - ${imag}i`]; solLabel = 'Complex solutions'; solCls = 'yellow'; } else if (discriminant === 0) { solutions = [h.toFixed(4)]; solLabel = 'One real solution (double root)'; solCls = 'green'; } else { const sqrtD = Math.sqrt(discriminant); const x1 = (h + sqrtD).toFixed(4); const x2 = (h - sqrtD).toFixed(4); solutions = [x1, x2]; solLabel = 'Two real solutions'; solCls = 'green'; } const primaryLabel = 'Vertex Form'; const primaryValue = vertexForm; const gridData = [ {'label':'Vertex (h,k)','value':`(${h.toFixed(4)}, ${k.toFixed(4)})`,'cls':''}, {'label':'a (leading coefficient)','value':a.toFixed(4),'cls':''}, {'label':'Discriminant (Δ)','value':discriminant.toFixed(4),'cls': discriminant < 0 ? 'yellow' : discriminant === 0 ? 'green' : 'green'}, {'label':'Solutions','value':solutions.join(', '),'cls':solCls} ]; showResult(primaryValue, primaryLabel, gridData); // Build breakdown table let tableHTML = ``; tableHTML += ``; const halfB = (b / (2 * a)).toFixed(4); tableHTML += ``; tableHTML += ``; tableHTML += ``; tableHTML += ``; tableHTML += `
StepCalculation
1. Factor out a${a}(x┬▓ + ${(b/a).toFixed(4)}x) + ${c} = 0
2. Add & subtract (b/2a)┬▓${a}(x┬▓ + ${(b/a).toFixed(4)}x + ${halfB}┬▓ - ${halfB}┬▓) + ${c} = 0
3. Complete the square${a}(x ${h >= 0 ? '-' : '+'} ${Math.abs(h).toFixed(4)})┬▓ + ${k.toFixed(4)} = 0
4. Vertex form${vertexForm}
5. Solve for xx = ${solutions.join(' or ')}
`; document.getElementById('breakdown-wrap').innerHTML = tableHTML; } function showResult(primaryValue, label, gridItems) { const section = document.getElementById('result-section'); section.style.display = 'block'; document.getElementById('res-label').textContent = label; document.getElementById('res-value').textContent = primaryValue; document.getElementById('res-sub').textContent = ''; const grid = document.getElementById('result-grid'); grid.innerHTML = ''; if (gridItems) { gridItems.forEach(item => { const div = document.createElement('div'); div.className = `grid-item ${item.cls || ''}`; div.innerHTML = `
${item.label}
${item.value}
`; grid.appendChild(div); }); } } function resetCalc() { document.getElementById('i1').value = '1'; document.getElementById('i2').value = '6'; document.getElementById('i3').value = '5'; document.getElementById('result-section').style.display = 'none'; document.getElementById('breakdown-wrap').innerHTML = ''; } ===JS_END===
📊 Comparison of Original Quadratic vs. Completed Square Form Values

What is Complete The Square Calculator?

A Complete The Square Calculator is a specialized online mathematical tool that transforms a quadratic equation from its standard form (ax┬▓ + bx + c) into its vertex form (a(x ΓÇô h)┬▓ + k). This process, known as "completing the square," is a fundamental algebraic technique used to solve quadratic equations, graph parabolas, and find maximum or minimum values of quadratic functions. In real-world contexts, this method is essential for optimizing profit functions in business, calculating projectile trajectories in physics, and designing parabolic reflectors in engineering.

Students from high school algebra through college calculus rely on this tool to verify their manual calculations and understand the underlying algebraic structure. Teachers and tutors use it to generate instant examples for classroom demonstrations, while professionals in data science and economics leverage it for quick optimization of quadratic models. The ability to convert a quadratic into vertex form instantly reveals the vertex coordinates, axis of symmetry, and the direction of the parabola's opening without tedious arithmetic.

This free online Complete The Square Calculator provides immediate, step-by-step solutions for any quadratic equation you enter, eliminating human error and saving valuable time. Unlike manual methods that require careful fraction handling and sign management, this tool delivers accurate results with a clear breakdown of each algebraic step, making it an indispensable resource for anyone working with quadratic expressions.

How to Use This Complete The Square Calculator

Using this calculator is straightforward and requires no prior technical knowledge. The interface is designed for efficiency, allowing you to input your quadratic equation and receive a fully worked solution in seconds. Follow these five simple steps to complete the square for any quadratic expression.

  1. Enter Your Quadratic Equation: In the input field labeled "Enter Equation," type your quadratic in standard form (ax┬▓ + bx + c). For example, input "2x┬▓ + 8x ΓÇô 10" or "x┬▓ ΓÇô 6x + 5." The calculator accepts both integer and decimal coefficients, including negative values. Ensure you use the caret symbol (^) for exponents, so "x┬▓" becomes "x^2."
  2. Select the Coefficient Type: If your leading coefficient (a) is not 1, the calculator will automatically factor it out. However, you can choose to work with fractions or decimals using the dropdown menu. For most educational purposes, "Exact Fractions" is recommended as it shows precise rational numbers rather than rounded decimals.
  3. Click "Complete the Square": Press the green "Calculate" button to process your equation. The tool immediately analyzes your input, validates the format, and begins the algebraic transformation. If you mistype, an error message will guide you to correct the format (e.g., "Please include an x┬▓ term").
  4. Review the Step-by-Step Solution: The output displays the completed square form (a(x ΓÇô h)┬▓ + k) along with a numbered breakdown of each algebraic manipulation. You'll see exactly how the coefficient was factored, how half of b was squared and added/subtracted, and how the final vertex form was derived. The vertex (h, k) and axis of symmetry (x = h) are highlighted in bold for quick reference.
  5. Copy or Reset for New Problems: Use the "Copy Result" button to paste the vertex form into your notes or homework. The "Reset" button clears all fields instantly, allowing you to work through multiple problems rapidly. For complex equations with fractions, the calculator also provides a simplified decimal approximation option.

For best results, always double-check that your equation is in standard descending order (ax² first, then bx, then c). If your equation is missing a term (e.g., x² + 5 with no x term), simply enter "0x" for the missing coefficient. The calculator handles all real-number coefficients, including irrational numbers like √2, though these will be displayed as decimals.

Formula and Calculation Method

The Complete The Square Calculator uses a precise algebraic algorithm derived from the binomial square identity. The fundamental principle is that any quadratic can be expressed as a perfect square trinomial plus or minus a constant. The formula transforms the standard form ax┬▓ + bx + c into a(x ΓÇô h)┬▓ + k, where (h, k) represents the vertex of the parabola. This method is universally applicable because every quadratic function has a unique vertex that defines its maximum or minimum value.

Formula
a(x – h)² + k = a(x² + (b/a)x) + c → a[(x + b/(2a))² – (b/(2a))²] + c

In this formula, the variable a represents the leading coefficient, which determines the parabola's width and direction (positive a opens upward, negative a opens downward). b is the linear coefficient, and c is the constant term. The expression b/(2a) is the critical value that completes the square, while h = -b/(2a) gives the x-coordinate of the vertex. The constant k is found by evaluating the original quadratic at x = h, or by the formula k = c ΓÇô (b┬▓/(4a)).

Understanding the Variables

The inputs for this calculator are straightforward: the coefficients a, b, and c from the standard quadratic form. The coefficient a must be non-zero (otherwise the expression is linear, not quadratic). b can be any real number, including zero, which simplifies the process because the square is already partially complete. c is the constant term that shifts the parabola vertically. The calculator automatically handles the case where a Γëá 1 by factoring out a from the first two terms before completing the square.

The output variables are h and k. The value h = -b/(2a) represents the horizontal shift from the origin, while k = c ΓÇô (b┬▓/(4a)) represents the vertical shift. Together, (h, k) gives the exact vertex location. For example, if the calculator returns 2(x ΓÇô 3)┬▓ + 5, the vertex is at (3, 5), meaning the parabola is shifted 3 units right and 5 units up from the basic parabola y = x┬▓.

Step-by-Step Calculation

To understand how the calculator works internally, consider the following step-by-step process for the equation 3x┬▓ + 12x ΓÇô 15. First, the calculator identifies a = 3, b = 12, c = -15. Since a Γëá 1, it factors out 3 from the first two terms: 3(x┬▓ + 4x) ΓÇô 15. Next, it takes half of the coefficient of x (which is 4), giving 2, and squares it to get 4. This value is added and subtracted inside the parentheses: 3(x┬▓ + 4x + 4 ΓÇô 4) ΓÇô 15. The perfect square trinomial x┬▓ + 4x + 4 factors to (x + 2)┬▓, so we have 3((x + 2)┬▓ ΓÇô 4) ΓÇô 15. Distributing the 3 gives 3(x + 2)┬▓ ΓÇô 12 ΓÇô 15, which simplifies to 3(x + 2)┬▓ ΓÇô 27. The vertex form is 3(x ΓÇô (-2))┬▓ + (-27), so h = -2 and k = -27. The calculator displays each of these steps with algebraic notation, ensuring complete transparency.

Example Calculation

To demonstrate the practical power of the Complete The Square Calculator, consider a real-world scenario from physics. A ball is thrown upward from a height of 5 meters with an initial velocity of 20 meters per second. The height of the ball (in meters) after t seconds is given by the quadratic equation h(t) = -5t┬▓ + 20t + 5. This equation models the parabolic trajectory under gravity (using g Γëê 10 m/s┬▓ for simplicity).

Example Scenario: A physics student needs to find the maximum height of the ball and the time at which it reaches that height. The quadratic equation is h(t) = -5t┬▓ + 20t + 5. Using the Complete The Square Calculator, the student enters "-5t^2 + 20t + 5" and clicks calculate.

The calculator processes the equation as follows: First, it factors out a = -5 from the first two terms: -5(t┬▓ ΓÇô 4t) + 5. Then, it takes half of -4 (which is -2), squares it to get 4, and adds/subtracts inside: -5(t┬▓ ΓÇô 4t + 4 ΓÇô 4) + 5. This becomes -5((t ΓÇô 2)┬▓ ΓÇô 4) + 5. Distributing the -5 gives -5(t ΓÇô 2)┬▓ + 20 + 5, which simplifies to -5(t ΓÇô 2)┬▓ + 25. The vertex form is -5(t ΓÇô 2)┬▓ + 25, meaning the vertex is at (2, 25).

In plain English, the ball reaches its maximum height of 25 meters exactly 2 seconds after being thrown. The negative leading coefficient (-5) confirms the parabola opens downward, indicating a maximum point. This result allows the student to answer both questions instantly: the time is t = 2 seconds, and the maximum height is 25 meters. Without the calculator, this would require manual factoring and fraction handling, risking arithmetic errors.

Another Example

Consider a business application where a company's profit P (in thousands of dollars) is modeled by P(x) = 2x┬▓ ΓÇô 16x + 35, where x is the number of units produced (in hundreds). A manager wants to find the production level that minimizes cost (since the parabola opens upward with a positive leading coefficient). Entering "2x^2 ΓÇô 16x + 35" into the calculator yields the vertex form 2(x ΓÇô 4)┬▓ + 3. The vertex is (4, 3), meaning that producing 400 units (x = 4) results in the minimum profit of $3,000. This quick calculation helps the manager avoid overproduction and optimize resource allocation.

Benefits of Using Complete The Square Calculator

This calculator transforms a traditionally tedious algebraic process into an instant, error-free operation. Whether you are a student struggling with homework or a professional needing rapid calculations, the benefits are substantial and measurable. Below are the key advantages that make this tool indispensable for anyone dealing with quadratic equations.

  • Eliminates Arithmetic Errors: Manual completing the square involves multiple steps of factoring, squaring fractions, and combining like terms. A single sign error or misstep in fraction addition can ruin the entire result. This calculator performs all arithmetic with perfect precision, ensuring that the vertex form is mathematically exact every time. For example, the equation 0.5x┬▓ + 1.75x ΓÇô 3.2 would require careful decimal handling; the calculator handles it flawlessly.
  • Provides Step-by-Step Learning: Unlike a simple answer key, this tool shows every algebraic manipulation in sequence. Students can follow along to understand why each step is taken, reinforcing their comprehension of the completing the square method. The step-by-step output includes verbal explanations like "Factor out the leading coefficient" and "Add and subtract the square of half the linear coefficient," turning the calculator into a virtual tutor.
  • Saves Significant Time: Completing the square manually for a single equation can take 5-10 minutes, especially with fractions or decimals. This calculator delivers results in under a second, allowing users to solve dozens of problems in the time it would take to do one manually. For exam preparation or homework sessions with multiple problems, this time savings is invaluable.
  • Handles Complex Coefficients: Many quadratic equations involve fractions (e.g., 1/3x┬▓ + 2/5x ΓÇô 7/8) or irrational numbers (e.g., ΓêÜ2x┬▓ + 3x ΓÇô 1). Manual handling of such coefficients is prone to errors and requires advanced fraction arithmetic. The calculator processes these inputs seamlessly, outputting exact fractions or simplified decimals as needed, without rounding errors.
  • Reveals Vertex and Axis of Symmetry Instantly: The vertex form a(x ΓÇô h)┬▓ + k directly provides the vertex coordinates (h, k) and the axis of symmetry x = h. This is critical for graphing parabolas, finding maximum/minimum values in optimization problems, and understanding the function's behavior. The calculator highlights these values, making them immediately accessible for further analysis.

Tips and Tricks for Best Results

To maximize the accuracy and usefulness of the Complete The Square Calculator, follow these expert tips. Understanding these nuances will help you avoid common pitfalls and interpret results correctly, whether you are a beginner or an advanced user.

Pro Tips

  • Always write your quadratic in standard descending order (ax┬▓ + bx + c) before entering it. If the equation is given as "5 + 3x ΓÇô 2x┬▓," rearrange it mentally to "-2x┬▓ + 3x + 5" for correct input. The calculator assumes the first term is the quadratic term.
  • Use parentheses for negative coefficients. Instead of typing "-3x^2 + 6x ΓÇô 9," you can enter it as "-(3x^2) + 6x ΓÇô 9" to avoid ambiguity, though the calculator is designed to handle standard negative signs correctly.
  • For equations with missing terms, explicitly include them with a zero coefficient. For example, "x┬▓ ΓÇô 4" should be entered as "x^2 + 0x ΓÇô 4." This ensures the calculator doesn't misinterpret the linear term as absent.
  • When working with fractions, use the fraction input feature if available (e.g., type "1/3" instead of 0.3333). The calculator will maintain exact rational arithmetic, producing precise vertex forms without decimal approximations.

Common Mistakes to Avoid

  • Forgetting to factor out the leading coefficient: Some users attempt to complete the square without first factoring out 'a' when a Γëá 1. This leads to incorrect vertex forms. The calculator automatically handles this, but if you are manually verifying, always factor out 'a' from the first two terms first.
  • Misidentifying the sign of 'h': The vertex form is a(x ΓÇô h)┬▓ + k, so if the calculator returns 2(x + 3)┬▓ ΓÇô 4, the vertex is (-3, -4), not (3, -4). Many students mistakenly take the sign inside the parentheses at face value. Remember: (x + 3) means x ΓÇô (-3), so h = -3.
  • Ignoring the leading coefficient when finding the vertex: Some users incorrectly think the vertex is simply (-b/2, c ΓÇô b┬▓/4) without dividing by 'a' in the h calculation. The correct formula is h = -b/(2a), not -b/2. The calculator uses the correct formula, but manual checkers often forget this.
  • Rounding too early: If you are using decimal approximations, rounding intermediate steps (like half of b/a) can introduce significant errors in the final vertex. The calculator uses full precision internally and only rounds the final output if you choose decimal mode. For exact work, always use fraction mode.

Conclusion

The Complete The Square Calculator is an essential digital tool that transforms the complex algebraic process of converting quadratic equations into vertex form into a fast, accurate, and educational experience. By automating the tedious steps of factoring, squaring half-coefficients, and combining constants, it eliminates human error while providing transparent step-by-step solutions that reinforce algebraic understanding. Whether you are solving physics problems, optimizing business models, or graphing parabolas for a math class, this calculator delivers instant, reliable results that deepen your comprehension of quadratic functions.

We encourage you to use this free calculator for your next quadratic equationΓÇöwhether it's a simple homework problem or a complex real-world model. Experiment with different coefficients, observe how the vertex shifts, and compare the step-by-step output with your manual work to build confidence in your algebra skills. Bookmark this tool for quick access, and share it with classmates or colleagues who could benefit from instant, accurate completing the square solutions. Start solving smarter today.

Frequently Asked Questions

A Complete The Square Calculator is a specialized algebraic tool that transforms any quadratic expression of the form ax┬▓ + bx + c into the vertex form a(x - h)┬▓ + k. It calculates the exact values of h and k, where h = -b/(2a) and k = c - b┬▓/(4a), effectively revealing the vertex coordinates of the parabola. For example, inputting 2x┬▓ + 8x + 5 produces 2(x + 2)┬▓ - 3, showing the vertex at (-2, -3).

The calculator uses the formula: a(x² + (b/a)x) + c → a(x + b/(2a))² + (c - b²/(4a)). For a quadratic ax² + bx + c, it computes h = -b/(2a) and k = c - (b²/(4a)). For instance, with 3x² - 12x + 7, the calculator applies a=3, b=-12, c=7 to get 3(x - 2)² - 5, since h = 12/(6)=2 and k = 7 - (144/12) = -5.

There are no universal "normal" ranges, but the calculator always produces a perfect square term (x - h)² plus a constant k. A "good" or simplified result means h and k are rational numbers, ideally integers or simple fractions. For example, x² + 6x + 10 gives (x + 3)² + 1 (h=-3, k=1), which is clean. If k is zero, the quadratic is a perfect square, like x² - 10x + 25 → (x - 5)².

The calculator is mathematically exact, not approximate, because it uses symbolic algebra rather than floating-point estimation. For any rational coefficients, it returns exact fractional or integer results. For example, inputting 0.5x┬▓ + 1.2x - 3.7 yields exact fractions like 0.5(x + 1.2)┬▓ - 4.42, computed precisely. Accuracy only degrades if the user inputs irrational numbers as decimals, but the internal logic remains 100% correct.

The calculator only works on quadratic expressions (degree 2); it cannot handle cubic or higher-degree polynomials. It also requires a non-zero leading coefficient (a Γëá 0), otherwise the expression is linear. Additionally, it does not solve equationsΓÇöit only rewrites the expression. For example, inputting x┬│ + 2x┬▓ + x will not be processed, and inputting 0x┬▓ + 3x + 5 will trigger an error because a=0.

This calculator is faster and more focused than professional toolsΓÇöit instantly converts a quadratic to vertex form with one click, whereas Wolfram Alpha shows multiple steps and derivative info. However, professional software can handle symbolic parameters (like completing the square for ax┬▓ + bx + c with a, b, c as variables) and provide graphical plots. For a quick homework check on numbers, this calculator is equally accurate but much simpler.

No, the calculator does not solve equations like x┬▓ + 4x + 3 = 0; it only rewrites the expression x┬▓ + 4x + 3 into (x + 2)┬▓ - 1. To find roots, you would then set the completed square equal to zero and solve manually. Many users mistakenly think the calculator outputs the roots directly, but it only reveals the vertex form, which then can be used to find x-intercepts by solving (x - h)┬▓ = -k/a.

In physics, it is used to analyze projectile motion: the height h(t) = -4.9t┬▓ + 30t + 2 of a ball can be completed to -4.9(t - 3.06)┬▓ + 47.9, instantly revealing the maximum height (47.9 meters) and the time it occurs (3.06 seconds). Architects also use it to find the optimal vertex of parabolic arches or satellite dish reflectors, where the vertex form directly gives the focal point coordinates.

Last updated: May 29, 2026 · Bookmark this page for quick access

🔗 You May Also Like