Skip to content
Math

Descartes' Rule of Signs Calculator

Enter the coefficients of your polynomial (from the highest-degree term down to the constant) and this calculator instantly applies Descartes' Rule of Signs. You get the maximum number of positive real roots, the maximum number of negative real roots, and a complete table listing every valid combination of positive, negative, and complex (non-real) roots. A step-by-step sign-change panel shows exactly how the count is derived.

Your details

The highest power of x in your polynomial.
Coefficient of the x^3 term.
Coefficient of the x^2 term.
Coefficient of the x term.
The constant term (coefficient of x^0).
Max positive real roots
2

Upper bound on positive real roots (sign changes in f(x))

Max negative real roots1
Min complex (non-real) roots0
Possible root combinations2
Max positive real roots2
Max negative real roots1
Min complex roots0

2 root combinations are possible: up to 2 positive and up to 1 negative real roots.

  • There are at most 2 positive real roots. The actual count is 2, 0, ..., down to 1 or 0 (decreasing by 2 each time).
  • There is exactly 1 negative real root.

Next stepDescartes' Rule gives upper bounds, not exact counts. To find actual roots, use the Rational Root Theorem to test candidate rational roots, or apply numerical methods such as Newton's method.

What is Descartes' Rule of Signs?

Descartes' Rule of Signs is a theorem from algebra that places an upper bound on how many positive real roots and how many negative real roots a polynomial can have. The rule was stated by Rene Descartes in his 1637 work La Geometrie. It does not tell you the exact number of roots, but it narrows down the possibilities significantly before you invest effort in finding them. The rule has two parts: the number of positive real roots is at most the number of sign changes in the sequence of non-zero coefficients of f(x), and the actual count must have the same parity (odd or even) as that maximum - so it decreases by exactly 2 at each step. The number of negative real roots is found by applying the same logic to f(-x), where you substitute -x for x throughout.

How to apply the rule: step by step

First, write the polynomial in standard form (descending powers of x) and drop any terms whose coefficient is zero. Then read the signs of the remaining coefficients from left to right and count how many times a positive coefficient is followed by a negative one, or a negative followed by a positive - each such transition is one sign change. That count is the maximum number of positive real roots. Call it P. The actual number of positive real roots is P, P - 2, P - 4, ..., down to 1 or 0. To find the maximum for negative real roots, replace x with -x in your polynomial. This negates the coefficient of every odd-power term and leaves even-power terms unchanged. Count the sign changes in the resulting coefficient sequence - call that N. The actual number of negative real roots is N, N - 2, ..., down to 1 or 0. Every root of a polynomial of degree d is either positive real, negative real, or complex (non-real). Because the degree equals the total count of roots (with multiplicity, by the Fundamental Theorem of Algebra), the number of complex roots for any given scenario is d minus the chosen positive count minus the chosen negative count. Complex roots always appear in conjugate pairs, so the complex count is always even.

Interpreting the results and finding actual roots

Descartes' Rule tells you the landscape of possibilities, not the destination. Once you know the possible combinations, your next step is narrowing down further. For polynomials with integer coefficients, the Rational Root Theorem lists every candidate rational root as a fraction p/q where p divides the constant term and q divides the leading coefficient. You test each candidate by direct substitution or synthetic division. If the polynomial does not factor easily, numerical methods such as Newton-Raphson iteration or the bisection method locate roots to any desired precision. Computer algebra systems (CAS tools) such as Wolfram Alpha, MATLAB, or Python's NumPy library can compute all roots numerically for any degree. The rule is especially useful in pencil-and-paper settings or early problem-setup: it tells you, for instance, that a certain polynomial cannot have any positive roots, saving all the time you would spend searching for them.

Special cases and limitations

The rule applies to real-coefficient polynomials only. If zero coefficients appear between non-zero ones, they are simply skipped - they do not count as sign changes. A polynomial like x^4 + 4x^2 + 4 has no sign changes in f(x) or f(-x), so it has no real roots at all: all four roots are complex (they are plus or minus i*sqrt(2), each with multiplicity 2). The rule does not account for repeated (multiple) roots specially - a double root counts as two roots in the tally but still requires only one sign change to allow it. For polynomials of odd degree, you always know at least one real root exists (by the Intermediate Value Theorem), regardless of what the rule says, but the rule still constrains which sign that root can have. If the rule gives a maximum of 0 for positive roots and a maximum of 0 for negative roots but the degree is odd, that is a contradiction - which means there must be at least one real root the rule misidentified; in practice this situation cannot arise for well-formed polynomials because the degree itself guarantees at least one real root.

Quick reference: Descartes' Rule examples

PolynomialSign changes f(x)Sign changes f(-x)Possible (pos, neg, complex)
x - 510(1, 0, 0)
x^2 - x - 611(1, 1, 0)
x^3 - 3x - 212 or 0(1, 2, 0) or (1, 0, 2)
x^3 + x + 101(0, 1, 2)
x^4 - 111(1, 1, 2)
x^4 + 4x^2 + 400(0, 0, 4)
x^5 - x^4 - x + 12 or 02 or 0(2, 2, 1), (2, 0, 3), (0, 2, 3), (0, 0, 5)

Illustrative polynomials with their sign-change counts and possible root breakdowns. Complex roots always occur in pairs.

Frequently asked questions

Does Descartes' Rule tell me the exact number of real roots?

No. It gives an upper bound and a parity constraint. If the rule says a polynomial can have at most 3 positive real roots, the actual count is 3, 1, or some even step below (3, 1 in this case). To find the exact number you need to analyse the polynomial further, for example by finding its roots numerically or factoring it.

How do I handle zero coefficients?

Skip them. Zero coefficients are ignored when counting sign changes. Only look at the non-zero entries in the coefficient sequence. For example, in x^3 + 0x^2 - 4x + 2 you read the signs of 1, -4, 2 (ignoring the 0), giving two sign changes.

What does the parity rule mean in practice?

Roots always come as real singles or complex conjugate pairs. Because complex pairs always come two at a time, and the total degree is fixed, the count of real roots and the maximum from the rule must share the same odd-or-even character. If the max is 3, the actual count is 3 or 1 (not 2 or 0). If the max is 4, the actual count is 4, 2, or 0.

Why does substituting -x give the negative root count?

A negative real root r of f(x) satisfies f(r) = 0 with r < 0. If we write r = -s where s > 0, then f(-s) = 0, meaning s is a positive root of g(x) = f(-x). So the positive roots of f(-x) are exactly the absolute values of the negative roots of f(x). Counting sign changes in f(-x) is therefore the same as counting possible positive roots of g, which equals possible negative roots of the original f.

Can the rule be applied to polynomials with complex coefficients?

No. Descartes' Rule of Signs assumes real coefficients. For polynomials with complex coefficients the concept of 'positive' and 'negative' coefficients is not defined in the same way, and the rule does not apply.

What if all sign-change counts are zero?

If f(x) has 0 sign changes and f(-x) has 0 sign changes, then all roots are complex (non-real). A classic example is x^2 + 1 (degree 2, no sign changes in either direction), whose only roots are i and -i.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…