Completing the Square

Vertex form a(x-h)^2+k and vertex (h, k) for a quadratic.

Key facts

What it does
Vertex form a(x-h)^2+k and vertex (h, k) for a quadratic.
Formula
h = -b/(2a); k = c - b^2/(4a); form a(x-h)^2+k.
You enter
Coefficient a (x^2) · Coefficient b (x) · Constant c
Worked example
(x - 2)^2 - 1; vertex (2, -1).

A clearer path to an answer

From your question to a useful result

This page keeps the calculation transparent: define the goal, enter the matching values, inspect the method, and decide what the result means in your situation.

01

Goal

Vertex form a(x-h)^2+k and vertex (h, k) for a quadratic.

02

Inputs

Coefficient a (x^2) · Coefficient b (x) · Constant c

03

Method

h = -b/(2a); k = c - b^2/(4a); form a(x-h)^2+k.

04

Next step

Calculate, review the assumptions below, then compare a related tool when the decision needs more context.

Completing the Square

Vertex form a(x-h)^2+k and vertex (h, k) for a quadratic.

Must not be zero.

Result

Enter your values above and choose Calculate to see the result here.

Calculation map

Follow the path from input to answer

Ready to calculate
01

Inputs (3)

  • Coefficient a (x^2) Ready
  • Coefficient b (x) Ready
  • Constant c Ready
02

Formula

h = -b/(2a); k = c - b^2/(4a); form a(x-h)^2+k.

Bounded, transparent calculation

03

Result

  • Calculate to preview the result.
This diagram mirrors the calculator contract. It summarizes the declared inputs, formula, and returned outputs; it does not add a forecast or professional advice.

Recent runs

Your recent runs stay in this browser session only.

Formula, assumptions, and example

Formula: h = -b/(2a); k = c - b^2/(4a); form a(x-h)^2+k.

Half the x-coefficient locates the vertex; the constant adjusts so the forms match. The sign display flips for negative h or k.

  • Real quadratic with nonzero a.
  • Vertex form a(x-h)^2+k with h, k from the formula above.

Worked example: (x - 2)^2 - 1; vertex (2, -1).

Displayed input contract

  • Coefficient a (x^2) · minimum -1000000000 · maximum 1000000000
  • Coefficient b (x) · minimum -1000000000 · maximum 1000000000
  • Constant c · minimum -1000000000 · maximum 1000000000

The displayed limits are checked before the handler runs. Model-specific domain checks may also reject impossible or non-finite inputs.

Methodology: This calculator follows the WorldCalculate input, formula, precision, and boundary policy. Read the official methodology.

Calculator usage statistics

Usage of this calculator and related tools

This section counts anonymous successful Calculate submissions, not unique visitors. Counts and top tools appear only when trusted aggregate data is available; country analysis is shown only under the same condition and reporting threshold.

Waiting for trusted aggregate usage data.

Answer-first guide

How to use the Completing the Square for a real question

Vertex form a(x-h)^2+k and vertex (h, k) for a quadratic. Start with one clearly defined goal, enter values in the units shown, and keep the result attached to the assumptions below.

What this answers

This tool is useful when your question includes completing the square, vertex form, quadratic vertex. It returns the outputs declared in the calculator contract rather than a live quote, approval, diagnosis, or professional sign-off.

What you enter

Coefficient a (x^2) · Coefficient b (x) · Constant c. Keep the same time period, unit system, and currency wherever the form requires comparable values.

How to check it

Run the worked example first, compare its output with the page's example, then change one input at a time. This makes an unexpected result easier to trace to a unit, boundary, or assumption.

Three checks before you rely on the answer

  1. Match the question. Confirm that the result means the quantity you need, not a similar-sounding percentage, balance, rate, or estimate.
  2. Match the inputs. Use the requested units and period, and read each hint before replacing the example values with your own.
  3. Read the boundary. Review the assumptions and limits. Real quadratic with nonzero a.

Need a wider view? Browse Math Calculators or compare the related tools below. The WorldCalculate methodology explains how formulas, examples, limits, and revisions are reviewed.

How to use the Completing the Square

  1. Enter Coefficient a (x^2) — Must not be zero.
  2. Enter Coefficient b (x).
  3. Enter Constant c.
  4. Choose Calculate and read the result panel.
  5. Use Download PDF or Download Word to save a result sheet.

Formula

h = -b/(2a); k = c - b^2/(4a); form a(x-h)^2+k.

Half the x-coefficient locates the vertex; the constant adjusts so the forms match. The sign display flips for negative h or k.

Worked example

