Completing the Square Calculator
This completing the square calculator converts ax² + bx + c into vertex form. Example: x² + 6x + 5 becomes (x + 3)² − 4 with vertex (−3, −4) and roots −5 and −1.
Example: Coefficient a (of x²) 1 · Coefficient b (of x) 6 · Constant c 5 → Result: f(x) = (x + 3)² − 4, vertex (-3 | -4). Source: Wikipedia – Quadratische Ergänzung. Updated: .
How it is calculated
Completing the square rewrites ax² + bx + c as a(x + p)² + q, the vertex form from which the vertex and the shift of the parabola can be read off directly. The trick is to add the missing term so that a binomial formula appears.
Method
First factor a out of the first two terms: a(x² + (b/a)x) + c. For the binomial (x + p)² the bracket lacks p², where p = b/(2a). You add it and subtract it again outside the bracket, multiplied by a. What remains is q = c − b²/(4a). The calculator gives p and q directly and shows each step.
Two examples
For x² + 6x + 5, p = 3 and q = 5 − 9 = −4, so (x + 3)² − 4. For 2x² − 8x + 3, p = −2 and q = 3 − 8 = −5, so 2(x − 2)² − 5 with vertex (2, −5). The roots come from the discriminant D = b² − 4ac; in the first example D = 16 and the roots are −5 and −1.
- A minus sign inside the bracket means a shift to the right: (x − 2)² has its vertex at x = 2.
- If q is negative and a positive, the vertex lies below the x-axis and there are two roots.
Frequently asked questions
What is completing the square used for?
To put a parabola into vertex form, find its vertex, solve quadratic equations without the formula, or rewrite a circle equation in centre form.
How do you complete the square when a is not 1?
Factor out a first, complete the bracket with (b/(2a))², and balance the extra term with the factor a. The result is a(x + b/(2a))² + c − b²/(4a).
Why does the vertex form say x + p while the vertex is at −p?
Because (x + p)² is zero exactly when x = −p. The bracket shifts the parabola p units to the left, or to the right when p is negative.
Sources and legal basis
As of: · Editorial policy
Related tools
- Parabola Vertex CalculatorParabola vertex calculator: from f(x) = ax² + bx + c get the vertex form, the roots and the axis of symmetry – with working and a check, or convert back.
- Quadratic Formula CalculatorQuadratic formula calculator: solve ax² + bx + c = 0 with steps – roots, discriminant, exact radical form, vertex, factored form and complex roots.
- Factor Polynomial CalculatorFactor polynomial calculator: take out the common factor, find the roots and split a polynomial into linear factors, with every step shown and a check.
- Expand Polynomial CalculatorExpand polynomial calculator: multiply out brackets and powers, spot the special product formulas and see every step, also with several variables.
- Equation of a Circle CalculatorEquation of a circle calculator: from centre and radius, from the general form or from three points, with both forms, circumference, area and a point check.
- Equation of a Line CalculatorEquation of a line from two points or from a point and slope: slope-intercept form, general form, parametric form, x-intercept and working shown at once.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Double integral calculatorDouble integral calculator: integrate f(x, y) over rectangles, regions with curved limits or in polar coordinates – result, error estimate, area and average.
- Arrhenius equation calculatorArrhenius equation calculator: find activation energy from two rate constants at two temperatures, or the new k – with the formula and a worked example.