Saved

Press the star next to a tool's name to save it.

All my tools

Descartes Rule of Signs Calculator

Use this Descartes rule of signs calculator to count the sign changes of f(x) and f(−x) and list the possible numbers of positive and negative real roots.

Type a polynomial in x, or a list of its coefficients with the highest power first and zeros for missing powers. The calculator counts the sign changes of f(x) and f(−x) and gives the possible numbers of positive and negative real roots.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Type a polynomial or its coefficients, then press Apply the rule.

A Descartes rule of signs calculator tells you how many positive and negative real roots a polynomial can have. Type the polynomial or its coefficients, and the calculator counts the sign changes in f(x) and in f(−x), and lists the possible numbers of positive and negative roots. It uses the rule as Wikipedia's page on Descartes's rule of signs states it, and it works in your browser.

How to use the Descartes rule of signs calculator

  1. Type the polynomial, such as x^3 + x^2 − x − 1.
  2. Or type its coefficients, with the highest power first, separated by commas, such as 1, 1, −1, −1.
  3. Press Apply the rule.
  4. Read the sign changes and the possible numbers of positive and negative roots.

The rule

The Wikipedia page says that if you write the non-zero coefficients of a polynomial in order of descending powers, the number of positive real roots, counted with their multiplicity, is at most the number of sign changes in the sequence, and that it differs from the number of sign changes by an even number. A sign change is a place where two neighbouring non-zero coefficients have opposite signs. Zero coefficients are left out of the count.

Negative roots

To find the number of negative roots, apply the rule to f of minus x. Changing x to minus x flips the sign of every term with an odd power, and the number of sign changes of the new polynomial is the bound for the negative roots, with the same rule about the even difference. The calculator does this for you, and shows both counts.

The example of the page

The page takes f of x equal to x cubed plus x squared minus x minus 1. The signs of the coefficients are plus, plus, minus, minus, so there is one sign change, and the polynomial has exactly one positive root. For f of minus x, which is minus x cubed plus x squared plus x minus 1, the signs are minus, plus, plus, minus, with two changes, so there are two or no negative roots. The polynomial is x plus 1, squared, times x minus 1, so the roots are minus 1, minus 1 and 1, which fits the rule: one positive root and a double negative root.

What the numbers mean

The possible numbers are the number of sign changes, that number minus 2, minus 4, and so on, down to 0 or 1. If there are 3 sign changes, there are 3 or 1 positive roots. If there is only 1 sign change, there is exactly 1. If there are no sign changes, there are no positive roots at all. The remaining roots of the polynomial are complex or negative, and the calculator adds up the largest possible number of real roots from the two counts, including a root at zero.

Roots at zero

If the polynomial has no constant term, then zero is a root, and the lowest power of x that is present tells you how many times. The calculator removes these zero coefficients at the end before it counts the sign changes, and it reports the number of roots equal to zero. For x cubed minus x, there is one root at zero, one sign change for the positive roots and one for the negative roots, so the three real roots are 0, 1 and minus 1.

Using the rule

The rule is a quick check before you look for roots with other methods. It helps you to decide where to search, for example if there are no positive roots you only need to try negative numbers with the rational root test. It does not find the roots, and it does not tell you if there are complex roots, but together with the degree it limits what is possible. The cubic equation calculator on this site finds the roots of a cubic.

Worked examples

Take f of x equal to x to the fourth minus 5x squared plus 4. The signs are plus, minus, plus, so there are 2 sign changes and 2 or 0 positive roots. Since only even powers appear, f of minus x equals f of x, so the number of negative roots has the same bound, 2 or 0. The polynomial factors as x squared minus 1, times x squared minus 4, so the roots are 1, minus 1, 2 and minus 2, which is the case with the largest numbers. Now take x to the fifth minus 3x cubed plus x squared minus 1. The signs are plus, minus, plus, minus, which gives 3 sign changes, so there are 3 or 1 positive roots.

Combining the rule with other tools

Use the rule together with the rational root test and with the graph of the polynomial. If the rule says that there are no negative roots, you can skip the negative candidates. If it says that there is exactly one positive root, you know that a sign change of the polynomial between two positive numbers means that the root is between them. These small facts save a lot of work when you solve a polynomial by hand.

Common mistakes

  • Counting zero coefficients. They are skipped.
  • Forgetting f of −x. It gives the negative roots.
  • Reading the count as exact. It is a maximum with an even difference.
  • Writing the terms in the wrong order. Use descending powers.

What next

Use this often? Add Descartes Ru to your Home screen.

Frequently asked questions

What does a Descartes rule of signs calculator do?

It applies the rule: the number of positive real roots of a polynomial is at most the number of sign changes in its coefficients, and differs from it by an even number.

How do you find the negative roots?

Apply the rule to f(−x). Its sign changes bound the number of negative roots in the same way.

What is the example on the page?

x³ + x² − x − 1 has 1 sign change, so exactly 1 positive root, and f(−x) has 2 sign changes, so 2 or 0 negative roots.

Are zero coefficients counted?

No. Zero coefficients are skipped, and a missing constant term means that 0 is a root.

Does it give the roots?

No. It limits how many positive and negative real roots are possible. To find the roots use a solver.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools