Skip to main content

Completing the Square Calculator

Our free algebra calculator solves completing square problems. Get worked examples, visual aids, and downloadable results.

Skip to calculator
Mathematics

Completing the Square Calculator

Convert quadratic expressions from standard form to vertex form using completing the square. Find the vertex, axis of symmetry, roots, and discriminant with step-by-step work.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
1x^2 + (-6)x + (5)
Vertex Form
(x - 3.0000)^2 - 4.0000
Vertex
(3, -4)
upward (minimum)
Axis of Symmetry
x = 3
Discriminant
16
Y-Intercept
(0, 5)
Root Type
two real
Roots / X-Intercepts
x1
5
x2
1
Step-by-Step
1. Start: 1x^2 + (-6)x + (5)
2. Half of -6: -3
3. Square it: (-3)^2 = 9
4. Result: (x - 3.0000)^2 - 4.0000
Your Result
Vertex Form: (x - 3.0000)^2 - 4.0000 | Vertex: (3, -4) | Roots: two real
Share Your Result
Understand the Math

Formula

ax^2 + bx + c = a(x - h)^2 + k

Where h = -b/(2a) is the x-coordinate of the vertex, and k = c - b^2/(4a) is the y-coordinate. The vertex form reveals the parabola opens upward when a > 0 (minimum at k) and downward when a < 0 (maximum at k). The axis of symmetry is the vertical line x = h.

Last reviewed: December 2025

Worked Examples

Example 1: Completing the Square for x^2 - 6x + 5

Convert x^2 - 6x + 5 to vertex form by completing the square.
Solution:
Step 1: Take half of -6: (-6)/2 = -3 Step 2: Square it: (-3)^2 = 9 Step 3: Add and subtract 9: x^2 - 6x + 9 - 9 + 5 = (x - 3)^2 - 4 Vertex: (3, -4) Roots: x - 3 = +/-2 => x = 1, x = 5
Result: (x - 3)^2 - 4 | Vertex: (3, -4)

Example 2: Completing the Square for 2x^2 + 8x + 3

Convert 2x^2 + 8x + 3 to vertex form.
Solution:
Step 1: Factor out 2: 2(x^2 + 4x) + 3 Step 2: Half of 4 is 2, squared is 4 Step 3: 2(x^2 + 4x + 4 - 4) + 3 = 2(x + 2)^2 - 8 + 3 = 2(x + 2)^2 - 5 Vertex: (-2, -5)
Result: 2(x + 2)^2 - 5 | Vertex: (-2, -5)
Expert Insights

Background & Theory

The Completing the Square Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Completing the Square Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

Completing the square is an algebraic technique that transforms a quadratic expression ax^2 + bx + c into vertex form a(x - h)^2 + k. This transformation reveals the vertex of the parabola at point (h, k), making it easy to identify the minimum or maximum value and the axis of symmetry. The technique works by adding and subtracting a specific constant to create a perfect square trinomial within the expression. It is one of the most versatile methods in algebra because it not only solves quadratic equations but also helps derive the quadratic formula, analyze conic sections, and simplify certain integral calculations in calculus.
To complete the square for ax^2 + bx + c, first factor out the leading coefficient a from the x terms if a is not 1. Then take half the coefficient of x (which is b/(2a)), square it to get b^2/(4a^2), and both add and subtract this value inside the expression. This creates a perfect square trinomial that factors as (x + b/(2a))^2. After simplifying, you get a(x - h)^2 + k where h = -b/(2a) and k = c - b^2/(4a). For example, x^2 + 6x + 2 becomes (x^2 + 6x + 9) - 9 + 2 = (x + 3)^2 - 7. Always verify by expanding the result back to standard form.
The quadratic formula x = (-b plus/minus sqrt(b^2 - 4ac)) / (2a) is actually derived by completing the square on the general quadratic equation ax^2 + bx + c = 0. Starting with the general form, dividing by a, moving c/a to the other side, adding (b/(2a))^2 to both sides, factoring the left side as a perfect square, and then solving for x produces the quadratic formula. Understanding this derivation provides deeper insight into why the formula works and reveals the geometric meaning of its components: -b/(2a) is the x-coordinate of the vertex, and the discriminant b^2 - 4ac determines whether and where the parabola crosses the x-axis.
Completing the square is the best choice when you need the vertex form of a quadratic function, when solving optimization problems, or when working with circles and other conic sections. Factoring is faster when the quadratic has nice integer roots, and the quadratic formula is more direct when you only need the roots. However, completing the square is essential when the quadratic cannot be easily factored and you need more than just the roots. In calculus, completing the square is frequently used to evaluate integrals involving quadratic expressions in the denominator. It is also the standard approach for converting general conic section equations to standard form.
When the leading coefficient a is not 1, you must first factor it out from the x^2 and x terms before completing the square. For example, to complete the square for 2x^2 + 12x + 7, first factor out 2 from the first two terms: 2(x^2 + 6x) + 7. Then complete the square inside the parentheses: 2(x^2 + 6x + 9 - 9) + 7 = 2(x + 3)^2 - 18 + 7 = 2(x + 3)^2 - 11. Notice that when you subtract 9 inside the parentheses, it gets multiplied by the factored-out 2, contributing -18 to the constant term. This step is where most errors occur, so careful attention to the factor outside is critical.
The discriminant b^2 - 4ac determines the nature of the solutions when you set the completed-square form equal to zero and solve. If the discriminant is positive, the squared term equals a positive number, yielding two distinct real roots symmetric about the axis of symmetry. If the discriminant is zero, the squared term equals zero, giving exactly one repeated real root at the vertex. If the discriminant is negative, the squared term would need to equal a negative number, which is impossible for real numbers, so there are no real roots (only complex conjugate roots). The discriminant also equals -4a times the k-value in vertex form.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

