math.wiki
Number › Rational numbers › Terminating and repeating decimals
Open on the map
Math 7 · 7.NS.A.2D · 8.NS.A.1

Terminating and repeating decimals

Dividing 7 by 12 never comes out even, and the digits run on forever. How can such a decimal be written down exactly, compared with others, and read back as a fraction?

Where you are 10 in Rational numbers

Why this exists

Dividing one whole number by another sometimes stops: 11 \div 16 = 0.6875. Sometimes it does not. Divide 7 by 12 and the quotient begins 0.58333, and however long you carry on, another 3 comes. A decimal that never ends cannot be written out in full, and writing 0.58333 alone names a different number, a terminating one that is only close to \displaystyle \frac{7}{12}.

Two things are needed: a way to write a never-ending decimal exactly in a few symbols, and a way to work with it once it is written down: compare it, round it, add it, and turn it back into the fraction it came from. This lesson does both, in two parts.

  • Part 1 turns fractions into decimals by division, sorts the results into decimals that stop and decimals that repeat, and introduces the bar that marks the repeating digits.
  • Part 2 puts the bar to use: reading it back out to compare and round, and reading it back into a fraction.

Definition

To write a fraction \displaystyle \frac{a}{b} as a decimal, divide a by b (Converting between fractions and decimals), carrying the long division past the decimal point by writing zeros after it, as in Dividing decimals.

A decimal is terminating if from some place on every digit is 0, so it can be written out in full with a last digit. Both 0.6875 and -3.04 terminate, and so does every integer.

A decimal that does not terminate is repeating if, from some place after the point, one block of digits repeats forever with nothing else after it. That block is the repeating block, and its length is the number of digits in it.

Bar notation. A bar drawn over digits means that block repeats forever. One copy of the block is written under the bar, starting at the place where the repetition starts; any digits before that are written normally.

\begin{aligned} 0.58333\ldots &= 0.58\overline{3} \\ 3.405405405\ldots &= 3.\overline{405} \\ 2.0454545\ldots &= 2.0\overline{45} \end{aligned}

When the block starts straight after the point, as in 3.\overline{405}, the decimal is purely repeating. In 0.58\overline{3} the digits 5 and 8 come before the block and are not part of it.

The same digits can be barred in more than one way: 0.58\overline{3}, 0.58\overline{33} and 0.583\overline{3} all describe 0.58333\ldots. The standard form uses the shortest block, starting as early as possible, and answers are given in that form. The bar only ever sits over digits after the point.

Intuition

Here is the long division of 7 by 12. Since 12 does not go into 7, the decimal starts 0. and the 7 becomes 70 tenths. Each row divides, writes one digit, and passes its remainder, times ten, to the next row.

StepDivideDigitRemainder
170 \div 12510
2100 \div 1284
340 \div 1234
440 \div 1234

What a row does depends only on the remainder handed to it. Step 3 leaves the remainder 4, the same as step 2, so step 4 is step 3 over again, and so is every step after it. The digits made after the remainder 4 first appeared, here just the 3, repeat forever, and the digits made before it, 5 and 8, do not. So

\frac{7}{12} = 0.58\overline{3}

That every fraction’s division must end up either stopping or going round like this is proved in What makes a number rational. The point here is where the bar goes: when a remainder comes back, the block is the digits made since it first appeared.

Figure 1 shows the same thing on the number line. A decimal is an address: the first digit says which tenth the point is in, the next digit which hundredth inside that tenth, and so on. A terminating decimal’s address ends because the point lands exactly on a mark. The point \displaystyle \frac{7}{12} never does.

0 1 0.5 0.6
\displaystyle \frac{7}{12}
0.5 0.6 0.58 0.59 0.58 0.59 0.583 0.584
Figure 1Each digit says which tenth of the last piece holds the point. On the bottom line \displaystyle \frac{7}{12} sits a third of the way along, and every closer look shows the same picture, so the digit 3 comes up forever.

Results

Every fraction terminates or repeats. For integers a and b with b > 0, the decimal of \displaystyle \frac{a}{b} either terminates or repeats, and a repeating block has at most b - 1 digits. The reason is in What makes a number rational. Which fractions terminate can be read off the denominator, as Which fractions give terminating decimals shows.