(x - 2)^2 - 1; vertex (2, -1).

Assumptions and limits

  • Real quadratic with nonzero a.
  • Vertex form a(x-h)^2+k with h, k from the formula above.

Context and background

The mathematical structure behind the tools

Math calculators move from named quantities to a relation, then to a result that can be checked with substitution, units, or an alternate form.

Arithmetic, algebra, geometry, trigonometry, and number theory provide reusable structures for classroom work and everyday reasoning. Each page narrows that structure to one declared problem.

Research and review

How this guide was researched

Researched by , Founder and editorial researcher at WorldCalculate.

This guide follows the live calculator's declared inputs, formula, worked example, assumptions, validation boundaries, and source-backed methodology. The review date describes editorial review of the calculator explanation; it is not a promise that external facts or rates remain current.

Read the WorldCalculate research and methodology policy

WorldCalculate visual showing equations, factoring, roots, matrices, vectors, substitution, checking, and interpretation for Completing the Square
A correct equation still needs the right question, domain, substitution check, and interpretation. An original mathematics visual showing a problem moving from definition through algebraic transformation and substitution to a checked result. WorldCalculate original artwork; watermark included.

Completing the square turns a quadratic from the expanded form ax^2 + bx + c into the vertex form a(x - h)^2 + k. The two expressions describe exactly the same function, but they make different features easy to see. In expanded form, the coefficients are convenient for substitution and comparison. In vertex form, the point (h, k), the axis of symmetry, the direction of opening, and the minimum or maximum value are visible almost immediately. This calculator asks for the three coefficients a, b, and c, then returns the equivalent vertex form and the coordinates h and k. The most useful way to read the result is not to memorize a sign pattern in isolation. Follow how the leading coefficient is factored, identify the number that makes a perfect square, and then check the finished expression by expanding it again. This guide walks through that process for monic, nonmonic, positive, and negative quadratics, explains what the result says about a graph, and shows where the method is useful and where another method is a better fit.

Small WorldCalculate visual showing define, transform, substitute, check, and interpret steps for a math problem for Completing the Square
Show enough of the transformation that another learner can reproduce the result. Compact math visual showing why algebraic steps and domain checks belong with the final answer. WorldCalculate original artwork; watermark included.

Why rewrite a quadratic

A quadratic function has the general form f(x) = ax^2 + bx + c, where a is not zero. This expanded form displays the coefficients directly, but it hides the location of the turning point. Completing the square reorganizes the same terms so that the squared distance from a particular x-value is visible: f(x) = a(x - h)^2 + k. Because a square is never negative, the expression immediately tells you how values move away from the vertex.

The rewrite is an identity, not an approximation. Nothing about the function is discarded, and no x-values are restricted simply because the appearance changes. For every allowed x, the original expression and the vertex-form expression have the same output. That makes the method useful whenever the question is about shape, symmetry, an extreme value, or a graph rather than only about the coefficients themselves.

The calculator is designed for a real quadratic with finite coefficients. It reports the form using the exact sign structure needed for the entered values, along with h and k as separate numbers. Reading those separate values helps prevent a common mistake: the h-coordinate is the number inside the horizontal shift, while the visible sign inside the parentheses is the opposite of h. The point is written (h, k), not (-h, k).

  • Expanded form: f(x) = ax^2 + bx + c.
  • Vertex form: f(x) = a(x - h)^2 + k.
  • The two forms are equal for every real x.
  • The vertex is (h, k), and a must be nonzero.

The central idea: make a perfect square

A perfect-square trinomial has the pattern x^2 + 2px + p^2, which factors as (x + p)^2. The constant p^2 is not chosen arbitrarily. It is the square of half the coefficient of x after the expression has been made monic. This is the small adjustment that changes an incomplete square into a complete one.

For a simple expression such as x^2 + 6x, half of 6 is 3, so add 9 to obtain x^2 + 6x + 9 = (x + 3)^2. Adding 9 changes the value, so subtract 9 at the same time: x^2 + 6x = (x + 3)^2 - 9. The plus and minus additions cancel algebraically, while the square is now visible.

A leading coefficient other than 1 adds one important step. The coefficient a must be factored out of both the x^2 and x terms before the half-coefficient rule is used. If the expression is 2x^2 + 8x, write it as 2(x^2 + 4x), not as 2(x^2 + 8x). The number to halve is 4 because it is the coefficient inside the parentheses. Forgetting this step is the main reason a nonmonic result has the wrong vertex.

