Descartes Rule of Signs Calculator - Count Real Roots

Try one

Type terms in any order: 3x^4, -2x, 7, 1/2x^3. Missing powers are treated as gaps, not as zeros with a sign.

P(x) = x5 + 4x43x2 + x6degree 5

Possible positive real roots

3 or 1

Possible negative real roots

2 or 0

3

Sign changes in P(x)

2

Sign changes in P(−x)

5

Roots in total

no

Root at x = 0

Pass 1 — sign changes in P(x)

Coefficients read from the highest power down. Gaps are skipped; only the 5 non-zero terms are compared.

+x5
+4x4
1
3x2
2
+x
3
6

3 sign changes → positive real roots: 3 or 1

Pass 2 — sign changes in P(x)

Every odd power flips sign; the even powers stay put.

P(x) = x5 + 4x43x2x6

x5
1
+4x4
2
3x2
x
6

2 sign changes → negative real roots: 2 or 0

4 possible root splits

Every row adds up to 5. Non-real roots arrive in conjugate pairs, so that column is always even.

Possible combinations of positive, negative and non-real roots
PositiveNegativeNon-realTotal
3205
3025
1225← the true one
1045

What the roots actually turn out to be

Descartes gives you the shortlist above. Solving the polynomial numerically picks the row: 1 positive, 2 negative, 2 non-real.

x = −3.73491 negative
x = −1.57943 negative
x = 1.14293 positive
x = 0.0857 ± 0.93945i conjugate pair

Roots are found numerically and rounded, so treat anything past 5 decimals as noise. The rule of signs never produces these values — it only tells you how many to expect on each side of zero.

Show the step-by-step working
  1. 1. Write the coefficients in descending order. 1, 4, 0, −3, 1, −6 — that is x5 down to the constant, zeros included.
  2. 2. Count sign changes going down the list. Skipping the gaps, the signs run + + − + −, which flips 3 times. Positive real roots: 3 or 1.
  3. 3. Replace x with x and count again. Odd powers change sign, even powers do not, giving − + − − − and 2 flips. Negative real roots: 2 or 0.
  4. 4. Subtract 2 until you hit 0 or 1. Each pair of roots that is not real is a complex conjugate pair, so the real count can only drop two at a time — never one.
  5. 5. Pair every option with every other. 2 × 2 combinations, minus any whose totals exceed the degree, leaves 4 possible splits. The leftover in each row is the number of non-real roots.

How to Use This Calculator

  1. Type your polynomial into Polynomial P(x) using ^ for powers — x^5 + 4x^4 - 3x^2 + x - 6. Terms can be in any order and the calculator combines duplicates for you.
  2. Check the echoed P(x) = … line matches what you meant, especially the degree. A mistyped ^ is the one error that silently changes the answer.
  3. Read the two headline boxes: Possible positive real roots and Possible negative real roots. When a box says “exactly”, the rule has given you a certainty, not a guess.
  4. Scroll to the sign strips to see where each flip happened — the numbered emerald markers are the sign changes being counted, and grey dots are neighbours that share a sign.
  5. Use the possibility table for homework answers. The highlighted row shows which combination is actually true, which is useful for checking your work but is not something Descartes’ rule can tell you on its own.
average • 0 ratings
Your rating
Tap a star to rate

Your rating helps improve Descartes Rule of Signs Calculator - Count Real Roots. We store only an anonymized vote (no personal data).

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Descartes Rule of Signs Calculator: How Many Roots Are Worth Hunting For

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Descartes Rule of Signs Calculator showing plus and minus coefficient tiles with arcs marking each sign change in a polynomial

A Descartes rule of signs calculator answers the question you should be asking before you factor anything: how many real roots am I even hunting for, and which side of zero are they on? The rule costs two passes down a list of coefficients. No division, no graphing, no guessing. And it routinely deletes half the work from a problem that looked like it needed twenty minutes.

Here is the honest limitation up front, because it decides how you use the answer. The rule gives you a bound with the right parity — “3 or 1 positive roots” — not a count. Sometimes that bound collapses to a single number and you have a proof. Sometimes it leaves you two options. Either way it costs almost nothing, which is why it belongs at the start of the problem rather than the end.

The Work This Saves You, in Actual Numbers