The block over nines. A purely repeating decimal with whole-number part 0, whose block has k digits and reads as the number B, is B over k nines:

0.\overline{B} = \frac{B}{10^k - 1}

For example \displaystyle 0.\overline{7} = \frac{7}{9}, \displaystyle 0.\overline{25} = \frac{25}{99} and \displaystyle 0.\overline{012} = \frac{12}{999}. A block that begins with 0 still counts all its digits.

Shifting divides by ten. Moving every digit one place to the right divides a decimal by 10, whether it ends or not. So a decimal whose block starts late splits into a terminating part plus a shifted purely repeating part:

0.2\overline{7} = 0.2 + \frac{1}{10} \times 0.\overline{7}

Repeating nines. 0.\overline{9} = 1. As a result every terminating decimal other than 0 has a second name ending in repeating nines, such as 0.25 = 0.24\overline{9}.

Why it is true

Where the bar starts. Once the digits of a are used up, each step of the division of a by b takes the remainder left by the step before, multiplies it by ten and divides by b. The digit it writes and the remainder it leaves depend on nothing else. So if step m leaves the same remainder as an earlier step j, then step m + 1 does exactly what step j + 1 did, step m + 2 what step j + 2 did, and so on forever. The digits of steps j + 1 to m form a block that repeats, and the digits before step j + 1 are not in it. Taking the first remainder that comes back gives the earliest start and the shortest block, which is the standard form.

The block over nines. Divide 1 by 9: 10 \div 9 = 1 remainder 1, and the remainder 1 returns at every step, so \displaystyle \frac{1}{9} = 0.\overline{1}. Divide 1 by 99: 10 \div 99 = 0 remainder 10, then 100 \div 99 = 1 remainder 1, and the remainder 1 has returned, so \displaystyle \frac{1}{99} = 0.\overline{01}. In the same way \displaystyle \frac{1}{999} = 0.\overline{001}, and 1 over k nines has a 1 in every kth place and zeros elsewhere.

Now multiply by B, a number with at most k digits. Each 1 turns into a copy of B that fits in its own k places, so the copies never overlap and nothing carries:

25 \times 0.010101\ldots = 0.252525\ldots

So \displaystyle B \times \frac{1}{10^k - 1}, which is \displaystyle \frac{B}{10^k - 1}, equals 0.\overline{B}.

Shifting. Dividing by 10 divides the place value of every digit by 10, which is the same as moving every digit one place right. That does not depend on the decimal having an end.

Repeating nines. By the block over nines, \displaystyle 0.\overline{9} = \frac{9}{9} = 1. Another way to see it: 0.9, 0.99 and 0.999 are within 0.1, 0.01 and 0.001 of 1, and 0.\overline{9} is at least as close as each of them, so the gap between 0.\overline{9} and 1 is smaller than every positive number. The only such gap is 0. Then

0.24\overline{9} = 0.24 + \frac{1}{100} \times 0.\overline{9} = 0.24 + 0.01 = 0.25

Worked examples

Examples 1 to 3 go with Part 1, and examples 4 to 7 with Part 2.

Example 1

One that stops and one that does not

Write \displaystyle \frac{9}{16} and \displaystyle \frac{8}{15} as decimals.

Solution

\displaystyle \frac{9}{16}: since 16 does not go into 9, the decimal starts 0. and the division continues with 90 tenths.

DivideDigitRemainder
90 \div 16510
100 \div 1664
40 \div 1628
80 \div 1650

The remainder 0 means nothing is left to divide, so the decimal stops: \displaystyle \frac{9}{16} = 0.5625.

\displaystyle \frac{8}{15}: first 80 \div 15 = 5 remainder 5, then 50 \div 15 = 3 remainder 5. The second step left the same remainder as the first, so every step from the second on writes a 3 and leaves 5. The 5 in the tenths place came before the remainder repeated, so it is not in the block:

\frac{8}{15} = 0.5\overline{3}

