Completing the Square Calculator

Vertex form—
Vertex x (h)—
Vertex y (k)—
Discriminant (b² − 4ac)—

How Completing the Square Calculator is calculated: ax² + bx + c = a(x + b/2a)² + (c − b²/4a); vertex at (−b/2a, c − b²/4a)

What is completing the square?

Completing the square is the method of rewriting a quadratic expression in the form a times (x minus h) squared plus k, which is called vertex form. The rewriting is done by taking half the coefficient of x, squaring it, and adding and subtracting it inside the expression, so that part of the quadratic becomes a perfect square. The result shows the vertex of the parabola directly: the point (h, k) is the lowest point when a is positive, or the highest point when a is negative.

This calculator rewrites any quadratic in vertex form and shows the vertex coordinates and the discriminant. For the roots of the same quadratic, a quadratic equation calculator solves them directly, while this page shows the form that reveals the vertex.

No data leaves your device: the maths runs entirely in your browser, with no sign-up and no server round-trip. You can change a number, see the answer move, and change it back, all instantly. It is a private way to check a figure before you talk to a professional about it. The page has no tracking of the numbers you enter, and closing the tab leaves nothing behind.

How completing the square works

The method starts with ax squared plus bx plus c. Factor out a from the first two terms, then take half of b over a, square it, and add and subtract it inside the brackets. The first three terms form the perfect square (x plus b over 2a) squared, and the rest simplifies to the constant c minus b squared over 4a. The vertex is at x equal to minus b over 2a, and y equal to c minus b squared over 4a, which are the h and k of the vertex form.

The coefficients a, b and c are the numbers in the quadratic ax squared plus bx plus c. The coefficient a must not be zero, or the expression is not quadratic. The coefficient b can be zero, which makes the vertex sit on the y-axis, and c can be zero, which makes the parabola pass through the origin. The calculator handles all of these cases, including negative coefficients.

The vertex form is the headline answer, written as a times (x minus h) squared plus k, and it is the form that shows the vertex. The vertex coordinates h and k are shown separately, so they can be used directly. The discriminant, b squared minus 4ac, tells how many real roots the quadratic has: two if it is positive, one if it is zero, and none if it is negative.

A dash in a result row means the value does not apply to the inputs you entered, not that the calculation failed. Some rows only make sense for certain methods or certain inputs, and the calculator leaves them blank rather than inventing a number. If every row shows a dash, check the inputs: a missing or zero value in a required field is the usual cause, and the field labels say which values are needed.

The vertex, explained

The vertex is the turning point of the parabola, and it is the most important feature of a quadratic. When a is positive, the parabola opens upwards, and the vertex is the minimum, the lowest value the quadratic ever takes. When a is negative, the parabola opens downwards, and the vertex is the maximum. The vertex form shows the vertex directly, which is why completing the square is the standard way to find it.

The x-coordinate of the vertex is minus b over 2a, which is also the axis of symmetry: the parabola is symmetric about the vertical line through the vertex. The y-coordinate is the value of the quadratic at that x, which is c minus b squared over 4a. Together they give the point where the parabola turns, and they also give the maximum or minimum value of the expression.

The vertex form also makes the roots easy to find: set the expression equal to zero, and solve (x minus h) squared equals minus k over a, which gives x equal to h plus or minus the square root of minus k over a. That only works when minus k over a is non-negative, which is exactly when the discriminant is non-negative. The discriminant and the vertex form are two views of the same facts.

A worked example: x squared minus 4x plus 3

Take the quadratic x squared minus 4x plus 3, with a equal to 1, b equal to minus 4 and c equal to 3. This is a standard textbook example, and its roots are easy to check.

Half of b is minus 2, and its square is 4. Rewrite the quadratic as (x minus 2) squared minus 4 plus 3, which is (x minus 2) squared minus 1. The vertex form is (x - 2)² - 1, the vertex is at (2.00, -1.00), and the discriminant is 4.00.

A vertex at (2.00, -1.00) means the parabola opens upwards, since a is positive, and its lowest point is 1 unit below the x-axis at x equal to 2. The discriminant of 4.00 is positive, so there are two real roots, which are 1 and 3, and they are symmetric about the vertex at x equal to 2, as they must be.

