← All articles
mathnumbersfractionsarithmeticSeptember 17, 20264 min read

What Is a Repeating Decimal? When Division Never Quite Finishes

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

Divide one by three and the digits never stop. Divide one by four and they stop after two places. Nothing about the fractions themselves explains the difference, and the whole answer lies in the number ten and which numbers divide into it, which means the behaviour is a fact about our notation rather than about the numbers.

Which fractions terminate

A fraction in lowest terms produces a terminating decimal exactly when its denominator has no prime factors other than two and five. That is because a terminating decimal is a fraction whose denominator is a power of ten, and ten factors into two times five, so any denominator built only from those primes can be scaled into a power of ten while any other cannot. One half, one quarter, one fifth, one eighth, one twentieth all terminate. One third, one seventh, one ninth, one eleventh do not, and neither does one sixth, because although it contains a two it also contains a three. The consequence is that the distinction has nothing to do with the fractions and everything to do with base ten, and in base twelve, whose factors include two and three, a third would terminate neatly while a fifth would not, which is one of the arguments duodecimal enthusiasts make. Every fraction of whole numbers either terminates or repeats, and nothing else can happen, which is what separates rational numbers from irrational ones.

The structure of the repeat

The repeating part behaves in ways that are entirely predictable once the mechanism is understood:

  • The repeat length can never exceed one less than the denominator, because long division has only that many possible remainders before one must recur and the cycle restarts
  • One seventh repeats with period six, the maximum for seven, giving the sequence 142857 whose cyclic behaviour under multiplication has fascinated people for centuries
  • Denominators achieving the maximum period are called full reptend primes, and whether infinitely many exist is an unsolved problem connected to a conjecture about primitive roots
  • A denominator with factors of two or five alongside others produces a non-repeating prefix followed by a repeating cycle
  • Multiplying the fraction by ten shifts the decimal point without changing the cycle, which is the basis of the standard method for converting a repeat back into a fraction
  • Any repeating decimal can be written as a fraction whose denominator consists of nines, with one nine per digit in the repeat, so a two-digit repeat is that number over ninety-nine

Why nine recurring equals one

The equality of zero point nine recurring with one is the most argued-about fact in elementary mathematics and it is true, not an approximation. Several demonstrations exist. One third is zero point three recurring, and multiplying both sides by three gives one equals zero point nine recurring. Alternatively, let the value be x, multiply by ten to get ten x as nine point nine recurring, subtract the original to get nine x equals nine, so x equals one. More rigorously, an infinite decimal is defined as the limit of the sequence of its truncations, and that sequence converges to one, with the difference becoming smaller than any positive number you care to name. The common objection is that the digits are always short of one by something, and the answer is that there is no last digit, so there is no point at which anything remains. The resistance is genuinely instructive, because it comes from treating an infinite decimal as a process that runs rather than as a number defined by a limit, which is exactly the conceptual step that makes calculus possible.

Where it matters practically

Computers store numbers in binary, whose only prime factor is two, so a fraction terminates in binary only when its denominator is a power of two. That means one tenth, which terminates perfectly in decimal, repeats forever in binary and must be stored approximately, which is why adding zero point one to zero point two in most programming languages produces a result slightly different from zero point three. That is not a bug and not a rounding error in the usual sense but a direct consequence of the same mathematics in a different base, and it has caused real failures, including a documented missile defence system whose clock drifted because a repeating binary fraction accumulated error over days of continuous operation. The standard remedies are to use decimal arithmetic types where exact decimal behaviour matters, which is why financial software does not use ordinary floating point, or to work in integer units such as pence rather than fractional pounds, or to compare values within a tolerance rather than for exact equality.

The takeaway

A fraction terminates exactly when its denominator is built only from twos and fives, because ten is two times five, so the behaviour describes our notation rather than the numbers. Repeat length cannot exceed one less than the denominator, since long division has only that many remainders. Zero point nine recurring equals one, defined as the limit of its truncations. In binary only halves terminate, which is why a tenth is stored approximately.

Practise this

Questions from Fractions and Decimals

Reading about something is not the same as being able to recall it. These are real questions from the Fractions and Decimals unit in our Math track, answers and explanations included. The unit has 120 in total across 21 steps.

  • Build the sentenceLevel 3

    1. Build a true sentence about equivalent fractions.

    Answer: Equivalent fractions have the same value

    Equivalent fractions are worth the same even if they look different.

  • Fact or fibLevel 2

    2. 50% is the same as one half.

    Answer: True

    50 out of 100 is exactly one half.

  • Match the pairsLevel 3

    3. Match each sum to its total.

    Answer: 1/6 + 2/6 = 3/6; 1/8 + 3/8 = 4/8; 2/9 + 4/9 = 6/9

    Add the tops over the same denominator for each.