Writing 0.\overline{53} would be wrong: that is 0.535353\ldots, a different number.

Example 2

A longer block, and a negative

Write \displaystyle \frac{29}{27} and \displaystyle -\frac{13}{22} in bar notation.

Solution

\displaystyle \frac{29}{27}: first, 27 goes into 29 once with remainder 2, so the whole-number part is 1. Then:

DivideDigitRemainder
20 \div 27020
200 \div 27711
110 \div 2742

The remainder 2 is the one the first division left, so the three steps after the point repeat from the start, writing 0, 7, 4 forever: \displaystyle \frac{29}{27} = 1.\overline{074}. The 0 belongs to the block. Leaving it out would give 1.\overline{74} = 1.7474\ldots, a different number.

\displaystyle -\frac{13}{22}: a negative number divided by a positive one is negative, so divide 13 by 22 and put the sign in front at the end.

DivideDigitRemainder
130 \div 22520
200 \div 2292
20 \div 22020

The remainder 20 was left by the first step and again by the third, so the second and third steps repeat: the block is 90, and the 5 before it is not in it. So \displaystyle \frac{13}{22} = 0.5\overline{90}, and

-\frac{13}{22} = -0.5\overline{90} = -0.5909090\ldots

The minus sign applies to the whole decimal.

Example 3

Placing the bar

Write each decimal in bar notation in standard form. In each, the pattern shown continues forever.

(a) 0.0555\ldots \qquad (b) 7.123123123\ldots \qquad (c) 0.8636363\ldots

Solution

(a) The 0 in the tenths place happens once; only the 5 repeats. So 0.0555\ldots = 0.0\overline{5}. Note that 0.\overline{05} would mean 0.050505\ldots.

(b) The block 123 starts straight after the point: 7.\overline{123}. A bar over 123123 would describe the same digits, but the standard form uses the shortest block.

(c) After the 8, the digits run 6, 3, 6, 3, \ldots, so the block is 63 and starts in the hundredths place: 0.8\overline{63}. Reading the same digits as 0.86\overline{36} is also correct, but it starts the block one place later than necessary, so it is not the standard form.

Example 4

Reading the bar back out

Write out the first eight decimal places of 0.\overline{47} and 0.4\overline{7}. Then put 0.\overline{47}, 0.4\overline{7}, 0.47 and 0.\overline{4} in order from least to greatest, and round 0.\overline{47} to two and to three decimal places.

Solution

Write each one out by copying its block:

\begin{aligned} 0.\overline{47} &= 0.47474747\ldots \\ 0.4\overline{7} &= 0.47777777\ldots \\ 0.47 &= 0.47000000 \\ 0.\overline{4} &= 0.44444444\ldots \end{aligned}

Now compare place by place, as with any decimals. The tenths digits are all 4. In the hundredths, 0.\overline{4} has 4 and the rest have 7, so 0.\overline{4} is the least. In the thousandths the other three have 0, 4 and 7. Once two decimals differ at a place, the digits after it cannot reverse the order (the one way they can even make the two equal, a tail of repeating nines, is under Boundaries). So

0.\overline{4} < 0.47 < 0.\overline{47} < 0.4\overline{7}

To round to two places, look at the third digit of 0.474747\ldots (Rounding decimals). It is 4, less than 5, so round down: 0.47. To round to three places, look at the fourth digit, 7, and round up: 0.475. A rounded value is a terminating decimal close to 0.\overline{47}, not equal to it.

Example 5

The block over nines

Write each as a fraction in lowest terms: (a) 0.\overline{8} \qquad (b) 0.\overline{54} \qquad (c) 2.\overline{185}

Solution

(a) The block is the one digit 8, so \displaystyle 0.\overline{8} = \frac{8}{9}. Check: 80 \div 9 = 8 remainder 8, and the remainder 8 returns every time.

(b) The block 54 has two digits, so it goes over 99:

0.\overline{54} = \frac{54}{99} = \frac{6}{11}

dividing top and bottom by their common factor 9.

(c) The rule is for a decimal that starts at 0, so split off the whole-number part first: 2.\overline{185} = 2 + 0.\overline{185}, which is \displaystyle 2 + \frac{185}{999}. Since 185 = 5 \times 37 and 999 = 27 \times 37, the fraction simplifies to \displaystyle \frac{5}{27}. Then

2.\overline{185} = 2 + \frac{5}{27} = \frac{54}{27} + \frac{5}{27} = \frac{59}{27}
Example 6

When the block starts later

Write 0.3\overline{8} and 1.2\overline{45} as fractions in lowest terms.

Solution

These are not purely repeating, so the block over nines cannot be used on them straight away. Split each into the digits before the block and a shifted purely repeating decimal.

(a) 0.3\overline{8} = 0.3 + 0.0\overline{8}, and 0.0\overline{8} is 0.\overline{8} with every digit moved one place right, which is \displaystyle \frac{1}{10} \times \frac{8}{9} = \frac{8}{90}. Writing 0.3 as \displaystyle \frac{27}{90}:

0.3\overline{8} = \frac{27}{90} + \frac{8}{90} = \frac{35}{90} = \frac{7}{18}

Check: 70 \div 18 = 3 remainder 16, then 160 \div 18 = 8 remainder 16, which repeats, giving 0.3888\ldots

(b) 1.2\overline{45} = 1.2 + 0.0\overline{45}, and \displaystyle 0.0\overline{45} = \frac{1}{10} \times \frac{45}{99}. Since \displaystyle \frac{45}{99} = \frac{5}{11}, this is \displaystyle \frac{5}{110}. Writing 1.2 as \displaystyle \frac{132}{110}:

1.2\overline{45} = \frac{132}{110} + \frac{5}{110} = \frac{137}{110}

This is in lowest terms, since 110 = 2 \times 5 \times 11 and none of these divides 137.

Turning a repeating decimal into a fraction gives a method that handles any repeating decimal in one move, without splitting it first.

Example 7

Adding repeating decimals

Find 0.\overline{72} + 0.\overline{5} and 0.\overline{72} - 0.\overline{5}, giving each answer in bar notation.

Solution

Adding decimals column by column starts at the last digit, and these decimals have no last digit. Fractions avoid the problem. By the block over nines, \displaystyle 0.\overline{72} = \frac{72}{99} and \displaystyle 0.\overline{5} = \frac{5}{9} = \frac{55}{99}, multiplying top and bottom by 11. So

0.\overline{72} + 0.\overline{5} = \frac{127}{99} = 1 + \frac{28}{99} = 1.\overline{28}
0.\overline{72} - 0.\overline{5} = \frac{17}{99} = 0.\overline{17}

Cutting both decimals off after six places shows why the fractions were needed: 0.727272 + 0.555555 = 1.282827. That agrees with 1.\overline{28} for five places and then goes wrong, because the cut-off digits would have carried a 1 into the sixth place, and that carry comes from digits further along, however far you go.

Boundaries

The bar needs a block that repeats forever. A decimal with a pattern that keeps changing, such as one whose runs of zeros keep getting longer, has no block to put a bar over. Such a decimal is not the decimal of any fraction; see What makes a number rational and Irrational numbers.

A rounded or cut-off decimal is a different number. 0.583 is a terminating decimal close to \displaystyle \frac{7}{12}, not equal to it. Only the bar or the fraction gives the exact value.

The block over nines needs the block to start straight after the point. 0.3\overline{8} is not \displaystyle \frac{38}{99}, which is 0.\overline{38}. Shift first, as in Example 6.

Terminating decimals have two names. 0.25 = 0.24\overline{9} and 0.4\overline{9} = 0.5. Standard form always uses the terminating name. This is also the one case where two decimals that differ at some place are equal anyway.

The bar covers digits after the point only. The whole-number part is never under a bar, and a block keeps any zeros it starts with: 0.\overline{012} is not 0.\overline{12}.

Where this goes next

Which fractions stop and which repeat can be decided without dividing at all, from the prime factors of the denominator; that is Which fractions give terminating decimals. The reverse trip, from any repeating decimal to a fraction, gets a single method in Turning a repeating decimal into a fraction, and that method also proves that every repeating decimal is the decimal of a fraction.

