Daily Calculator Hub
← Back to home

Quadratic Formula Calculator

Last updated: November 4, 2026

Solve ax² + bx + c = 0, classify real or complex roots, and handle linear degeneracies.

Use a dot for decimals; do not use grouping commas. Arabic and Persian digits are accepted.

Solutions

Ready when you are

—

    Enter your values, then select Calculate.

    On this page

    Quick summary: Solve ax² + bx + c = 0, classify real or complex roots, and handle linear degeneracies.

    Updated November 4, 2026
    Read the complete guide

    Using this calculator

    Write your equation with zero on the right before entering the coefficients. Include signs: x² − 3x + 2 = 0 uses a = 1, b = −3, c = 2. The result distinguishes two real roots, a repeated root and a complex conjugate pair. It also handles a = 0 explicitly.

    Calculation method

    Discriminant D = b² − 4ac
    For a ≠ 0: x = (−b ± √D) / (2a)
    For D < 0: x = −b/(2a) ± i√(−D)/(2|a|)

    The real-root implementation uses a numerically stable equivalent: compute one root through a sign-aware intermediate q, then obtain the other from c/q. Coefficients are scaled before the discriminant calculation to reduce avoidable overflow. These steps improve numeric evaluation without changing the equation.

    Worked examples

    Two real roots

    For a = 1, b = −3, c = 2, D = 9 − 8 = 1. The roots are 1 and 2. Substitution gives zero for either value.

    Complex and degenerate equations

    x² + 1 = 0 gives 0 ± 1i. If a = 0, b = 2 and c = −8, the remaining equation 2x − 8 = 0 gives x = 4.

    Check this scenario in the calculator:

    Coefficient a
    1
    Coefficient b
    -3
    Coefficient c
    2

    Understanding the result

    The ± symbol denotes two conjugate solutions. A discriminant of zero gives one repeated real root. When a and b are both zero, c = 0 makes the equation an identity, while a nonzero c makes it inconsistent. Those cases are reported as classifications rather than fabricated roots.

    Boundaries and assumptions

    Coefficients are numeric values, not algebraic expressions, and are limited to ±10¹². Browser floating-point arithmetic can affect a discriminant very close to zero or roots with extreme scales. Displayed roots are approximations; the tool does not preserve exact radicals or implement arbitrary-precision complex algebra.

    Questions and reference

    Why can a quadratic have complex roots?

    A negative discriminant requires the square root of a negative quantity, represented using i² = −1.

    Does a = 0 mean an error?

    It means the equation is no longer quadratic. The remaining linear or constant equation is solved or classified.

    Reference: OpenStax: quadratic equations.