Descartes Rule of Signs Calculator

Bound the number of positive and negative real roots by counting sign changes.

Math and PercentUpdated 2026-11-192 min read
Descartes Rule of Signs Calculator
Coefficients from highest power down, separated by commas. Zeros are ignored.
Sign changes in f(x)
...
Sign changes in f(-x)...
Possible positive roots...
Possible negative roots...
Signs of f(x)...

What it does

Descartes' rule of signs gives a quick bound on how many positive and negative real roots a polynomial can have. You count how often the sign of a coefficient changes as you move through the polynomial, ignoring any zero coefficients.

This tool takes the coefficients in descending power order. It counts sign changes in f(x) and in f(-x), then lists the possible root counts by subtracting two repeatedly from each bound.

The page opens with the quartic x to the fourth plus 7 x cubed minus 4 x squared minus x minus 7. Its signs are plus, plus, minus, minus, minus, giving one sign change and therefore exactly one positive root.

For f(-x) the signs become plus, minus, minus, plus, minus, giving three sign changes. The polynomial therefore has either three or one negative real roots.

The rule gives bounds rather than exact counts when the number of changes exceeds one. It also says nothing about complex roots except that they come in conjugate pairs.

How to use

  1. Enter the coefficients from highest power down.
  2. Put zeros where powers are missing; they will be ignored.
  3. Read the number of sign changes in f(x).
  4. Check the possible positive root counts.
  5. Use the f(-x) results for negative roots.
  6. Combine with the rational root theorem to test candidates.

Formula

Positive roots are at most the number of sign changes in f(x), and differ from it by an even number; negative roots follow the sign changes of f(-x)
f(x)
The polynomial with coefficients in descending powers.
f(-x)
The polynomial with x replaced by minus x, which flips signs of odd powers.
sign change
A transition between consecutive nonzero coefficients of opposite sign.

The parity of the root count matches the parity of the sign change count, which is why the actual number is the bound, the bound minus two, the bound minus four, and so on. A bound of zero or one gives the exact number of roots.

Worked example

Example: x to the fourth plus 7 x cubed minus 4 x squared minus x minus 7

The page opens with coefficients 1, 7, -4, -1, -7.

  1. Write the signs of f(x): plus, plus, minus, minus, minus.
  2. There is one change, from plus to minus, so there is exactly one positive root.
  3. Form f(-x) by flipping the signs of odd powers: plus, minus, minus, plus, minus.
  4. There are three sign changes: plus to minus, minus to plus, and plus to minus.
  5. The number of negative roots is therefore three or one.
  6. The tool reports positive_changes 1 and negative_changes 3.

Reference table

Sign change bounds for sample polynomials
CoefficientsSigns of f(x)Positive changesNegative changes
1, 7, -4, -1, -7+ + - - -13
3, 1, -1, 3, 2, -1, 1+ + - + + - +42

Limits

  • Accepts 2 to 12 coefficients.
  • The leading coefficient cannot be zero.
  • Provides bounds, not exact counts, when the bound exceeds one.
  • Says nothing about the location or value of the roots.

Common mistakes

  • Counting zero coefficients as sign changes.
  • Forgetting that the actual count can be lower by an even number.
  • Using f(x) instead of f(-x) to bound negative roots.
  • Treating the bound as an exact count when it is greater than one.
  • Assuming the rule finds complex roots.

Try it yourself

Quick checks. Answers sit tucked under each question.

Signs + + - + + - +. Positive changes?

4, so there are 4, 2 or 0 positive real roots.

One sign change in f(x). Positive roots?

Exactly one.

How do you bound negative roots?

Count sign changes in f(-x), obtained by flipping odd power coefficients.

Questions

What does the rule tell me?

An upper bound and parity constraint on positive and negative real roots.

Why subtract two at a time?

Because nonreal roots arrive in conjugate pairs, so the count drops in steps of two.

How do I get f(-x)?

Replace x with minus x, which negates the coefficients of odd powers.

Are zero coefficients counted?

No. They are skipped when counting sign changes.

Can the rule give an exact count?

Yes when the number of changes is zero or one.

Does it locate the roots?

No. It only constrains how many there can be.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.