Together these say exactly which decimals belong to Rational numbers: the ones that stop or repeat. A decimal that does neither names a number with no fraction at all, which is where Irrational numbers and Irrational and real numbers begin. Later, \displaystyle 0.\overline{25} = \frac{25}{100} + \frac{25}{10000} + \cdots is read as a sum of infinitely many shrinking terms, an Infinite geometric series. Closer to hand, bar notation turns up in percents: \displaystyle \frac{5}{12} = 0.41\overline{6} = 41.\overline{6}\% (Converting among fractions, decimals and percents), and in ordering fractions and decimals together.

Exercises

Part 1: fractions to decimals

Write each fraction as a decimal, using bar notation if it repeats.

  1. \displaystyle \frac{7}{8}
  2. \displaystyle \frac{4}{9}
  3. \displaystyle \frac{7}{11}
  4. \displaystyle \frac{11}{6}
  5. \displaystyle -\frac{5}{37}
  6. \displaystyle \frac{17}{30}
  7. \displaystyle \frac{23}{44}

Part 1: writing and reading the bar

  1. Write 0.31111\ldots in bar notation, where the 1s continue forever.
  2. Write 12.707070\ldots in bar notation, where the block 70 continues forever.
  3. Write 0.5838383\ldots in bar notation, where the block 83 continues forever.
  4. Write out the first nine decimal places of 4.\overline{518} and of 4.5\overline{18}. Which number is greater?
  5. Each decimal is written correctly but not in standard form. Rewrite each in standard form: (a) 0.\overline{77} \quad (b) 0.2\overline{92} \quad (c) 1.\overline{1212}

Part 2: comparing and rounding

  1. Which is greater, 0.\overline{53} or 0.5\overline{3}?
  2. Put in order from least to greatest: 0.\overline{21}, 0.2\overline{1}, 0.21, 0.\overline{2}, 0.212.
  3. Round 5.\overline{48} to (a) the nearest tenth, (b) two decimal places, (c) three decimal places.

Part 2: back to fractions

Write each as a fraction in lowest terms.

  1. 0.\overline{2}
  2. 0.\overline{81}
  3. 3.\overline{037}
  4. 0.1\overline{6}
  5. 0.0\overline{18}
  6. Find 0.\overline{4} + 0.\overline{38} exactly, and write the answer in bar notation.

Reasoning

  1. Without dividing, explain why the repeating block of \displaystyle \frac{5}{17} has at most 16 digits.
  2. Use 0.\overline{9} = 1 to show that 0.3\overline{9} = 0.4.
  3. Tomasz says that 0.\overline{12} and 0.1\overline{21} are different numbers, because the bars are in different places. Is he right? Explain.
  4. Let a be a whole number from 1 to 8. Explain why the long division of a by 9 leaves the same remainder at every step, and so why \displaystyle \frac{a}{9} = 0.\overline{a}.
