Descartes’ Rule of Signs Calculator
Apply Descartes’ rule of signs to a polynomial: count sign changes in f(x) and f(−x), list the possible numbers of positive, negative and non-real roots, and compare with the actual roots.
How it works
Positive real roots = (sign changes in f(x)) or fewer by an even number · negative real roots = (sign changes in f(−x)) or fewer by an even number · non-real roots come in conjugate pairs: degree − positive − negative must be even · factor out xᵏ first for roots at 0
Descartes’ rule of signs bounds the number of positive real roots of a polynomial with real coefficients by the number of sign changes between consecutive nonzero coefficients; the true count is that number or smaller by an even number. Replacing x with −x flips the signs of the odd-power terms, and the same rule applied to f(−x) bounds the negative roots. Combined with the fact that non-real roots come in conjugate pairs, this gives a short table of possibilities (OpenStax College Algebra §5.5). The calculator also finds the roots numerically so you can see which combination actually occurs.
Worked example
f(x) = x⁴ − 3x³ + 2x² + x − 5 has signs + − + + −, which change 3 times, so there are 3 or 1 positive roots. f(−x) = x⁴ + 3x³ + 2x² − x − 5 has signs + + + − −, 1 change, so exactly 1 negative root. The possible combinations are (3, 1, 0) and (1, 1, 2). Numerically there is 1 positive root (≈ 2.35), 1 negative root (x = −1) and 2 non-real roots.
Sources: OpenStax College Algebra 2e — 5.5 Zeros of Polynomial Functions · Wolfram MathWorld — Descartes’ Sign Rule
Frequently asked questions
How do you use Descartes’ rule of signs?
Write the polynomial in descending powers and count how often consecutive nonzero coefficients change sign. That number, or that number minus 2, 4, …, is the number of positive real roots. Repeat with f(−x) for the negative roots.
Why does the count drop by 2?
Non-real roots of a real polynomial come in conjugate pairs, so the real roots “lost” always disappear two at a time.
Does a zero coefficient count as a sign change?
No. Skip zero coefficients and compare only the nonzero ones. If the constant term is 0, factor out x first: x = 0 is a root but neither positive nor negative.
Are repeated roots counted separately?
Yes. The rule counts roots with multiplicity, so a double positive root counts as 2.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.