The same rule works when a is negative. Factor the negative value, keep it attached to the entire bracket, and complete the square inside that bracket. The sign outside will distribute across the correction later. Treating a negative leading coefficient as though it were positive can reverse both the constant adjustment and the graph interpretation.

  • Make the quadratic part inside the parentheses monic first.
  • Take half of the resulting x-coefficient.
  • Add and subtract the square of that half.
  • Keep the outside coefficient attached to both the square and its correction.

Deriving h and k step by step

Start with f(x) = ax^2 + bx + c. Factor a from the first two terms: f(x) = a(x^2 + (b/a)x) + c. Inside the parentheses, the coefficient of x is b/a. Half of it is b/(2a), and its square is b^2/(4a^2). Add and subtract that square inside the parentheses so the value does not change:

f(x) = a[x^2 + (b/a)x + b^2/(4a^2) - b^2/(4a^2)] + c. The first three terms in the bracket form a square, so they become [x + b/(2a)]^2. The remaining correction is multiplied by a: a times b^2/(4a^2) = b^2/(4a). Therefore f(x) = a[x + b/(2a)]^2 - b^2/(4a) + c.

Vertex form is written with x - h rather than x plus a fraction. Since x + b/(2a) is the same as x - (-b/(2a)), the horizontal coordinate is h = -b/(2a). The remaining constant is k = c - b^2/(4a). Putting both results together gives f(x) = a(x - h)^2 + k.

The formula for k can also be understood without memorizing it as a separate rule. Once h is known, substitute x = h into the original quadratic. The squared part vanishes in vertex form, leaving f(h) = k. Thus k = f(h), which provides a strong independent check. If the value obtained from c - b^2/(4a) does not agree with direct substitution, revisit the signs and the denominator.

  • h = -b/(2a).
  • k = c - b^2/(4a).
  • Equivalently, k = f(h).
  • The completed result is a(x - h)^2 + k.

What h and k mean

The number h is the x-coordinate of the vertex. It is also the vertical line of symmetry: points equally far to the left and right of h have the same y-value. If h is 2, the axis is x = 2. If h is -2, the axis is x = -2. The sign printed inside the parentheses is different because the expression uses x - h.

The number k is the y-coordinate of the vertex and the output at x = h. In an upward-opening parabola, k is the smallest possible y-value over all real x. In a downward-opening parabola, k is the largest possible y-value. These claims depend on the domain being all real numbers; a restricted interval may not include the vertex.

The value of a controls the vertical scale and the direction of opening. The vertex location does not require a to equal 1. A large absolute value of a makes the graph narrower than the basic parabola, while an absolute value between 0 and 1 makes it wider. A positive a sends the arms upward, and a negative a sends them downward. The coordinates h and k locate the turning point, while a describes the shape around it.

The coefficient b affects h together with a, rather than determining h by itself. The constant c affects k, but k is not generally equal to c. In fact, c is the y-intercept because f(0) = c, whereas k is the output at x = h. These are the same only when h is zero.

  • h locates the vertical axis x = h.
  • k is the function value at x = h.
  • a determines opening direction and vertical stretch.
  • c is the y-intercept, not usually the vertex height.

Sign handling without guesswork

The safest sign practice is to use the formulas exactly as written. In h = -b/(2a), the minus sign is part of the numerator and the sign of a stays in the denominator. In k = c - b^2/(4a), b^2 is nonnegative, but the denominator 4a can be positive or negative. Do not replace a by its absolute value unless you are doing a separate magnitude calculation; that would change the function.

The displayed parentheses use x - h. When h is positive, the result reads x minus a positive number. When h is negative, subtracting h becomes addition: x - (-2) = x + 2. The vertex still has x-coordinate -2. Reading the plus sign inside the square as a positive coordinate is a sign reversal.

The outside sign matters just as much. If a is negative, the completed square is multiplied by a negative number. A correction that looks like plus 4 inside the bracket may become minus 4 after distribution, or a negative correction may become positive. Keep the bracket visible until the last line so that the outside sign cannot be lost.

A useful mental check is symmetry. If b is positive and a is positive, h is negative. If b is negative and a is positive, h is positive. If a changes sign while b stays fixed, the denominator changes sign and h changes side accordingly. This is not a substitute for calculation, but it is a quick way to spot an impossible-looking result.

  • Use the signed a in both denominators.
  • The sign in x - h is opposite to the sign of h.
  • Do not discard a negative outside coefficient while completing the square.
  • Check whether the direction of the axis agrees with -b/(2a).

Reading the calculator inputs and output

