Connect via MCP →

Enter Calculation

For the quadratic equation a·x² + b·x + c = 0 (a ≠ 0).

Formula

Show calculation steps (1)
  1. Vertex (Completed Square Form)

    Vertex (Completed Square Form): Completing the Square Calculator

    Vertex of the parabola; h is the axis of symmetry and k is the minimum or maximum value.

Advertisement

Results

Solutions (real roots)
x₁ = 5
x₂ = 1
found by completing the square
Discriminant (b² − 4ac) 16
Vertex x = −b/(2a) 3
Vertex y (minimum/maximum) -4

What is completing the square?

Completing the square is an algebraic technique that rewrites a quadratic expression \(ax^2 + bx + c\) as a perfect-square term plus a constant. This form makes it easy to read off the solutions of the equation and to find the vertex of its parabola. This calculator applies the method to any quadratic with \(a \neq 0\) and reports the real roots, the discriminant, and the vertex.

Geometric area model showing x squared plus bx rearranged into a near-square with a small missing corner
Completing the square as a geometric area: adding the small corner square completes the larger square.

How to use it

Enter the three coefficients \(a\), \(b\), and \(c\) from your equation \(ax^2 + bx + c = 0\). The calculator computes the discriminant \(b^2 - 4ac\). If it is zero or positive, two real roots are shown (they coincide when the discriminant is zero). If it is negative, the equation has no real solutions and the roots are complex.

The formula explained

Starting from \(ax^2 + bx + c = 0\), divide by \(a\) and move the constant: \(x^2 + (b/a)x = -c/a\). Add \((b/2a)^2\) to both sides to complete the square, giving \((x + b/2a)^2 = (b^2 - 4ac)/(4a^2)\). Taking the square root and isolating \(x\) yields $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a},$$ the familiar quadratic formula. The vertex sits at \(x = -b/(2a)\).

Advertisement
Upward parabola on coordinate axes with vertex, axis of symmetry, and two x-intercept roots marked
The parabola \(y = ax^2 + bx + c\) showing its vertex, axis of symmetry, and the two real roots.

Worked example

For \(x^2 - 6x + 5 = 0\), we have \(a = 1\), \(b = -6\), \(c = 5\). The discriminant is $$(-6)^2 - 4 \cdot 1 \cdot 5 = 36 - 20 = 16.$$ Then $$x = \frac{6}{2} \pm \frac{\sqrt{16}}{2} = 3 \pm 2,$$ giving \(x_1 = 5\) and \(x_2 = 1\). The vertex is at \(x = 3\), \(y = 9 - 18 + 5 = -4\).

FAQ

What if the discriminant is negative? The parabola never crosses the x-axis, so there are no real roots; the solutions are complex numbers.

Why does a have to be non-zero? If \(a = 0\) the equation is linear, not quadratic, and completing the square does not apply.

What does the vertex tell me? It is the lowest point of the parabola when \(a > 0\) (a minimum) or the highest point when \(a < 0\) (a maximum).

Last updated: