Formula Used
ax² + bx + c = a(x - h)² + kh = -b / 2ak = c - b² / 4ax = (-b ± √(b² - 4ac)) / 2a
Completing the square rewrites a quadratic around its turning point. The method isolates a perfect square and reveals the vertex. It also supports exact roots without losing fractional precision.
How to Use
Choose an input mode and enter your quadratic equation. Select the output style, precision, variable, and optional steps. Submit the form to calculate, graph, verify, and export.
3/4 and decimals are accepted. Expression mode supports squared, linear, and constant terms. Parenthesised polynomial expansion is intentionally excluded for safer parsing.
Example Data
| Quadratic | Completed-square form | Vertex | Root type |
|---|---|---|---|
| x² - 6x + 5 | (x - 3)² - 4 | (3, -4) | Two real roots |
| 2x² + 8x + 3 | 2(x + 2)² - 5 | (-2, -5) | Two real roots |
| x² + 4x + 4 | (x + 2)² | (-2, 0) | Repeated root |
| x² + 2x + 5 | (x + 1)² + 4 | (-1, 4) | Complex roots |
Frequently Asked Questions
What does completing the square mean?
It rewrites a quadratic using one squared binomial. This form exposes the parabola's vertex and symmetry axis. It also makes several quadratic equations easier to solve.
Can the leading coefficient differ from one?
Yes, the calculator supports any nonzero leading coefficient. It factors or divides that value during the method. Exact fractions remain simplified throughout every displayed calculation step.
Does the calculator accept fractions?
Yes, enter fractions using a slash between integers. Decimals are also converted into reduced rational values. This preserves exact forms before decimal approximations are displayed.
What happens when the discriminant is negative?
The equation has two complex conjugate roots. The calculator displays exact imaginary forms and decimal approximations. The graph then shows no real horizontal-axis intersections.
How is the vertex calculated?
The horizontal coordinate equals negative b divided by two-a. Substitution then produces the corresponding vertical coordinate. These values directly create the completed-square vertex form.
Can I enter the entire equation?
Yes, select expression mode and type both sides. You may also include one equals sign directly. The parser combines like terms before starting calculations automatically.
Why must coefficient a be nonzero?
A zero leading coefficient removes the squared term. The expression then becomes linear instead of quadratic. Completing the square would no longer be applicable there.
How accurate are the decimal roots?
Decimal precision is selectable from zero through ten places. Exact forms remain available for comparison and verification. Rounding only affects displayed approximations, not underlying calculations.
How can I save the results?
Use CSV for structured spreadsheet-compatible result data. Print or save the page as a PDF. The copy button captures the complete merged calculation output.