Free Math Calculator

Completing the Square Calculator

Use this completing the square calculator with steps to rewrite quadratics in vertex form and solve them. Supports fractions, decimals and negative coefficients.

✓ Free to use✓ Dynamic calculation steps✓ Input validation✓ Mobile friendly

Calculator

Enter your values

Enter your own values. The result starts blank and clears whenever an input changes.

Enter coefficients for ax² + bx + c. Use integers, decimals with up to 6 places, or fractions such as -3/4. All three fields are required; enter 0 for a missing term. a cannot be 0. Solutions shown are for ax² + bx + c = 0.

Complete the square and understand the rewritten quadratic

This completing the square calculator rewrites ax² + bx + c as a(x − h)² + k using exact fraction arithmetic. It also finds the vertex, axis of symmetry and solutions of ax² + bx + c = 0. The worked steps use the three coefficients you enter, including negative leading coefficients and fractions.

The purpose is to explain the transformation, not merely return the same roots as another solver. The Quadratic Formula Calculator uses the discriminant formula; this page shows what is added and subtracted to make a perfect-square trinomial. Both methods describe the same quadratic, but their working answers different learning questions.

How to use the completing the square calculator with fractions

  1. Rewrite your expression in descending powers of x and identify a, b and c. For 2x² + 8x + 5, enter 2, 8 and 5.
  2. Enter every coefficient, even a zero. For x² − 9, use a = 1, b = 0 and c = −9.
  3. For a fraction, type a single slash, such as -3/4. Do not enter x, a full equation, a mixed number or an arithmetic expression in a coefficient field.
  4. Select Calculate and read the completed-square identity first. The solution panel applies specifically to setting your entered expression equal to zero.

If your original equation has a nonzero right side, move that value to the left before entering c. For example, x² + 6x = 7 becomes x² + 6x − 7 = 0. Changing any input clears the old result. Copy, Download and Print include the result, facts and calculation steps; Reset clears the three fields.

Affiliate disclosure: As an Amazon Associate I earn from qualifying purchases.

For an optional numerical check, browse scientific calculators (paid link). Confirm the supported functions; a numerical device does not necessarily reproduce this tool’s symbolic working. No purchase is needed.

The completing-the-square formula and why it works

Start by factoring a from the quadratic and linear terms: a[x² + (b/a)x] + c. Half the coefficient b/a is b/(2a). Adding its square and subtracting the same square inside the brackets does not change the expression. The first three terms then become a perfect square.

The result is a[x + b/(2a)]² + c − b²/(4a). In vertex notation, h = −b/(2a) and k = c − b²/(4a), giving a(x − h)² + k. The calculator verifies that expansion restores the linear coefficient −2ah = b and the constant ah² + k = c.

When a is negative, the outside factor must multiply both the added and subtracted square. Dropping that factor is a common sign error. The vertex is still (h, k), but it is a maximum rather than a minimum. The output therefore separates the expression identity from its geometric interpretation.

Worked examples: integers, fractions and a negative coefficient

Integer coefficients: Enter 1, −6 and 5. The identity is x² − 6x + 5 = (x − 3)² − 4. Setting the expression equal to zero gives (x − 3)² = 4, so x = 1 or x = 5. The vertex is (3, −4).

A leading coefficient other than one: Enter 2, 8 and 5. Factoring 2 from the first two terms gives 2(x² + 4x) + 5. Add and subtract 4 inside the bracket to obtain 2(x + 2)² − 3. The vertex is (−2, −3); the equation has exact solutions x = −2 ± √(3/2).

A fractional coefficient: Enter 1/2, −3 and 1. The result is (1/2)(x − 3)² − 7/2. This illustrates why the square added inside the brackets cannot simply be subtracted outside without multiplying by a.

A downward-opening parabola: Enter −2, 8 and −3. The result is −2(x − 2)² + 5, so the maximum value is 5 at x = 2. These examples use the same coefficient form as the calculator and can be reproduced directly.

Real roots, repeated roots and complex solutions

For f(x) = 0, vertex form gives (x − h)² = −k/a. A positive right side gives two distinct real roots; zero gives the repeated root x = h; a negative value gives a conjugate pair of complex roots. Both square-root signs are necessary unless the root is repeated.

With inputs 1, 2 and 5, the identity is (x + 1)² + 4, and the equation gives x = −1 ± 2i. This is not an invalid quadratic: it simply has no real zeros. The Complex Number Calculator can check arithmetic involving these imaginary values.

When a rational square root is exact, it is reduced to a fraction. Otherwise, the output may retain √(p/q), rather than extract every possible square factor. For example, √(3/2) is an exact answer even though it can also be written √6/2. The Simplifying Radicals Calculator provides a separate supported square-root simplification procedure.

Input limits and responsible use

This tool accepts one quadratic in the real variable x through three numeric coefficients. Each field allows 1–48 characters, up to six decimal places per number, and at most one fraction slash. The numerator, denominator and resulting coefficient each have magnitude at most 1,000,000; a fraction denominator cannot be zero. Scientific notation, commas, mixed numbers, coefficient expressions and equation strings are not accepted.

Exact rational arithmetic uses a 256-digit intermediate safety limit. This is an educational algebra tool, not a graphing system, proof of a physical model or unrestricted equation parser. If a = 0, the problem is linear and should be entered in the Linear Equation Calculator. A browser result does not override your teacher’s required method or exam calculator rules.

Completing the Square Calculator FAQs

Sources and methodology

These educational references explain the underlying mathematics. This independently implemented tool is not affiliated with their publisher. Supported methods, numerical precision and restrictions are described above.