Descartes' Rule of Signs Calculator

Enter your polynomial coefficients from the highest degree down.

How it is calculated

Enter the coefficients of a polynomial from the highest power down to the constant, separated by spaces or commas, and include zeros for missing powers. The tool counts sign changes between consecutive nonzero coefficients: that count V is the maximum number of positive real roots, and the actual number is V, V − 2, V − 4 and so on down to 0 or 1. For negative roots it replaces x with −x, which flips the sign of every odd-power coefficient, and counts again. The degree shown is simply the number of coefficients minus one. At least two numbers are required, and anything non-numeric (such as x^2) gives no result.

Worked example

For x³ − 3x² + 4x − 2 enter 1 -3 4 -2. The signs are + − + −, which changes sign three times, so there are 3 or 1 positive real roots. For negative roots, flip the odd-power terms: −x³ − 3x² − 4x − 2, signs − − − −, no changes, so there are 0 negative roots. The degree is 3. The tool reports positive roots as 3 or 1, negative roots as 0, degree 3. In fact the polynomial factors as (x − 1)(x² − 2x + 2), which has one real root, x = 1.

Try this example →

Common mistakes

  • Leaving out the zero coefficients. For x³ − 4 you must type 1 0 0 -4; typing 1 -4 describes a different polynomial (and degree 1).
  • Entering the coefficients lowest power first. The order must be highest degree first; reversing it can change the sign-change counts and the degree-based flip for negative roots.
  • Reading the answer as the exact number of roots. "3 or 1" means at most three and the same parity, not that there are three, and complex or repeated roots are not separated out.
  • Typing the polynomial as text such as x^3-3x^2+4x-2. The field only accepts numbers separated by spaces or commas.
  • Adding extra zeros at the end. Each trailing zero is a root at x = 0, which is neither positive nor negative, but it still raises the degree shown; extra leading zeros also inflate the degree.

About this calculator

Descartes' Rule of Signs counts the sign changes between consecutive nonzero coefficients of a polynomial, ordered from highest to lowest degree, to bound the number of positive real roots — the actual count is that number of sign changes, or fewer by an even number. Substituting x with −x and repeating the count gives the equivalent bound for negative real roots, all without needing to actually solve the polynomial.

This calculator applies the rule to your entered coefficients, a technique taught in algebra and precalculus courses as a quick way to narrow down how many real roots to expect before applying numerical methods or the rational root theorem. It's especially useful for sanity-checking a graphing calculator's output or for problems where finding exact roots is hard but knowing how many to look for is enough.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The rule gives only upper bounds, but a test value can settle it. The default x³ − 3x² + 2 shows 2 or 0 positive roots; plugging in x = 1 gives 1 − 3 + 2 = 0, so a positive root exists and the answer is 2. The tool does not count roots inside an interval. If you want that, tell us.

Popular calculators

All Calculators