Back to the blog

Calculators

Why some fractions repeat for ever as decimals.

Why 1/8 ends but 1/3 and 1/7 repeat for ever, how to tell from the bottom alone, and how long the repeating part can be.

By 3 min read

Three quarters plus five sixths equals one and seven twelfths, with bars cut into twelfths

Divide 1 by 8 and it stops at 0.125. Divide 1 by 7 and 142857 comes round for ever. The bottom of the fraction decides which.

Only twos and fives end.

Our decimals count in tens, and 10 is 2 × 5. A fraction's decimal ends only when its bottom, simplified, has no prime factors but 2 and 5: so 1/8, 3/20 and 7/40 end, while 1/3, 1/6 and 1/7 repeat.

Why the digits come round again.

In long division by 7, every remainder is one of 1 to 6. As soon as one comes back, the same digits follow again, so the repeat is at most six digits long. The page watches for a remainder it has already seen and marks the repeat with a line over it: 1/7 is 0.(142857).

Some repeats are long.

1/97 repeats 96 digits before coming round. The page finds them all exactly and says how many there are.

Further reading

Topics: fraction to decimal · repeating decimal · why does 1/3 repeat · terminating decimal · 1/7 as a decimal · fraction to decimal chart

A little less theory. A little more doing.

Try it on your own terms, with a free browser tool.

Try the tool