Take 2x³ − 5x² + 4x − 1. The rational root theorem hands you four candidates to test: ±1 and ±1/2. Four rounds of synthetic division, maybe five minutes with the arithmetic checked twice.

Now spend ten seconds on the rule first. Substitute −x and you get −2x³ − 5x² − 4x − 1 — every single term negative. Not one sign change. That is not “probably no negative roots”; it is a guarantee that this polynomial has zero negative roots. So −1 and −1/2 cannot possibly work, and your candidate list just halved before you divided anything. (For the record, the roots are 1, 1 and 0.5 — three positive roots, exactly as the forward pass predicts.)

The payoff scales badly in your favour. A degree-6 polynomial with a constant term of ±12 can generate a dozen rational candidates. Ruling out a whole side of zero is the single cheapest filter available, and it works on polynomials whose roots are irrational, where the rational root theorem gives you nothing at all.

Two Passes Down the Coefficient List

Write the coefficients in descending order of power. Ignore the zeros. Count how many times the sign flips between one non-zero coefficient and the next. That count is v, and the number of positive real roots is v, or v − 2, or v − 4, down to 0 or 1.

x⁵ + 4x⁴ + 0x³ − 3x² + x − 6  →  +  +  −  +  −  →  3 changes

Notice what happened to the missing x³ term. It contributed nothing. A gap is not a sign — it is an absence, and pretending it is a “+” is the most common way people inflate the count. Try x³ − 3x + 1 in the calculator above: three non-zero-looking terms, but the sign sequence is + − + and the answer is two changes, not three.

What Substituting −x Actually Does

For the negative side you run the same count on P(−x). You do not need to rewrite the polynomial from scratch — raising −x to an even power gives back the original term, and raising it to an odd power flips the sign. So the recipe is: keep even-power signs, flip odd-power signs.

For x⁵ + 4x⁴ − 3x² + x − 6 that gives −x⁵ + 4x⁴ − 3x² − x − 6, whose signs read − + − − − — two changes, so 2 or 0 negative roots.

Why does this work? Because a negative root of P is a positive root of P(−x). If r is negative and P(r) = 0, then −r is positive and P(−(−r)) = 0 too. You are running the same rule on a mirror image of the number line. That is the entire trick, and it explains why there is no separate “negative version” of the rule to memorise.

Why the Count Drops by Two and Never by One

Students accept “3 or 1” and then wonder why “3 or 2 or 1” is not allowed. The reason is conjugate pairs. When a polynomial has real coefficients, every non-real root a + bi is accompanied by abi. They arrive together and they leave together, so the number of non-real roots is always even — which forces the number of real roots to change in steps of two.

One thing that catches people out: the rule counts multiplicity, not distinct roots. Take x³ + x² − x − 1, which factors as (x − 1)(x + 1)². The forward pass gives one sign change, so there is exactly one positive root — correct, x = 1. The backward pass gives two changes, so 2 or 0 negative roots. There is only one distinct negative root here, x = −1, but it is a double root, so it counts twice and the “2” case is the true one. If you check your work by listing distinct roots you will conclude the rule failed. It did not; you counted differently than it does.

The Zero-Root Trap in Every Rule of Signs Table

Feed x⁴ − 5x³ + 6x² into most rule-of-signs tools and watch the table come out broken. The naive read is signs + − + giving v = 2, and P(−x) = x⁴ + 5x³ + 6x² with no changes at all giving w = 0. So the tool reports either 2 positive with 2 non-real, or 0 positive with 4 non-real.

Both rows are wrong. The roots are 0, 0, 2 and 3 — two positive roots and two roots sitting at the origin.

The rule counts strictly positive and strictly negative roots. Zero is neither, so it never appears in either column, and any table that forces positive + negative + non-real to equal the degree will misallocate it. The fix is to factor first: x⁴ − 5x³ + 6x² = x²(x² − 5x + 6). Record x = 0 as a double root, then apply the rule to the quadratic in the bracket. The calculator above does this automatically and shows you the factored form, which is why its table adds up.

This is not a rare edge case. Any polynomial with no constant term has this structure, and factoring out the common power of x is the first move in most textbook problems anyway.

Reading the Possibility Table Without Overclaiming

Combine the two passes and you get a small grid of possible splits. Here it is for x⁵ + 4x⁴ − 3x² + x − 6, where v = 3 and w = 2:

