Rational Root Theorem Calculator

List every possible rational root p/q of a polynomial with integer coefficients, test each one exactly, and factor out the roots that work.

Whole numbers only. 2, −3, −11, 6 means 2x³ − 3x² − 11x + 6. Use 0 for a missing power. Up to degree 20, each between −1,000,000 and 1,000,000. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.

Results

Rational roots
x = −2, x = 1/2, x = 3
Factored form
2x³ − 3x² − 11x + 6 = (x + 2)(2x − 1)(x − 3)
Possible rational roots ±p/q
±1/2, ±1, ±3/2, ±2, ±3, ±6
p divides the constant term 6; q divides the leading coefficient 2.
Number of candidates
12
Testing each candidate (exact values)
P(−6) = −468 P(−3) = −42 P(−2) = 0 ✓ root P(−3/2) = 9 P(−1) = 12 P(−1/2) = 21/2 P(1/2) = 0 ✓ root P(1) = −6 P(3/2) = −21/2 P(2) = −12 P(3) = 0 ✓ root P(6) = 264

How it’s calculated

The rational root (rational zero) theorem: if a polynomial with whole-number coefficients has a rational root p/q in lowest terms, then p divides the constant term and q divides the leading coefficient. That gives a short list of candidates to test.

aₙxⁿ + … + a₁x + a₀ = 0 possible rational roots = ± (factor of a₀) ÷ (factor of aₙ)

Each candidate is tested exactly with whole-number arithmetic (no rounding), so a root is only reported when the polynomial is exactly 0 there. Every root found is divided out (by the factor theorem), which also reveals repeated roots.

Example: 2x³ − 3x² − 11x + 6. Factors of 6 are 1, 2, 3, 6 and factors of 2 are 1, 2, so the candidates are ±1/2, ±1, ±3/2, ±2, ±3, ±6. Testing gives P(−2) = 0, P(1/2) = 0 and P(3) = 0, so 2x³ − 3x² − 11x + 6 = (x + 2)(2x − 1)(x − 3).

If the constant term is 0, x is a factor: it is taken out first and 0 is reported as a root.

Frequently asked questions

Does the theorem find all the roots?

No, only rational ones. A polynomial such as x² − 2 has roots ±√2, which are irrational, so none of its candidates ±1, ±2 work. Whatever is left after removing the rational roots is shown as the leftover factor.

What if the coefficients are fractions or decimals?

Multiply every coefficient by a common denominator first to make them whole numbers; the roots do not change. For example ½x² − 2 has the same roots as x² − 4.

How are repeated roots handled?

After a root is found, the polynomial is divided by its factor and the root is tested again. 4x³ − 3x − 1 = (x − 1)(2x + 1)², so −1/2 is a root of multiplicity 2.

Why is there a size limit?

The number of candidates grows with the number of divisors of the first and last coefficients. Keeping them under a million keeps the test list short enough to check in a moment.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator