Algebra calculator

Quadratic formula calculator

Solve a quadratic equation from coefficients a, b, and c. The calculator shows the discriminant first, then reports two real roots, one repeated root, or a complex-conjugate pair without attempting division when a is zero.

DiscriminantReal and complex rootsSubstitution shown

Interactive Quadratic formula calculator

Enter known values

Enter the known values and select Calculate.

How to use this calculator

  1. Rewrite the equation in standard form ax² + bx + c = 0.
  2. Enter zero for a missing b or c term.
  3. Enter a nonzero value for a.
  4. Read the discriminant and root type before reviewing the calculated roots.

Formula and method

For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant D = b² − 4ac determines the root type.

Worked example

For x² − 5x + 6 = 0, D = 25 − 24 = 1. The roots are (5 + 1) ÷ 2 = 3 and (5 − 1) ÷ 2 = 2.

Assumptions and result interpretation

  • Coefficients are real finite numbers.
  • Complex roots are displayed in a + bi form when the discriminant is negative.
  • Decimal results are rounded for display while the formula uses full numeric precision.
  • The tool solves the equation; it does not factor or graph the polynomial.

Understanding the result

A positive discriminant gives two distinct real roots, zero gives one repeated real root, and a negative discriminant gives two complex-conjugate roots.

Common mistakes

  • Leaving a missing coefficient blank instead of entering zero
  • Forgetting to move every term to one side
  • Dropping the ± sign
  • Dividing only the square-root term by 2a

Methodology sources

Use this result as a calculation aid. Confirm input definitions, required precision, and any governing policy or professional standard separately.