Enter the coefficient of x^2 as a, the coefficient of x as b, and the constant term as c. A missing term has coefficient zero. For example, x^2 + 5 is entered with a = 1, b = 0, and c = 5; -4x^2 + 7x is entered with a = -4, b = 7, and c = 0. The letters describe positions in the polynomial, not labels for three arbitrary numbers.

The coefficient a must be nonzero because a zero value removes the quadratic term and leaves a linear or constant expression. The record accepts finite real coefficient values in the displayed input range. Very large values can make the intermediate square b^2 large, so a result that is outside a useful numerical scale may be rejected rather than presented as a misleading finite answer.

The vertex form line is a formatted expression, while the separate h and k results are numeric values. Use the numeric values when you need coordinates or want to compare two quadratics. Use the formatted expression when you want to expand back to the original function or sketch the transformations. If a decimal is displayed with trailing digits removed, that is a presentation choice, not evidence that the underlying algebra changed.

The example built into the record uses a = 1, b = -4, and c = 3. Those values produce h = 2 and k = -1, so the result is (x - 2)^2 - 1. The following sections show how to reproduce that result and how the same method changes for other signs and leading coefficients.

  • Map each entered value to its matching power of x.
  • Use zero for a term that is absent.
  • Reject a = 0 because the expression is no longer quadratic.
  • Read the coordinate result separately from the formatted sign display.

Worked example: a positive monic quadratic

Consider f(x) = x^2 - 4x + 3. Here a = 1, b = -4, and c = 3. Because the leading coefficient is already 1, no factoring step is needed. Half of the x-coefficient is -2, and its square is 4. Add and subtract 4: f(x) = x^2 - 4x + 4 - 4 + 3.

The first three terms form (x - 2)^2, so f(x) = (x - 2)^2 - 1. The formula gives the same coordinates directly: h = -(-4)/(2 times 1) = 2, and k = 3 - (-4)^2/(4 times 1) = 3 - 4 = -1. The vertex is therefore (2, -1), and the axis of symmetry is x = 2.

Because a = 1 is positive, the parabola opens upward and the vertex is a minimum. At x = 2, the square is zero and the function equals -1. At x = 1 or x = 3, the squared distance from the axis is 1, so the function equals 0 at both points. This symmetry is visible in the completed form and is less obvious in the original expanded form.

Expand the result to verify it: (x - 2)^2 - 1 = x^2 - 4x + 4 - 1 = x^2 - 4x + 3. The x^2, x, and constant terms all match. This final expansion is a reliable habit, especially when a calculation contains several negative signs.

  • Half of -4 is -2, and (-2)^2 is 4.
  • The vertex form is (x - 2)^2 - 1.
  • The vertex is (2, -1), a minimum because a is positive.
  • Expanding the result returns x^2 - 4x + 3.

Worked example: a positive nonmonic quadratic

Now use f(x) = 2x^2 + 8x - 3. The leading coefficient is positive but not 1, so factor 2 from the quadratic and linear terms: f(x) = 2(x^2 + 4x) - 3. The coefficient to use for completing the square is 4, not 8. Half of 4 is 2, and the needed square is 4.

Add and subtract 4 inside the parentheses: f(x) = 2[x^2 + 4x + 4 - 4] - 3. The first three bracketed terms are (x + 2)^2, giving f(x) = 2[(x + 2)^2 - 4] - 3. Distribute 2 only after the square is complete: f(x) = 2(x + 2)^2 - 8 - 3 = 2(x + 2)^2 - 11.

The formula confirms h = -8/(2 times 2) = -2. For k, use k = -3 - 8^2/(4 times 2) = -3 - 64/8 = -11. The vertex is (-2, -11), and the axis is x = -2. The plus sign in (x + 2)^2 is correct because x + 2 equals x - (-2).

The factor 2 remains in front of the square, so the parabola is narrower than x^2 and opens upward. At x = -2 the squared term vanishes, leaving -11. Expansion checks the nonmonic detail: 2(x + 2)^2 - 11 = 2(x^2 + 4x + 4) - 11 = 2x^2 + 8x + 8 - 11 = 2x^2 + 8x - 3.

  • Factor first: 2x^2 + 8x - 3 = 2(x^2 + 4x) - 3.
  • Complete the square with half of 4, not half of 8.
  • Vertex form: 2(x + 2)^2 - 11.
  • Vertex: (-2, -11), with an upward opening.

Worked example: a negative nonmonic quadratic

Consider f(x) = -2x^2 + 8x - 5. The leading coefficient is negative, so factor -2 from the first two terms while preserving its sign: f(x) = -2(x^2 - 4x) - 5. Inside the parentheses, half of -4 is -2 and its square is 4.