ax^2 + bx + c = a(x - h)^2 + k

Where h = -b/(2a) is the x-coordinate of the vertex, and k = c - b^2/(4a) is the y-coordinate. The vertex form reveals the parabola opens upward when a > 0 (minimum at k) and downward when a < 0 (maximum at k). The axis of symmetry is the vertical line x = h.

Worked Examples

Example 1: Completing the Square for x^2 - 6x + 5

Problem: Convert x^2 - 6x + 5 to vertex form by completing the square.

Solution: Step 1: Take half of -6: (-6)/2 = -3\nStep 2: Square it: (-3)^2 = 9\nStep 3: Add and subtract 9:\n x^2 - 6x + 9 - 9 + 5\n = (x - 3)^2 - 4\nVertex: (3, -4)\nRoots: x - 3 = +/-2 => x = 1, x = 5

Result: (x - 3)^2 - 4 | Vertex: (3, -4)

Example 2: Completing the Square for 2x^2 + 8x + 3

Problem: Convert 2x^2 + 8x + 3 to vertex form.

Solution: Step 1: Factor out 2: 2(x^2 + 4x) + 3\nStep 2: Half of 4 is 2, squared is 4\nStep 3: 2(x^2 + 4x + 4 - 4) + 3\n = 2(x + 2)^2 - 8 + 3\n = 2(x + 2)^2 - 5\nVertex: (-2, -5)

Result: 2(x + 2)^2 - 5 | Vertex: (-2, -5)

Frequently Asked Questions

What does completing the square mean and why is it useful?

Completing the square is an algebraic technique that transforms a quadratic expression ax^2 + bx + c into vertex form a(x - h)^2 + k. This transformation reveals the vertex of the parabola at point (h, k), making it easy to identify the minimum or maximum value and the axis of symmetry. The technique works by adding and subtracting a specific constant to create a perfect square trinomial within the expression. It is one of the most versatile methods in algebra because it not only solves quadratic equations but also helps derive the quadratic formula, analyze conic sections, and simplify certain integral calculations in calculus.

What are the step-by-step instructions for completing the square?

To complete the square for ax^2 + bx + c, first factor out the leading coefficient a from the x terms if a is not 1. Then take half the coefficient of x (which is b/(2a)), square it to get b^2/(4a^2), and both add and subtract this value inside the expression. This creates a perfect square trinomial that factors as (x + b/(2a))^2. After simplifying, you get a(x - h)^2 + k where h = -b/(2a) and k = c - b^2/(4a). For example, x^2 + 6x + 2 becomes (x^2 + 6x + 9) - 9 + 2 = (x + 3)^2 - 7. Always verify by expanding the result back to standard form.

How is completing the square related to the quadratic formula?

The quadratic formula x = (-b plus/minus sqrt(b^2 - 4ac)) / (2a) is actually derived by completing the square on the general quadratic equation ax^2 + bx + c = 0. Starting with the general form, dividing by a, moving c/a to the other side, adding (b/(2a))^2 to both sides, factoring the left side as a perfect square, and then solving for x produces the quadratic formula. Understanding this derivation provides deeper insight into why the formula works and reveals the geometric meaning of its components: -b/(2a) is the x-coordinate of the vertex, and the discriminant b^2 - 4ac determines whether and where the parabola crosses the x-axis.

When should you use completing the square instead of factoring or the quadratic formula?

Completing the square is the best choice when you need the vertex form of a quadratic function, when solving optimization problems, or when working with circles and other conic sections. Factoring is faster when the quadratic has nice integer roots, and the quadratic formula is more direct when you only need the roots. However, completing the square is essential when the quadratic cannot be easily factored and you need more than just the roots. In calculus, completing the square is frequently used to evaluate integrals involving quadratic expressions in the denominator. It is also the standard approach for converting general conic section equations to standard form.

How do you complete the square when the leading coefficient is not 1?

When the leading coefficient a is not 1, you must first factor it out from the x^2 and x terms before completing the square. For example, to complete the square for 2x^2 + 12x + 7, first factor out 2 from the first two terms: 2(x^2 + 6x) + 7. Then complete the square inside the parentheses: 2(x^2 + 6x + 9 - 9) + 7 = 2(x + 3)^2 - 18 + 7 = 2(x + 3)^2 - 11. Notice that when you subtract 9 inside the parentheses, it gets multiplied by the factored-out 2, contributing -18 to the constant term. This step is where most errors occur, so careful attention to the factor outside is critical.

What is the role of the discriminant in completing the square?

The discriminant b^2 - 4ac determines the nature of the solutions when you set the completed-square form equal to zero and solve. If the discriminant is positive, the squared term equals a positive number, yielding two distinct real roots symmetric about the axis of symmetry. If the discriminant is zero, the squared term equals zero, giving exactly one repeated real root at the vertex. If the discriminant is negative, the squared term would need to equal a negative number, which is impossible for real numbers, so there are no real roots (only complex conjugate roots). The discriminant also equals -4a times the k-value in vertex form.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy