Ma · Mathematics

How to Tell Whether a Fraction Has a Repeating Decimal

Published By the 9to5Science editorial team

At a glance

  1. 1. Reduce the fraction

    Write the fraction in lowest terms so common factors do not distort the denominator test.

  2. 2. Factor the denominator

    Find the prime factors of the reduced denominator.

  3. 3. Check for other primes

    The decimal terminates if every factor is 2 or 5; any other prime means it eventually repeats.

  4. 4. Locate the repeating part

    Use long division to find the digits and see whether repetition starts immediately or after a nonrepeating prefix.

To determine whether a fraction has a repeating decimal, you do not need to carry out long division indefinitely. Reduce the fraction first, then inspect the prime factors of its denominator.

The key test is simple: a reduced fraction has a terminating decimal if its denominator is made up only of factors 2 and 5. If any other prime appears, the decimal is nonterminating and eventually repeats. The repetition may start after a few digits rather than immediately.

The denominator test

Write the fraction in lowest terms as a/ba/b, where aa and bb are integers, b>0b>0, and the only common positive divisor of aa and bb is 1. Factor the denominator:

  • If b=2m5nb=2^m5^n for nonnegative integers mm and nn, the decimal terminates.
  • If bb has any prime factor other than 2 or 5, the decimal eventually repeats.

For example, a denominator of 40 factors as 23⋅52^3\cdot5, so a reduced fraction with denominator 40 terminates. A denominator of 12 factors as 22⋅32^2\cdot3, so a reduced fraction with denominator 12 repeats.

This test concerns the denominator after reducing. A denominator before reduction may contain extra factors that cancel with the numerator.

Why factors 2 and 5 matter

A terminating decimal can be written with some finite number of digits after the decimal point. A decimal with kk digits after the point is an integer divided by 10k10^k, and 10k=2k5k10^k=2^k5^k. So, after reducing such a fraction, its denominator can contain only the primes 2 and 5.

The converse also holds. Suppose the reduced denominator is b=2m5nb=2^m5^n. Choose kk at least as large as both mm and nn. Then bb divides 10k10^k, so you can rewrite a/ba/b with denominator 10k10^k. That is a finite decimal representation.

If another prime factor remains in the reduced denominator, no power of 10 can clear the denominator, because powers of 10 contain only 2s and 5s. The decimal cannot terminate.

Worked examples

Example 1: Does 7/127/12 terminate?

The fraction is already reduced. Factor its denominator:

12=22⋅3.12=2^2\cdot3.

The denominator includes 3, so the decimal repeats. Long division confirms the form:

712=0.58333…=0.583‾.\frac{7}{12}=0.58333\ldots=0.58\overline{3}.

The 3 repeats, but the first two decimal digits, 58, do not belong to the repeating block. This is an eventually repeating decimal, sometimes called a mixed recurring decimal.

Example 2: Does 3/403/40 terminate?

The fraction is reduced, and

40=23⋅5.40=2^3\cdot5.

There are no other prime factors, so the decimal terminates. In fact,

340=751000=0.075.\frac{3}{40}=\frac{75}{1000}=0.075.

Example 3: Reduce before checking.

Consider 6/156/15. Its original denominator, 15, contains a factor of 3, but the fraction reduces:

615=25=0.4.\frac{6}{15}=\frac{2}{5}=0.4.

The reduced denominator is 5, so the decimal terminates. Checking the unreduced denominator would give the wrong answer.

Repeating immediately or after a prefix?

The denominator test tells you whether the decimal terminates, but it does not by itself tell you where repetition starts. For that, long division provides a useful explanation.

At each step of long division by bb, the remainder is one of 0,1,2,…,b−10,1,2,\ldots,b-1. If a remainder becomes 0, the decimal terminates. If it does not, some remainder must eventually occur a second time, since there are only finitely many possible remainders. From the repeated remainder onward, the same division steps produce the same digits, so the digits repeat.

For a noninteger reduced fraction, the decimal repeats from its first digit after the decimal point exactly when the denominator is relatively prime to 10—that is, when it has no factors 2 or 5. For example, 1/7=0.142857‾1/7=0.\overline{142857} repeats immediately. If the denominator includes 2s or 5s as well as another prime, the decimal generally has an initial nonrepeating part before its repeating block, as 7/127/12 does.

Common mistakes

  • Forgetting to reduce first: Simplify the fraction before factoring the denominator. Canceled factors do not affect the decimal.
  • Treating every nonterminating decimal as nonrepeating: A rational number such as a fraction always has a decimal expansion that either terminates or eventually repeats. It cannot be nonterminating without eventually repeating.
  • Expecting the repeating block to start right away: Some fractions have a finite prefix before the cycle begins. The denominator test detects eventual repetition, not necessarily immediate repetition.
  • Confusing displayed digits with the exact value: A rounded decimal such as 0.58 is not equal to 7/127/12. The exact value is 0.583‾0.58\overline{3}.

Use the reduced denominator as a quick decision rule: only 2s and 5s means the decimal ends; any other prime factor means the decimal eventually cycles.

References

  1. Elementary Number Theory, 7th Edition — David M. Burton

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.