Insert the matching addition and subtraction: f(x) = -2[x^2 - 4x + 4 - 4] - 5. The completed portion is (x - 2)^2, so f(x) = -2[(x - 2)^2 - 4] - 5. Now distribute the negative coefficient: f(x) = -2(x - 2)^2 + 8 - 5 = -2(x - 2)^2 + 3.

Using the direct formulas gives h = -8/(2 times -2) = 2. For k, k = -5 - 8^2/(4 times -2) = -5 - 64/(-8) = -5 + 8 = 3. The negative denominator is why subtracting the fraction becomes adding 8. The vertex is (2, 3), not (2, -13) or another value produced by ignoring the sign of a.

Since a is negative, the square is multiplied by a negative number and the graph opens downward. The vertex is a maximum of 3. Expanding verifies every sign: -2(x - 2)^2 + 3 = -2(x^2 - 4x + 4) + 3 = -2x^2 + 8x - 8 + 3 = -2x^2 + 8x - 5.

  • Factor the full signed coefficient -2.
  • The completed form inside the bracket is (x - 2)^2 - 4.
  • Vertex form: -2(x - 2)^2 + 3.
  • Vertex: (2, 3), a maximum because a is negative.

A second negative example and the plus-sign display

A negative x-coefficient can make the horizontal sign look surprising. Take f(x) = -3x^2 - 6x + 2. Factor -3: f(x) = -3(x^2 + 2x) + 2. Half of the inside coefficient 2 is 1, so add and subtract 1 inside the bracket: f(x) = -3[x^2 + 2x + 1 - 1] + 2.

The result is -3[(x + 1)^2 - 1] + 2. Distribute the outside coefficient: f(x) = -3(x + 1)^2 + 3 + 2 = -3(x + 1)^2 + 5. The formulas agree: h = -(-6)/(2 times -3) = -1, and k = 2 - (-6)^2/(4 times -3) = 2 - 36/(-12) = 5.

The form contains x + 1, but the vertex coordinate is h = -1. This is exactly x - (-1). The graph opens downward because a = -3, and its maximum is 5 at x = -1. The absolute value 3 makes it vertically steeper than a basic downward parabola, but it does not move the vertex away from (-1, 5).

When a sign seems counterintuitive, replace the parenthetical part with x - h explicitly. Here x + 1 becomes x - (-1). That one rewrite usually resolves the confusion more reliably than trying to infer the coordinate from the visible plus sign.

  • -3x^2 - 6x + 2 becomes -3(x + 1)^2 + 5.
  • The plus sign represents h = -1.
  • The vertex is (-1, 5), and the maximum is 5.
  • The outside -3 controls the downward opening and vertical stretch.

Verify the result in two directions

Expansion is the most direct verification. Start with a(x - h)^2 + k, square the binomial, and distribute: a(x^2 - 2hx + h^2) + k = ax^2 - 2ahx + ah^2 + k. The coefficient of x must be -2ah, and the constant must be ah^2 + k. With h = -b/(2a), the x-coefficient becomes b. With k = c - b^2/(4a), the constant becomes c after simplification.

Substitution provides a second check for the vertex height. Compute h from -b/(2a), then evaluate the original f(h). That value must equal k. This is especially helpful when the coefficients are decimal values or when a negative a makes the fraction in k look unusual.

A symmetry check gives a third, visual check. Choose a distance d and compare f(h - d) with f(h + d). In vertex form, both values are a d^2 + k, so they must match. If they do not, the horizontal coordinate or one of the signs was copied incorrectly.

Verification does not require trusting the display alone. Keep enough intermediate digits for the calculation, compare the direct and transformed values, and only then round the final coordinates for presentation. A result that passes expansion and substitution is much less likely to contain a hidden sign or factoring error.

  • Expand the vertex form and match all three original coefficients.
  • Check k by evaluating f(h).
  • Compare points h - d and h + d for symmetry.
  • Round after checking, not before checking.

How vertex form changes the graph

The basic graph y = x^2 has its vertex at (0, 0) and opens upward. In a(x - h)^2 + k, replacing x by x - h shifts the graph horizontally so its turning point moves to x = h. Adding k shifts every output vertically, moving the vertex to y = k. Multiplying by a reflects the graph across the x-axis when a is negative and stretches or compresses it according to the size of its absolute value.

The axis of symmetry is the vertical line x = h. For any distance d, the two inputs h - d and h + d have equal squared distance from h. Their outputs are equal even when a is negative because the same squared distance is multiplied by the same a and then shifted by k.