Answers
  1. 0.875. The steps are 70 \div 8 = 8 remainder 6, 60 \div 8 = 7 remainder 4, and 40 \div 8 = 5 remainder 0, so the decimal stops.
  2. 0.\overline{4}. Each step is 40 \div 9 = 4 remainder 4, and the remainder 4 returns.
  3. 0.\overline{63}. 70 \div 11 = 6 remainder 4, then 40 \div 11 = 3 remainder 7. The remainder 7 is the 7 the division started with, so the block 63 repeats from the point.
  4. 1.8\overline{3}. 11 \div 6 = 1 remainder 5; then 50 \div 6 = 8 remainder 2, and 20 \div 6 = 3 remainder 2, which repeats.
  5. -0.\overline{135}. For \displaystyle \frac{5}{37}: 50 \div 37 = 1 remainder 13, 130 \div 37 = 3 remainder 19, 190 \div 37 = 5 remainder 5. The remainder 5 is where the division started, so 135 repeats from the point. The fraction is negative, so the decimal is too.
  6. 0.5\overline{6}. 170 \div 30 = 5 remainder 20, then 200 \div 30 = 6 remainder 20, which repeats.
  7. 0.52\overline{27}. 230 \div 44 = 5 remainder 10, 100 \div 44 = 2 remainder 12, 120 \div 44 = 2 remainder 32, 320 \div 44 = 7 remainder 12. The remainder 12 came back, so the digits made since it first appeared, 2 and 7, repeat.
  8. 0.3\overline{1}. The 3 happens once; only the 1 repeats.
  9. 12.\overline{70}. The block starts straight after the point, and the whole-number part is not barred.
  10. 0.5\overline{83}. The 5 happens once, then 83 repeats.
  11. 4.518518518 and 4.518181818. They first differ in the fourth place, 5 against 1, so 4.\overline{518} is greater.
  12. (a) 0.\overline{7}, since the shortest block is the single 7. (b) 0.\overline{29}, since the digits are 0.292929\ldots and the block 29 can start straight after the point. (c) 1.\overline{12}, since 1212 is two copies of 12.
  13. 0.\overline{53}. Written out, 0.535353\ldots and 0.53333\ldots first differ in the thousandths, where 5 > 3.
  14. 0.21 < 0.2\overline{1} < 0.212 < 0.\overline{21} < 0.\overline{2}. To six places they are 0.210000, 0.211111, 0.212000, 0.212121 and 0.222222.
  15. 5.\overline{48} = 5.484848\ldots (a) 5.5, since the hundredths digit 8 rounds up. (b) 5.48, since the third digit is 4. (c) 5.485, since the fourth digit is 8.
  16. \displaystyle \frac{2}{9}, by the block over nines.
  17. \displaystyle \frac{9}{11}. \displaystyle 0.\overline{81} = \frac{81}{99}, and dividing top and bottom by 9 gives \displaystyle \frac{9}{11}.
  18. \displaystyle \frac{82}{27}. \displaystyle 0.\overline{037} = \frac{37}{999} = \frac{1}{27}, since 999 = 27 \times 37, and \displaystyle 3 + \frac{1}{27} = \frac{82}{27}.
  19. \displaystyle \frac{1}{6}. \displaystyle 0.1\overline{6} = \frac{1}{10} + \frac{1}{10} \times \frac{6}{9}, which is \displaystyle \frac{9}{90} + \frac{6}{90} = \frac{15}{90}, or \displaystyle \frac{1}{6} in lowest terms.
  20. \displaystyle \frac{1}{55}. \displaystyle 0.0\overline{18} = \frac{1}{10} \times \frac{18}{99}, and \displaystyle \frac{18}{99} = \frac{2}{11}, so this is \displaystyle \frac{2}{110}, or \displaystyle \frac{1}{55} in lowest terms.
  21. 0.\overline{82}. \displaystyle 0.\overline{4} = \frac{4}{9} = \frac{44}{99} and \displaystyle 0.\overline{38} = \frac{38}{99}, so the sum is \displaystyle \frac{82}{99} = 0.\overline{82}.
  22. Each step of dividing 5 by 17 leaves a remainder from 0 to 16. If 0 ever appeared the division would stop and there would be no block at all. Otherwise only the 16 remainders 1 to 16 are possible, and the steps inside one block all leave different remainders, since the block ends as soon as one comes back. So a block has at most 16 digits.
  23. Splitting off the 3, \displaystyle 0.3\overline{9} = 0.3 + \frac{1}{10} \times 0.\overline{9}. Since 0.\overline{9} = 1, this is 0.3 + 0.1 = 0.4.
  24. No. Written out, 0.\overline{12} = 0.121212\ldots and 0.1\overline{21} = 0.1212121\ldots have the same digit in every place, so they are the same number. Bar notation can describe the same digits in more than one way; 0.\overline{12} is the standard form.
  25. Since a < 9, the first step is a \div 9 = 0 remainder a. Every later step divides 10a by 9, and 10a = 9a + a with a < 9, so it writes the digit a and leaves the remainder a again. The same remainder means the same step forever, so every digit is a and \displaystyle \frac{a}{9} = 0.\overline{a}.
kg1128 · updated 2026-10-07 · CC-BY-SA-4.0