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.
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
- College Algebra 2e, §5.5 Zeros of Polynomial Functions (Rational Zero Theorem) — OpenStax
- College Algebra 2e, §5.4 Dividing Polynomials — OpenStax
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