The y-intercept is recovered by setting x = 0: f(0) = a(0 - h)^2 + k = ah^2 + k. This must equal c. The vertex is generally not the y-intercept, so a graph can cross the y-axis far from its turning point. Vertex form makes the distinction clear by separating the shift from the value at zero.

The x-intercepts, when they exist, occur where a(x - h)^2 + k = 0. Their position relative to the vertex depends on the sign of -k/a. If the parabola opens upward and k is positive, the entire graph is above the x-axis and there are no real x-intercepts. If k is zero, the graph touches the axis at the vertex. If the vertex is on the side of the x-axis opposite the direction in which the parabola opens, two crossings may occur.

  • h is the horizontal shift and axis location.
  • k is the vertical shift and vertex height.
  • Positive a opens upward; negative a opens downward.
  • The y-intercept is c, while the vertex height is k.

Domain and range implications

For a standard real quadratic with no additional restriction on x, the domain is all real numbers. Completing the square does not change that domain. The square is defined for every real x, and multiplying by a and adding k do not remove any real inputs. If a problem gives a restricted interval, such as x between two endpoints, that restriction belongs to the problem and is not created by the rewrite.

On the full real domain, the range follows directly from the sign of a. Since (x - h)^2 is at least zero, a positive a makes a(x - h)^2 at least zero, so f(x) is at least k. The range is [k, infinity) in interval notation. For a negative a, a(x - h)^2 is at most zero, so f(x) is at most k. The range is (-infinity, k].

The vertex supplies the boundary of the range because the squared term is zero there. Moving away from x = h increases the square, which raises the output when a is positive and lowers it when a is negative. This gives a simple inequality proof of the minimum or maximum without differentiating.

For a restricted domain [L, U], do not automatically report k as the minimum or maximum. First decide whether h lies in the interval. If it does, evaluate the vertex and both relevant endpoints. If h lies outside the interval, the quadratic is monotonic across that interval, so the extreme values occur at the endpoints. The calculator returns the unrestricted vertex information; the user must apply any separate domain restriction.

  • Unrestricted real quadratic domain: all real x.
  • If a > 0, range: y >= k, with minimum k.
  • If a < 0, range: y <= k, with maximum k.
  • A restricted interval may make an endpoint the actual extreme.

Completing the square versus the quadratic formula

Completing the square and the quadratic formula answer related but different questions. Vertex form is usually the clearer choice when you need the turning point, axis of symmetry, opening direction, range, or a transformation-based graph. The quadratic formula is usually the shorter choice when the only goal is to find the x-intercepts of ax^2 + bx + c = 0.

Vertex form can still produce the roots. Set a(x - h)^2 + k equal to zero, giving (x - h)^2 = -k/a. When -k/a is nonnegative, the real roots are x = h plus or minus sqrt(-k/a). If -k/a is negative, there are no real roots. If k is zero, both signs give the same repeated root x = h.

Substituting h and k into that root expression and simplifying leads to x = [-b plus or minus sqrt(b^2 - 4ac)]/(2a). The discriminant D = b^2 - 4ac is connected to the vertex height by k = -D/(4a). For a positive a, a positive k corresponds to D negative and no real crossings; for a negative a, the same geometric conclusion is represented with the signs reversed through the relation.

The methods are not competitors in the sense that one makes the other invalid. They expose different information. If a root calculation is vulnerable to cancellation or the coefficients are awkward, the quadratic formula may be more direct; if the question is about optimization or a graph, vertex form carries the needed meaning. A complete solution can use one method for the vertex and another for the roots, then compare the results as a check.

  • Vertex form is best for h, k, symmetry, extrema, and graph shifts.
  • The quadratic formula is best for direct root calculation.
  • Roots from vertex form are x = h +/- sqrt(-k/a) when real.
  • The discriminant and vertex height are linked by k = -D/(4a).

Numerical precision and rounded displays

The algebraic formulas are exact when a, b, and c are exact numbers, but a calculator display may use decimal approximations. The expression b^2 can be large, and k subtracts b^2/(4a) from c. If two large quantities are close, that subtraction can lose meaningful digits in ordinary floating-point arithmetic. A displayed zero may represent an exact zero in a simple case or a value rounded to the available display precision in a decimal case.

The formatted form and coordinate values are presented to a practical number of decimal places, with the expression using at most six decimal places in the calculation display. Do not infer more certainty from a long decimal than the input measurements justify. If a, b, or c came from measurement, the significant precision of those inputs limits the meaningful precision of h and k.

