Skip to main content

MATH · POLYNOMIAL ROOT

Polynomial Root Calculator

Find the roots of linear, quadratic, cubic, and quartic polynomials. Handles real and complex roots with numerically stable methods.

Polynomial Degree
Coefficients
Roots
1x² + -5x + 6 = 0
Real roots
x12
x23
Summaryx₁ = 2, x₂ = 3

About This Calculator

Solve polynomial equations from degree 1 (linear) through degree 4 (quartic). Enter the coefficients and the calculator finds all real and complex roots using numerically stable methods — the stable quadratic form, Cardano's trigonometric method for cubics, and Ferrari's method for quartics.

How It Works

Select the polynomial degree and enter each coefficient (a, b, c, d, e). The calculator depresses the polynomial (removes the cubic term for quartics) before solving, which avoids catastrophic cancellation in floating-point arithmetic. Real roots are displayed directly; complex roots appear as conjugate pairs (p ± qi).

The Formula

Linear: x = −b/a Quadratic: x₁,₂ = (−b ± √(b²−4ac)) / 2a Cubic: Cardano / trigonometric form Quartic: Ferrari resolvent cubic

a, b, c, d, e
polynomial coefficients (leading to constant)
D
discriminant = b² − 4ac
p ± qi
complex conjugate root pair

Frequently Asked Questions

What are complex roots?
Complex roots come in conjugate pairs (p + qi and p − qi) and appear when the discriminant is negative. They are valid solutions to the polynomial equation in the complex number system, even though they have no real-number counterpart. A quadratic with no real roots always has exactly one complex conjugate pair.
Why use a stable root form for quadratics?
The standard formula x = (−b + √D)/(2a) suffers from catastrophic cancellation when b is very large relative to √D — floating-point arithmetic loses precision in the subtraction. The stable form computes x₁ = (−b − sign(b)√D)/(2a) first, then x₂ = c/(a·x₁), avoiding that cancellation entirely.
What is Cardano's formula?
Cardano's formula is the 16th-century algebraic solution for cubic equations. It expresses the roots in terms of cube roots and square roots of the coefficients. When the discriminant is negative (the "casus irreducibilis" case of three real roots), the formula produces complex intermediate values even for real roots — so the calculator uses the numerically cleaner trigonometric form instead.
How accurate are the results for degree-4 polynomials?
Results are accurate to 6 significant figures for well-conditioned polynomials. Ill-conditioned quartics (roots that are very close together, or extremely large/small coefficients) may show reduced precision due to floating-point arithmetic — this is a fundamental limitation of floating-point, not an implementation flaw.