Terminating and Recurring Decimals

Grab a calculator and try two innocent-looking sums. Type 1 \div 4 and the screen shows 0.25 — clean, finished, done. Now type 1 \div 3. You get 0.3333333\ldots, and the threes keep marching off the edge of the display and, if the screen were infinitely wide, they would never stop.

Same operation, wildly different behaviour. Every fraction, when you turn it into a decimal, does one of exactly two things: it either terminates (stops dead) or it recurs (settles into a block of digits that repeats forever). There is no third option and no messy in-between — and, best of all, there's a neat rule that lets you predict which just by glancing at the bottom of the fraction, before you divide a single digit.

Two ways a division can end

A fraction is really a division waiting to happen: to write a fraction as a decimal you divide the top by the bottom. As you divide, you carry a remainder from step to step, and the whole story hangs on what that remainder does.

Sometimes the remainder eventually hits zero. The division has nothing left to do, and you're left with a decimal that ends. That's a terminating decimal:

\tfrac{1}{4} = 0.25 \qquad \tfrac{3}{8} = 0.375 \qquad \tfrac{7}{20} = 0.35

Other times the remainder never reaches zero. Instead an old remainder shows up again — and once a remainder repeats, the digits after it are forced to repeat too, forever. That's a recurring decimal:

\tfrac{1}{3} = 0.333\ldots = 0.\dot{3} \qquad \tfrac{1}{6} = 0.1666\ldots = 0.1\dot{6}

We don't scrawl the repeating digits out for ever — that would take rather a long time. Instead we put a dot over the repeating digit. So 0.\dot{3} means "3 repeating". When a whole block of digits repeats, we dot the first and last digit of the block. A seventh is the showstopper — it repeats a block of six:

\tfrac{1}{7} = 0.142857\,142857\ldots = 0.\dot{1}4285\dot{7}

(Some books draw a bar over the block instead — 0.\overline{3} — which means exactly the same thing.)

Why the remainder is the whole story

Watch a stubborn division up close. Divide 1 by 3 the long way: 10 \div 3 is 3 remainder 1. Now you're dividing 10 by 3 again — the same sum you just did — so of course you get another 3, remainder 1, over and over. The remainder is trapped in a loop, so the digit 3 is trapped too.

Here's the deep bit: when you divide by n, the remainder is always one of the numbers 0, 1, 2, \ldots, n-1 — only n possibilities. So within at most n steps a remainder must either hit 0 (terminate) or repeat one it already used (recur). That's why the recurring block of \tfrac{1}{7} is at most six digits long — and it lands on exactly six. There simply isn't room for anything wilder to happen.

The prediction rule: look at the denominator

You shouldn't have to do the division to know how it ends. The rule falls straight out of the number ten. Our decimal places are tenths, hundredths, thousandths — all powers of 10. And 10 = 2 \times 5. So a decimal that terminates is secretly a fraction whose denominator is built only from 2s and 5s.

The recipe: put the fraction in its lowest terms, then check the prime factors of the denominator.

Run it across a handful of unit fractions — no dividing required, just factor the bottom:

Fraction Denominator's primes Verdict Decimal
\tfrac{1}{5} 5 terminates 0.2
\tfrac{3}{8} 2 \times 2 \times 2 terminates 0.375
\tfrac{1}{6} 2 \times 3 recurs (the 3!) 0.1\dot{6}
\tfrac{1}{7} 7 recurs 0.\dot{1}4285\dot{7}

Worked examples: predict, then check

Example 1 — \tfrac{3}{8}. Already in lowest terms. 8 = 2^3: only 2s. Prediction: terminates. Divide: 3.000 \div 8 = 0.375. It stops after three places. ✓

Example 2 — \tfrac{5}{6}. 6 = 2 \times 3: there's a 3 in there. Prediction: recurs. Divide: 5 \div 6 = 0.8333\ldots = 0.8\dot{3}. Notice the 8 at the front doesn't repeat — only the 3 does. ✓

Example 3 — \tfrac{7}{28}. Trap! Don't factor 28 yet — simplify first. \tfrac{7}{28} = \tfrac{1}{4}, and 4 = 2^2. Prediction: terminates. Indeed \tfrac{1}{4} = 0.25. Had you looked at the un-simplified 28 = 2^2 \times 7, that stray 7 would have fooled you into predicting "recurs". ✓

Example 4 — spotting the block in \tfrac{4}{11}. 11 is prime and isn't 2 or 5, so it recurs. Dividing gives 0.363636\ldots — the repeating block is 36, two digits long, written 0.\dot{3}\dot{6}.

Here's the beautiful flip side. We just said every fraction gives a decimal that either terminates or recurs — never a wild, patternless string of digits. So turn it around: a decimal that goes on forever without ever settling into a repeating block can't have come from any fraction at all.

Those are the irrational numbers — numbers like \pi = 3.14159265\ldots and \sqrt{2} = 1.41421356\ldots, whose digits never fall into a loop, no matter how far you compute them. They can never be written as one whole number over another. So this humble long-division observation — "does the remainder repeat?" — is quietly drawing the great dividing line of the number system: on one side the rationals (fractions, whose decimals stop or recur), on the other the irrationals (whose decimals run on for ever with no pattern). Not bad for something you spotted on a calculator.