1. Make x² monic
If a ≠ 1, divide every term in ax²+bx+c=0 by a. The new x coefficient is b/a.
See the number added to both sides, completed-square form, vertex form, exact and decimal roots, and a substitution check.
The algebra steps will appear here.
Completing the square uses one identity. If the coefficient of x is p, half of it is p/2, and:
x² + px = (x + p/2)² − (p/2)²
If a ≠ 1, divide every term in ax²+bx+c=0 by a. The new x coefficient is b/a.
Rewrite the equation as x²+(b/a)x=−c/a so the variable terms are together.
Add (b/2a)² to both sides. The left side now factors as (x+b/2a)².
Use the plus-or-minus sign, then isolate x. A negative right side gives complex roots.
For any quadratic with a ≠ 0:
ax² + bx + c = a(x + b/2a)² + c − b²/4a
This is vertex form a(x−h)²+k, so h=−b/(2a) and k=c−b²/(4a). The vertex is (h,k), and the axis of symmetry is x=h.
For x²+6x+5=0, move 5 and add (6/2)²=9: (x+3)²=4. Therefore x+3=±2, so x=−1, −5.
For 2x²−8x+5=0, divide by 2: x²−4x=−5/2. Add 4 to get (x−2)²=3/2, so x=2±√6/2.
For x²−8x+16=0, add 16 after moving the constant: (x−4)²=0. The only root is x=4, counted twice.
For x²+4x+8=0, completing the square gives (x+2)²=−4. Thus x+2=±2i, so x=−2±2i.
Integers, fractions, and finite decimals are converted to reduced fractions and processed with BigInt arithmetic. The displayed algebra is exact; decimal roots are rounded to 10 significant decimal places. Results are verified numerically by substituting each root into the original quadratic.
To keep browser calculations responsive, each numeric part is limited to 18 digits and normalized integer coefficients must not exceed 1012 in magnitude. Inputs outside that range receive an error rather than an unreliable result. Radical extraction checks square factors up to 100,000 and always preserves an exact radical even when a very large radicand is not reduced further. Last reviewed: 4 August 2026.
It rewrites a quadratic so part of it is a perfect-square binomial. The identity x²+px=(x+p/2)²−(p/2)² is the key step.
After making the x² coefficient 1, take half the x coefficient and square it. For x²+px, add (p/2)² to both sides.
Yes when a ≠ 1. Divide every term by a so the leading coefficient is one before forming the perfect square.
ax²+bx+c becomes a(x−h)²+k, where h=−b/(2a) and k=c−b²/(4a).
Yes. If the completed square equals a negative number, taking square roots introduces i, the imaginary unit, and gives a complex-conjugate pair.
Yes. Enter integers, finite decimals, or fractions such as 3/4. Finite decimals are converted to exact fractions before any algebra is performed.