Descartes Rule of Signs Calculator
- Descartes' rule of signs counts how often the coefficients change sign, ignoring zeros: the sequence 1, -6, 11, -6 changes sign 3 times.
- So the number of positive real roots is 3 or 1 - the count itself, or less by an even number.
- For the negative roots, f(-x) has coefficients 1, 6, 11, 6 with 0 sign changes, giving 0 negative real roots.
- A cubic has three roots in total, so at least 0 of them must be nonreal (complex) - the rule bounds the real roots before any solving begins.
This Descartes rule of signs calculator counts the sign changes in a polynomial's coefficients and tells you how many positive and negative real roots the polynomial can have. The rule works like this: the number of positive real roots equals the number of sign changes, or that number less by an even number, and zero coefficients are skipped. A single sign change pins the count exactly, so 1 change means exactly 1 positive root and 0 changes means none. For example, x^3 - 6x^2 + 11x - 6 has 3 sign changes, so it has 3 or 1 positive roots, and in fact it has 3 (1, 2 and 3); f(-x) has no sign changes, so there are no negative roots. Similarly, 2x^3 + 3x^2 - 8x + 3 has 2 sign changes, giving 2 or 0 positive roots, while f(-x) has 1 sign change, giving exactly 1 negative root.
Descartes' rule of signs is the accepted standard for this kind of calculation because it gives a guaranteed bound on the number of positive and negative real roots from the coefficients alone, with no guessing. It also accounts for what is left over: for a cubic, whatever the positive and negative maxima do not use must be nonreal roots, computed as 3 minus the positive maximum minus the negative maximum, which is 0 in all three examples above. The rule handles skipped zero coefficients cleanly, as in x^3 - 7x + 6, which has 2 sign changes (2 or 0 positive roots) and exactly 1 negative root. This page shows the formula, step-by-step workings, worked examples and sources so you can check every count yourself.
Worked examples
x^3 - 6x^2 + 11x - 6
(1 · -6 · 11 · -6)
| Possible positive real roots | 3 or 1 |
| Possible negative real roots | 0 |
| Sign changes in f(x) | 3 |
| Minimum number of nonreal roots | 0 |
2x^3 + 3x^2 - 8x + 3
(2 · 3 · -8 · 3)
| Possible positive real roots | 2 or 0 |
| Possible negative real roots | 1 |
| Sign changes in f(x) | 2 |
| Minimum number of nonreal roots | 0 |
x^3 - 7x + 6 (zero coefficient)
(1 · 0 · -7 · 6)
| Possible positive real roots | 2 or 0 |
| Possible negative real roots | 1 |
| Sign changes in f(x) | 2 |
| Minimum number of nonreal roots | 0 |
Counting sign changes
Counting sign changes is the heart of what a descartes rule of signs calculator does, and the best way to see how it works is to read a few coefficient sequences from left to right. The rule says the number of positive real roots of a polynomial equals the number of sign changes in its coefficients, or less by an even number, and zero coefficients are skipped entirely. Start with x^3 - 6x^2 + 11x - 6. The coefficients in order are 1, -6, 11, -6. Going left to right: 1 to -6 is a change, -6 to 11 is a change, and 11 to -6 is a change. That is 3 sign changes, so the polynomial has 3 or 1 positive roots. Here it actually has 3, namely 1, 2 and 3. To check the negative side, evaluate f(-x), which gives -x^3 - 6x^2 - 11x - 6; its coefficients are all negative, so there are no sign changes and no negative roots.
Now take 2x^3 + 3x^2 - 8x + 3. The coefficients are 2, 3, -8, 3. From 2 to 3 there is no change, 3 to -8 is one change, and -8 to 3 is a second change. That gives 2 sign changes, so the count of positive roots is 2 or 0. For negatives, f(-x) is -2x^3 + 3x^2 + 8x + 3, whose coefficients run -, +, +, +: just 1 sign change. A single sign change pins the count exactly, so this polynomial has exactly 1 negative root. The third example is the one that shows why zeros get skipped: x^3 - 7x + 6. Written with every power of x, it is x^3 + 0x^2 - 7x + 6, so the coefficient list is 1, 0, -7, 6. The zero for x^2 is not counted as a sign change at all; you simply pass over it. Reading the nonzero coefficients, 1 to -7 is a change and -7 to 6 is a change, giving 2 sign changes and therefore 2 or 0 positive roots. Its f(-x) is -x^3 + 7x + 6, with coefficients -, +, +, which is exactly 1 sign change and so exactly 1 negative root.
Notice how the zero coefficient in x^3 - 7x + 6 could mislead you if you counted it. Treating the sequence as 1, 0, -7, 6 and comparing every adjacent pair would suggest extra changes that do not exist. The rule is about the signs of the actual nonzero terms, which is why the calculator skips zeros before it starts counting. Once the zeros are out of the way, the same left-to-right comparison applies to every polynomial.
The two extremes also tell you something about the roots that are left over. For a cubic, whatever the positive and negative maxima leave over must be nonreal roots: 3 minus the positive maximum minus the negative maximum. In all three examples that leftover is 0, so each cubic accounts for all three of its roots among the real numbers, consistent with the counts above. That is the full picture a descartes rule of signs calculator gives you: a short list of possible positive counts, a short list of possible negative counts, and the even-number gaps that separate them.
The 'or less by an even number' clause
The phrase 'or less by an even number' is the part of Descartes' rule of signs that people most often misread. It does not mean the count is vague or that the rule failed. It means the true number of positive real roots is either the number of sign changes or that number minus 2, minus 4, and so on down to 1 or 0. A descartes rule of signs calculator reports this as a short list of possibilities, such as '3 or 1' or '2 or 0', rather than a single value. The reason the count drops in steps of two is that roots that are not real come in conjugate pairs: if a polynomial has a nonreal root a + bi, it must also have a - bi. Every nonreal pair removed from the real count takes away two roots at once, so the total can only fall by an even number.
A worked case makes the pairing concrete. The polynomial x^3 - 6x^2 + 11x - 6 has 3 sign changes, so it has 3 or 1 positive roots. In fact it has 3, namely 1, 2 and 3. Because the count started at 3 and dropped by twos, the only alternative was 1, which would have meant one positive root and one conjugate pair of nonreal roots. Checking f(-x) shows no sign changes, so there are no negative roots at all. The second example, 2x^3 + 3x^2 - 8x + 3, has 2 sign changes, giving 2 or 0 positive roots, while f(-x) has 1 sign change, giving exactly 1 negative root. That single sign change is the key: when a count is 1, there is no even number to subtract, so the answer is pinned exactly. Likewise, 0 sign changes means none.
The third example shows what happens when a coefficient is zero. The polynomial x^3 - 7x + 6 skips its zero x^2 coefficient, and Descartes' rule skips zero coefficients when counting sign changes. It has 2 sign changes, so 2 or 0 positive roots, and exactly 1 negative root. Here the '2 or 0' promise is genuinely open: the rule alone does not tell you which case holds, only that the positive roots number two or none.
For a cubic, the leftover roots must be nonreal, and they must come in pairs. Subtract the largest possible positive count and the largest possible negative count from the degree: 3 minus the positive maximum minus the negative maximum. In all three examples this leaves 0, so every root is real. If the subtraction had left 2, the polynomial would have one conjugate pair of nonreal roots. That is the whole meaning of 'or less by an even number': each drop of two is one conjugate pair stepping in to replace two real roots.
Negative roots via f(-x)
To count negative real roots, apply the same rule to f(-x). Substituting -x for x flips the sign of every odd-power term while leaving every even-power term unchanged. In a cubic, that means the x^3 and x terms change sign and the x^2 term does not, so the coefficient pattern you test is the one produced by that substitution, not the original. A descartes rule of signs calculator performs this substitution for you and then counts sign changes in the new coefficient list, skipping any zeros.
Take x^3 - 6x^2 + 11x - 6. Replacing x with -x gives -x^3 - 6x^2 - 11x - 6. Every coefficient is now negative, so there are no sign changes, and the rule says there are no negative roots. That matches the factorization: the roots are 1, 2 and 3, all positive.
Now try 2x^3 + 3x^2 - 8x + 3. The substitution yields -2x^3 + 3x^2 + 8x + 3. Reading the signs in order gives minus, plus, plus, plus: exactly one sign change. A single sign change pins the count exactly, so this polynomial has exactly 1 negative root. The same logic applies in reverse for positives: 1 change means exactly 1 positive root, and 0 changes means none.
The third example, x^3 - 7x + 6, has no x^2 term. Its coefficients are 1, 0, -7 and 6, and the zero is skipped when counting. Substituting -x gives -x^3 + 7x + 6, whose signs are minus, plus, plus: one sign change, so exactly 1 negative root. Skipping the zero coefficient is essential here; counting it as a sign would give a misleading answer.
For a cubic, the positive and negative maxima together cannot exceed the degree. Whatever is left over must be nonreal roots, given by 3 minus the positive maximum minus the negative maximum. In all three examples that remainder is 0, so every root is real. The negative-root counts are 0, 1 and 1 respectively, and each one is confirmed exactly because the substituted polynomial shows either zero or one sign change.
Using the rule before solving
Descartes' rule of signs is most useful before you start solving, not after. It tells you how many positive and negative real roots a polynomial can have, which narrows the search before you test a single candidate. A descartes rule of signs calculator applies the rule directly to the coefficients you enter, so you get those counts as a quick bound rather than a guess. Think of it as a first pass that pairs with the rational root theorem: the rule bounds the counts, and the theorem finds the values.
The rule itself is simple. For a polynomial written in descending powers, count the sign changes between consecutive nonzero coefficients, skipping any zero coefficients. The number of positive real roots equals that count, or is less than it by an even number. To get the negative roots, apply the same count to f(-x). A single sign change pins the count exactly: 1 change means exactly 1 positive root, and 0 changes means none. When the count is higher, the rule gives you a short list of possibilities instead of one number.
A worked example shows how the bound works. The polynomial x^3 - 6x^2 + 11x - 6 has 3 sign changes, so it has 3 or 1 positive roots — in fact 3 (1, 2 and 3). Its f(-x) has no sign changes, so there are no negative roots. Now try 2x^3 + 3x^2 - 8x + 3: it has 2 sign changes, giving 2 or 0 positive roots, and f(-x) has 1 sign change, giving exactly 1 negative root. And x^3 - 7x + 6 skips its zero x^2 coefficient, then has 2 sign changes — 2 or 0 positive roots — and exactly 1 negative root.
For a cubic, the leftover roots must be nonreal. Subtract the positive maximum and the negative maximum from 3: 3 - (positive max) - (negative max). In all three examples above, that leaves 0, so every root is real. When the subtraction leaves 2, the polynomial has a pair of nonreal roots, and you can stop looking for more real candidates than the rule allows.
Use the rule as a pre-solve bound. Count the sign changes to set the maximum number of positive roots, count them again for f(-x) to set the negative maximum, and note whether a single change fixes the count exactly. Then hand the narrowed possibilities to the rational root theorem and test only the candidates that fit. The rule will not give you the root values, but it keeps you from chasing roots that cannot exist.
FAQs
What is Descartes' rule of signs?
Descartes' rule of signs counts the sign changes between consecutive nonzero coefficients of a polynomial. The number of positive real roots equals that count, or is less than it by an even number. To count negative real roots, apply the same sign-change count to f(-x). The rule gives possible counts, not exact ones, unless the count is 0 or 1.
How many positive roots does x^3 - 6x^2 + 11x - 6 have?
The coefficients are +1, -6, +11, -6, which gives 3 sign changes. By the rule, the polynomial has 3 or 1 positive real roots. The true count is 3. So the rule's maximum, 3, matches the actual number of positive roots here, and the alternative of 1 does not apply.
What do I do with a zero coefficient?
Skip it. A missing term, such as the x^2 term in x^3 - 7x + 6, is simply ignored when counting sign changes. The remaining coefficients are +1, -7, +6, and their signs are +, -, +, which gives 2 sign changes. So the rule reports 2 or 0 positive real roots for that polynomial.
How do I count negative roots?
Apply the rule to f(-x). For 2x^3 + 3x^2 - 8x + 3, substituting -x gives -2x^3 + 3x^2 + 8x + 3, whose signs are -, +, +, +. That is 1 sign change, so the polynomial has exactly 1 negative root. Because the count is 1, the rule gives an exact answer here.
When does the rule give an exact answer?
When the sign-change count is 0 or 1. A count of 1 sign change means exactly 1 root of that sign, since subtracting an even number would go below zero. This happens with the negative roots in two of the examples, where the count is 1. For larger counts, the rule lists possibilities rather than one exact number.
Can the rule tell me about complex roots?
Indirectly. A cubic has 3 roots in total, so 3 minus the maximum real counts gives the minimum number of nonreal roots. In these examples that minimum is 0. The rule itself does not count complex roots directly; it only limits how many roots can be real, which bounds the nonreal ones from below.