For a hand check, keep extra guard digits while finding h and k, then round only the final result. Compare k with direct substitution f(h), and expand the displayed form with unrounded intermediate values when possible. If the rounded expression is expanded, a tiny difference from the original constant may be a display effect rather than an algebra error.

Very small nonzero values of a deserve special care. Since h contains division by 2a, a value close to zero can place the vertex very far from the origin and make the quadratic behave almost like a line over a limited viewing window. A finite coefficient does not guarantee a numerically convenient vertex. When precision matters, retain the original coefficients, record the rounding choice, and verify the result at the scale relevant to the problem.

  • Keep guard digits through intermediate calculations.
  • Round h, k, and the displayed form only at the end.
  • Use f(h) and expansion as precision checks.
  • A small a can produce a very large h and amplify numerical sensitivity.

Common mistakes and how to prevent them

The first common mistake is halving b before factoring a. For 2x^2 + 8x, the inside coefficient is 4, so the square is built from 2, not 4. The formula h = -b/(2a) automatically handles this division and is a useful check against a hand derivation.

A second mistake is reading the sign inside the parentheses as the coordinate. The form (x + 2)^2 has h = -2, while (x - 2)^2 has h = 2. Rewrite plus as subtraction of a negative number whenever the coordinate is unclear.

A third mistake is treating b^2 as though it preserves the sign of b. Squaring removes that sign in k, although b still affects h through the leading minus sign. A fourth is forgetting that the sign of a remains in the denominator of k. With negative a, subtracting a negative fraction can become addition.

Other errors include using c as the vertex height, dropping the outside coefficient after factoring, expanding the binomial incorrectly, allowing a = 0, and rounding before the square correction is complete. The fastest defense is a short three-part check: calculate h, evaluate f(h) for k, and expand the final form.

  • Do not halve the original b until a has been factored out.
  • Do not confuse x + d with a vertex at positive d.
  • Do not replace a by its absolute value in the k formula.
  • Do not assume c equals k or round before verification.

Practical uses of vertex form

Vertex form is useful in optimization because the vertex gives the best or worst value of a quadratic model on an unrestricted real domain. For an upward-opening cost or error curve, k identifies the lowest modeled value. For a downward-opening height or return curve, k identifies the highest modeled value. The interpretation is only as good as the model and the domain, but the algebra makes the candidate extreme point explicit.

Graphing is another natural use. A graph can be sketched from the vertex, axis, opening direction, and a few symmetric points. The coefficient a indicates how quickly the curve moves away from the vertex, while h and k establish its location. This is often faster and less error-prone than constructing a large table of values from the expanded form.

Vertex form also helps solve inequalities. If a(x - h)^2 + k is compared with a horizontal level, the sign of a tells you whether the outputs grow or shrink away from h. The same squared-distance reasoning can identify intervals above or below a threshold after any real crossing points have been found.

In algebra lessons, completing the square connects several ideas at once: factoring, transformations, symmetry, extrema, discriminants, and the quadratic formula. In applications, it can reveal a meaningful center or best-case point in a two-variable model. It should be used as a transparent rearrangement, not as a claim that every real situation follows a perfect parabola indefinitely.

  • Find modeled minima and maxima.
  • Sketch a parabola from its vertex and shape.
  • Analyze quadratic inequalities around the axis.
  • Connect graph features with algebraic coefficients.

Limitations and boundaries

Completing the square applies to a genuine quadratic, so a must not be zero. If a = 0, the expression is bx + c or a constant and needs a linear or constant-function method. The result also assumes real coefficients. Complex-number extensions are possible in a broader algebra setting, but they are outside the real vertex interpretation used here.

The calculator returns the vertex information for the polynomial described by the three coefficients. It does not decide whether a quadratic is a suitable model for a physical, financial, or geometric situation, and it does not know whether an input was measured consistently. Units must be compatible before the coefficients are entered. A vertex can be mathematically correct while a model-based conclusion is unreasonable outside the interval where the model was created.

The unrestricted range statements require all real x-values. Constraints such as nonnegative time, a limited length, an integer-only input, or a feasible budget can remove the vertex from the usable domain. In that case, compare the vertex with the allowed endpoints and report the constrained extreme instead.

Finally, a rounded decimal form is not a replacement for exact algebra when exactness matters. Fractions, symbolic coefficients, or a separate high-precision calculation may be preferable for proofs and sensitive comparisons. Use the displayed result as a clear numerical summary, and keep the original coefficients available for verification.

  • The method requires a real quadratic with a!= 0.
  • It does not validate the suitability of an outside model.
  • Domain restrictions can change the usable minimum or maximum.
  • Rounded output may need an exact or higher-precision check.

