# What is the rational zero theorem?

Lists every possible rational zero ±p/q of a polynomial by the rational zero theorem, then tests each one exactly to find the actual rational zeros.

- Page: https://www.acalculator.org/math/rational-zero-theorem-calculator
- JSON spec: https://www.acalculator.org/math/rational-zero-theorem-calculator.json
- Version: cd3ebf4ca501

## Default answer

Example with the default inputs (Polynomial f(x) 2x^3 + x^2 - 4x + 1): Rational zeros of f: 1.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Polynomial f(x) | A polynomial in one letter, such as 2x^3 + x^2 − 4x + 1. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| zeros | Rational zeros | The candidates (and 0) that make f(x) = 0, smallest first. |
| candidates | Possible rational zeros | Every ±p/q with p a factor of the constant term and q a factor of the leading coefficient. |
| count | Number of candidates | How many possible rational zeros there are. |
| p | Factors p of the constant term | The positive factors of the constant term. |
| q | Factors q of the leading coefficient | The positive factors of the leading coefficient. |
| polynomial | Polynomial used | f(x) multiplied out, with fractions cleared and any factor of x divided out. |
| steps | Steps | The factors, the candidates, and the tests. |

## Method

Clear fractions, divide out the lowest power of x (0 is then a zero), list ±p/q with p dividing the constant term and q the leading coefficient, and test each exactly.

## Assumptions

- f is a polynomial in one letter with whole powers 0 to 20; fractions are cleared by multiplying by the least common multiple of the bottoms.
- The constant term and leading coefficient (after clearing) are each at most 1,000,000 in size.

## Worked examples

1. f = 2x^3 + x^2 - 4x + 1 gives zeros = 1, candidates = ±1, ±1/2, count = 4, steps = Polynomial: 2x³ + x² − 4x + 1; Factors p of the constant term 1: 1; Factors q of the leading coefficient 2: 1, 2; Possible rational zeros ±p/q: ±1, ±1/2; Test each: f(r) = 0 for r = 1. Source: OpenStax, Algebra and Trigonometry 2e, §5.5 Zeros of Polynomial Functions, Example 4 (f(x) = 2x³ + x² − 4x + 1: candidates ±1 and ±1/2; 1 is the only rational zero), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-5-zeros-of-polynomial-functions.
2. f = 2x^4 - 5x^3 + x^2 - 4 gives candidates = ±1, ±2, ±4, ±1/2, count = 8, p = 1, 2, 4, q = 1, 2, zeros = None: f has no rational zeros. Source: OpenStax, Algebra and Trigonometry 2e, §5.5 Zeros of Polynomial Functions, Example 3 (f(x) = 2x⁴ − 5x³ + x² − 4: possible rational zeros ±1, ±2, ±4, ±1/2), https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-5-zeros-of-polynomial-functions.
3. f = -x^3 + 3x^2 + 4x - 12 gives zeros = −2, 2, 3, candidates = ±1, ±2, ±3, ±4, ±6, ±12, count = 12.
4. f = x^4/2 - x^2/2 gives zeros = −1, 0, 1, polynomial = x^2 - 1, steps = Multiply by 2 to clear fractions; Divide out x²: x = 0 is a zero; Polynomial: x² − 1; Factors p of the constant term −1: 1; Factors q of the leading coefficient 1: 1; Possible rational zeros ±p/q: ±1; Test each: f(r) = 0 for r = −1, 0, 1.

## FAQ

### What does the rational zero theorem say?

If a polynomial has whole-number coefficients, every rational zero, written p/q in lowest terms, has p a factor of the constant term and q a factor of the leading coefficient. So the list of ±p/q holds every rational zero there can be.

### How do I list the possible rational zeros?

List the factors p of the constant term and the factors q of the leading coefficient, then form every ±p/q and drop repeats. For 2x^4 − 5x^3 + x^2 − 4: p is 1, 2 or 4; q is 1 or 2; the candidates are ±1, ±2, ±4, ±1/2.

### Does every candidate have to be a zero?

No. The theorem only narrows the search. Test each candidate: put it into f(x), or divide by synthetic division, and keep those that give 0. For 2x^3 + x^2 − 4x + 1 the candidates are ±1 and ±1/2, and only 1 is a zero.

### What if the polynomial has fractions?

Multiply by the least common multiple of the denominators first. The zeros do not change. x^3/2 − x/3 + 1 becomes 3x^3 − 2x + 6.

### What if the constant term is 0?

Then x = 0 is a zero. Divide out the lowest power of x, and use the theorem on what is left. x^4 − x^2 = x^2(x^2 − 1), so the zeros are −1, 0 and 1.

### Can a polynomial have no rational zeros?

Yes. Its zeros may be irrational or complex. x^2 − 2 has candidates ±1 and ±2, none of which give 0; its zeros are ±√2.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §5.5 Zeros of Polynomial Functions (the Rational Zero Theorem: for f(x) with integer coefficients, every rational zero has the form p/q with p a factor of a₀ and q a factor of aₙ; Example 3: 2x⁴ − 5x³ + x² − 4 has possible zeros ±1, ±2, ±4, ±1/2; Example 4: 2x³ + x² − 4x + 1 has possible zeros ±1 and ±1/2, and 1 is the only rational zero). https://openstax.org/books/algebra-and-trigonometry-2e/pages/5-5-zeros-of-polynomial-functions (retrieved 2026-10-05)