PositiveNegativeNon-realTotal
3205
3025
1225 ← the true one
1045

The roots are approximately 1.143, −1.579, −3.735 and the conjugate pair 0.086 ± 0.940i. Descartes cannot pick that row for you — it narrowed five roots down to four scenarios and stopped. Anything that claims more than that is overclaiming.

What the rule can do is give you certainty in the two cases below. Both are worth recognising on sight, because they turn a shortlist into a proof:

Sign changesWhat you knowCertainty
0No roots on that side. None.Proof
1Exactly one, and it is a simple rootProof
2Two or noneShortlist
3Three or one — so at least one definitely existsPartial proof

That last row is underrated. Any odd sign-change count guarantees at least one root on that side, which is often all you need to justify starting a bisection or a Newton iteration there.

Where a Descartes Rule of Signs Calculator Stops and the Next Tool Starts

Descartes is a filter, not a solver. Once you have the shortlist, the next move depends on what the two counts look like:

  • Either count is 0 — delete every candidate on that side before testing anything. This is the biggest single time saving the rule offers.
  • Both counts are small and the degree is 2 — skip the rule entirely and read the discriminant, which gives an exact answer for quadratics rather than a range.
  • You have found one root — deflate with synthetic division and run the rule again on the quotient. The counts shrink and often become decisive on the second pass.
  • The shortlist has one row — you already know the full split, so go straight to solving or graphing without exploratory testing.

Used that way, the rule earns its keep on almost every polynomial you meet. Pair it with a general polynomial calculator for the arithmetic and you have a workflow that goes from “degree five, no idea” to a factored answer without a single wasted division. The rule dates to La Géométrie in 1637 and was not fully proved for another century — a fair sign that something this cheap is doing more work than it looks like. The full statement and proof sketch are worth a read once the mechanics feel automatic.

Frequently Asked Questions

How do you count sign changes in a polynomial?

Write the coefficients in descending order of power, cross out any that are zero, then count how many times the sign flips from one surviving coefficient to the next. For x^5 + 4x^4 - 3x^2 + x - 6 the signs read + + - + -, which flips three times. That count is the maximum number of positive real roots, and the actual number is that count minus an even number.

Do missing terms count as sign changes?

No. A missing power is a gap, not a coefficient, so it is skipped entirely. In x^3 - 3x + 1 there is no x^2 term, so the sign sequence is + - + and there are two sign changes rather than three. Treating the gap as a plus is the most common way people overcount and end up with an impossible answer.

What does it mean if P(-x) has no sign changes?

It means the polynomial has no negative real roots at all, which is a proof rather than an estimate. For 2x^3 - 5x^2 + 4x - 1, substituting -x gives -2x^3 - 5x^2 - 4x - 1 with every term negative and zero sign changes, so you can delete -1 and -1/2 from the rational root candidate list without testing them. That single check halves the work on this problem.

Why does the rule say 3 or 1 instead of 3, 2 or 1?

Because non-real roots of a real polynomial always come in conjugate pairs. If 2 + 3i is a root then 2 - 3i is one too, so the number of non-real roots is always even and the number of real roots can only drop two at a time. That is why the possible counts are v, v-2, v-4 and so on down to 0 or 1, never every number in between.

Does Descartes' rule count zero as a positive or negative root?

Neither, and this trips up most quick calculations. For x^4 - 5x^3 + 6x^2 the roots are 0, 0, 2 and 3, so a table forcing positive plus negative plus non-real to equal 4 will always be wrong. Factor out the common power of x first, record x = 0 as a root with that multiplicity, then apply the rule to the remaining polynomial x^2 - 5x + 6.

What is the difference between Descartes' rule of signs and the rational root theorem?

The rule of signs tells you how many real roots exist on each side of zero but never which numbers they are. The rational root theorem lists specific candidate values but only finds roots that happen to be rational. They pair up well: run the rule first to rule out a whole side of zero, then test only the surviving candidates with synthetic division.

Can Descartes' rule of signs give an exact number of real roots?

Yes, in two cases. Zero sign changes proves there are no roots on that side, and exactly one sign change proves there is exactly one simple root there. Any other count leaves a shortlist, though an odd count still guarantees at least one root exists, which is enough to justify starting a bisection or Newton search on that interval.