FRIENDLY CALCULATOR · MATHEMATICS & STATISTICS

Quadratic Equation Calculator

Solve ax² + bx + c = 0 and report real or complex roots.

Enter your values

Formula and methodology

For a quadratic equation in standard form, ax² + bx + c = 0 with a ≠ 0, the discriminant is D = b² − 4ac. The roots are x = (−b ± √D) ÷ (2a).

Worked example: two real roots

For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6. D = 25 − 24 = 1, so the roots are (5 + 1) ÷ 2 = 3 and (5 − 1) ÷ 2 = 2.

How to use this calculator

  1. Write the equation in the standard form ax² + bx + c = 0.
  2. Enter the signed coefficients a, b and c; the coefficient a cannot be zero.
  3. Calculate to see the discriminant and both roots, including complex roots where needed.

How to interpret the discriminant

For example, x² + 2x + 5 = 0 has D = −16 and roots −1 + 2i and −1 − 2i.

Assumptions and limitations

This tool solves one quadratic equation with real-valued coefficients. It does not solve higher-degree polynomials, systems of equations or symbolic expressions. Decimal outputs are rounded for display; retain full precision when using roots in further calculations.

Reference: OpenStax College Algebra 2e — Quadratic Equations.

Updated: 29 November 2026. Calculations are performed in your browser.