Who completes the square

Algebra students complete the square to find the vertex of a parabola, to solve quadratic equations, and to derive the quadratic formula itself. The quadratic formula is obtained by completing the square on the general quadratic, so the method is the foundation of the whole topic, not just a trick for one kind of problem.

Calculus students use it to integrate rational functions and to work with conic sections. The equation of a circle or an ellipse is often given in expanded form, and completing the square in x and in y reveals the centre and the radii, which are hidden in the expanded form.

Physicists and engineers use it for optimisation: the maximum height of a projectile, the minimum cost of a design, and the equilibrium of a system are all vertices of parabolas, and completing the square finds them directly. A fraction calculator is the tool for the fractions that appear in the arithmetic.

No calculator replaces professional advice where money, safety or a legal obligation is involved. The figures here are computed correctly from the inputs and the formula shown, but the choice of formula, the choice of inputs and the decision that follows are yours. When the stakes are high, take the calculated figure to someone qualified and ask them to confirm it before you commit. For a related calculation, the Pythagorean theorem calculator covers the next number most people need after this one.

Completing the square vs the quadratic formula

Completing the square and the quadratic formula solve the same problems, but they show different things. Completing the square gives the vertex form, which reveals the vertex and the maximum or minimum value. The quadratic formula gives the roots directly, but it says nothing about the vertex. The formula is faster for roots, and completing the square is more informative about the shape.

In fact, the quadratic formula is derived by completing the square on the general quadratic, so the two are not rivals but parent and child. A student who can complete the square can derive the formula, and a student who only memorises the formula cannot go the other way. That is why textbooks teach completing the square first, even though the formula is quicker to use.

Keep both tools in mind. The right choice is the one whose inputs match the numbers you actually have, not the one with the fancier name. When in doubt, run both and compare: the pair of answers is usually more useful than either one alone.

Common mistakes with completing the square

The first is forgetting to add and subtract the same number, which changes the value of the expression instead of rewriting it. The second is taking half of b but forgetting to square it, which does not make a perfect square.

The third is getting the sign of h wrong: the vertex form is (x minus h) squared, so a plus sign inside the brackets means h is negative. The fourth is forgetting to factor out a before completing the square, when a is not 1.

Check your answer by expanding the vertex form: it must give back the original quadratic exactly. Expand (x minus 2) squared minus 1, and you get x squared minus 4x plus 4 minus 1, which is x squared minus 4x plus 3, the original. If the expansion does not match, the vertex form is wrong.

How to use this completing the square calculator

To use it, enter a (coefficient of x²); enter b (coefficient of x); enter c (constant), then read the results box at the top. The main result is highlighted, and the other rows give the supporting figures. If an answer looks wrong, check the inputs first: a misplaced decimal or a wrong unit is the usual cause, not the formula.

Enter the coefficients a, b and c, with a not equal to zero, and read the vertex form, the vertex coordinates and the discriminant. Check the answer by expanding the vertex form to recover the original quadratic. If the discriminant is negative, there are no real roots, but the vertex form is still valid.

Everything on this page runs in your browser, so the numbers you type never leave your device. There is no sign-up, no upload and no waiting for a server. Change any input and the results update straight away, which makes it easy to test a few values side by side before you decide anything. You can also use it offline once the page has loaded, because the calculation needs no connection at all.

Frequently Asked Questions

Take half the coefficient of x, square it, and add and subtract it. For x squared minus 4x plus 3, half of minus 4 is minus 2, whose square is 4, so the expression becomes (x minus 2) squared minus 4 plus 3, which is (x minus 2) squared minus 1.

Vertex form is a times (x minus h) squared plus k, where (h, k) is the vertex of the parabola. It shows the turning point directly: when a is positive, the vertex is the minimum, and when a is negative, it is the maximum.

Complete the square to get vertex form, or use the formulas h equals minus b over 2a and k equals c minus b squared over 4a. For x squared minus 4x plus 3, the vertex is at (2, minus 1).

It reveals the vertex and the maximum or minimum value of a quadratic, it solves quadratic equations, and it is the method used to derive the quadratic formula. It is also used to write circles and ellipses in standard form by completing the square in both x and y.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.