A reliable workflow for any quadratic

First identify a, b, and c exactly, including zero coefficients and negative signs. Second compute h = -b/(2a). This step gives an early prediction of which side of the y-axis contains the vertex. Third compute k either from c - b^2/(4a) or by evaluating f(h). Using both when the problem is important gives a built-in cross-check.

Next write the form as a(x - h)^2 + k, paying attention to the display sign. If h is negative, use x plus its absolute value; if k is negative, write subtraction of its absolute value. Keep a in front, including a minus sign when necessary. Do not simplify the visual signs by intuition alone.

Then interpret the result: the vertex is (h, k), the axis is x = h, and the opening depends on a. State the range only after deciding whether the domain is unrestricted. If roots are also needed, choose the quadratic formula or set the vertex form equal to zero and compare the result with the discriminant.

Finish by expanding the vertex form or checking f(h). This workflow is short enough for routine exercises and strong enough for a numerical calculation where a sign error would change the conclusion.

  • Identify coefficients and their signs.
  • Calculate h, then calculate k.
  • Write and interpret a(x - h)^2 + k.
  • Verify by substitution or expansion.

Frequently asked questions

Q: Why is the vertex coordinate the opposite sign from the number inside the parentheses? A: Vertex form is defined as a(x - h)^2 + k. Therefore a visible x + 2 is x - (-2), so h is -2. The coordinate is read from the value being subtracted, not from the sign printed after x.

Q: Why do I have to factor a before completing the square? A: The half-coefficient rule applies to a monic expression whose x^2 coefficient is 1. After factoring a, the inside x-coefficient is b/a. Using the original b would create a square that is too large for the bracket and would give the wrong constant correction.

Q: Is k always the original constant c? A: No. c is the value at x = 0, while k is the value at x = h. They are equal only when h is zero, which occurs when b is zero. The correction created by completing the square normally changes the constant term from c to k.

Q: What happens when a is negative? A: The same formulas still apply with the signed value of a. The parabola opens downward, k is the unrestricted maximum, and the negative denominator in k can make a subtraction become addition. Keep the negative coefficient outside the completed bracket until distribution is finished.

Q: Does completing the square find the roots automatically? A: It can. Set a(x - h)^2 + k equal to zero and solve the square, obtaining x = h +/- sqrt(-k/a) when the quantity under the square root is nonnegative. If roots are the only requested result, the quadratic formula may be more direct.

Q: What does the domain of a quadratic become after the rewrite? A: For a standard real quadratic without restrictions, it remains all real numbers. The rewrite is an identity. A separate problem constraint, such as an interval or nonnegative time, must still be applied when finding a constrained range or extreme.

Q: Why does my decimal result differ slightly when I expand it? A: The displayed vertex form may be rounded, while the original coefficients were entered with more precision. Expand using unrounded h and k if available, keep extra intermediate digits, and compare f(h) with k before deciding that the algebra is wrong.

Q: Can I use this method if a equals zero? A: No. When a is zero there is no x^2 term, so the expression is not quadratic. Use a linear or constant-expression method instead of forcing a vertex form.

Q: How can I check a result quickly? A: Confirm h with -b/(2a), substitute h into the original function to confirm k, and expand a(x - h)^2 + k to recover ax^2 + bx + c. Matching all three coefficients is the strongest short check.

Q: Why is vertex form useful if I already know the quadratic formula? A: The quadratic formula focuses on x-intercepts. Vertex form also gives the axis, turning point, opening direction, range boundary, and transformation from the basic parabola. Choose the form that exposes the feature you need.

Frequently asked questions

What is the Completing the Square?

Vertex form a(x-h)^2+k and vertex (h, k) for a quadratic.

What is the formula for the Completing the Square?

h = -b/(2a); k = c - b^2/(4a); form a(x-h)^2+k. Half the x-coefficient locates the vertex; the constant adjusts so the forms match. The sign display flips for negative h or k.

What do I need to use this calculator?

Enter Coefficient a (x^2), Coefficient b (x), Constant c, then choose Calculate.

What are the limits of this calculator?

Real quadratic with nonzero a. Vertex form a(x-h)^2+k with h, k from the formula above.

Methodology

This calculator is part of the WorldCalculate library. Its formula, example, assumptions, input bounds, and output formatting follow the official methodology.

Read the WorldCalculate methodology

Use this calculator as part of a bigger plan

These WorldCalculate collections connect this tool with related questions while keeping each calculation separate and transparent.

Keep this guide handy

Share this guide

Send the canonical WorldCalculate page to a classmate, client, teammate, or friend with the destination you already use.