Chapter 4 · Rational and irrational numbers

Long Division, Remainders, and Repeating Decimals

Use long division to write fractions as decimals, classify the decimals as terminating or repeating, and explain why the remainders force one of the two.

18 min read

A fraction is a division waiting to happen: 38\frac{3}{8} means 3÷83 \div 8. When you carry out that division, you get the fraction's decimal expansion, which is the same number written with decimal digits.

You already know that a rational number is a number you can write as pq\frac{p}{q}, where pp and qq are integers and q≠0q \neq 0 (dividing by 0 has no meaning). In this lesson, you will use long division to write such fractions as decimals. You will see that the digits can behave in only two ways, and you will be able to explain why.

Long division works one place value at a time. Picture a positive numerator (the top number) and a positive denominator (the bottom number). At each step, you find how many times the denominator fits into the amount in that place, write that digit in the quotient (the result of the division), and subtract. What remains is the remainder. A remainder is always less than the denominator. If it were not, the denominator would fit one more time.

If you still have a remainder after the ones place, you are not finished. You trade each leftover unit for 10 of the next smaller unit: 3 ones are the same amount as 30 tenths, and 6 tenths are the same amount as 60 hundredths. On paper, you make this trade by bringing down a 0. It does not change the number you are dividing, because 3=3.0003 = 3.000.

Once you have used every digit of the numerator, you bring down only 0s. From then on, keep dividing until the remainder is 0, or until you are sure it never will be. The next two examples show one of each.

Worked example

A division that ends

Write 38\frac{3}{8} as a decimal using long division.

  1. Start in the ones place. 8 does not fit into 3, so the ones digit of the quotient is 0 and all 3 ones are left over. Write 0 and a decimal point in the quotient, then bring down a 0 to trade the 3 ones for 30 tenths. The amount is the same.

    3 ones=30 tenths3 \text{ ones} = 30 \text{ tenths}
  2. Divide the tenths. 8 fits into 30 three times, so the tenths digit is 3. Multiply and subtract to find the remainder: 6 tenths.

    30−8×3=30−24=630 - 8 \times 3 = 30 - 24 = 6
  3. Bring down a 0 to trade the 6 tenths for 60 hundredths. 8 fits into 60 seven times, so the hundredths digit is 7. The remainder is 4 hundredths.

    60−8×7=60−56=460 - 8 \times 7 = 60 - 56 = 4
  4. Bring down a 0 to trade the 4 hundredths for 40 thousandths. 8 fits into 40 exactly five times, so the thousandths digit is 5 and the remainder is 0.

    40−8×5=40−40=040 - 8 \times 5 = 40 - 40 = 0
  5. A remainder of 0 means nothing is left to divide, so the division ends with the quotient 0.375. Check it: multiplying the quotient by the denominator must give back the numerator.

    0.375×8=30.375 \times 8 = 3

Answer

38=0.375\frac{3}{8} = 0.375 exactly. The remainder reached 0, so the digits stop at the thousandths place.

Worked example

A division that never ends

Write 411\frac{4}{11} as a decimal using long division.

  1. 11 does not fit into 4, so the ones digit is 0 and the remainder is 4. Bring down a 0 to get 40 tenths. 11 fits into 40 three times, so the tenths digit is 3. The remainder is 7.

    40−11×3=40−33=740 - 11 \times 3 = 40 - 33 = 7
  2. Bring down a 0 to get 70 hundredths. 11 fits into 70 six times, so the hundredths digit is 6. The remainder is 4.

    70−11×6=70−66=470 - 11 \times 6 = 70 - 66 = 4
  3. The remainder 4 is the remainder you started with. Bringing down a 0 gives 40 again, so the next step must repeat step 1 (digit 3, remainder 7), and the step after it must repeat step 2 (digit 6, remainder 4). The remainder is never 0, so the digits 3, 6 repeat without end.

    411=0.363636…\frac{4}{11} = 0.363636\ldots
  4. Three dots only say that the digits continue. To show exactly which digits repeat, draw a bar over one copy of the repeating digits.

    411=0.36‾\frac{4}{11} = 0.\overline{36}

Answer

411=0.36‾\frac{4}{11} = 0.\overline{36}. The digits 36 repeat forever, because the remainder 4 keeps coming back and never becomes 0.

You have now seen two kinds of decimal expansion.

  • A terminating decimal stops: it has a last digit. 0.3750.375 and 2.252.25 are terminating. Each comes from a division that reaches a remainder of 0 after you have used every digit of the numerator.
  • A repeating decimal never stops: from some place on, one block of digits repeats forever. 0.36‾0.\overline{36} is repeating. It comes from a division whose remainder is never 0. The block must not be only 0s, so writing 0.3750.375 as 0.375000…0.375000\ldots does not make it repeating.

Mark a repeating decimal with a bar over exactly one copy of its repeating block. So 0.36‾0.\overline{36} means 0.363636…0.363636\ldots, and 0.83‾0.8\overline{3} means 0.8333…0.8333\ldots, where only the 3 repeats.

To classify a decimal expansion, look at what its digits do. If they stop, it is terminating. If a block that is not only 0s repeats forever, it is repeating.

Classifying decimal expansions
Decimal expansionWhat the digits doClassification
0.3750.375
They stop at the thousandths place.
Terminating
2.252.25
They stop at the hundredths place.
Terminating
0.36‾0.\overline{36}
The block 36 repeats forever: 0.363636…0.363636\ldots
Repeating
0.83‾0.8\overline{3}
After the 8, the digit 3 repeats forever: 0.8333…0.8333\ldots
Repeating
−1.6‾-1.\overline{6}
The digit 6 repeats forever: −1.666…-1.666\ldots
Repeating
0.33330.3333
They stop after four 3s. There is no bar, so this is not 0.3‾0.\overline{3}.
Terminating
0.3‾0.\overline{3}
The digit 3 repeats forever: 0.3333…0.3333\ldots
Repeating

Not every decimal is one of these two kinds. Recall that an irrational number, such as π≈3.14159\pi \approx 3.14159, is a number you cannot write as pq\frac{p}{q} with integers pp and qq, q≠0q \neq 0. Its decimal expansion neither terminates nor repeats: the digits never stop and never settle into a repeating block. Yet every fraction you have divided so far gave a terminating or a repeating decimal. Is that guaranteed?

To find out, follow the remainders through a longer division: 37\frac{3}{7}. Because 7 does not fit into 3, the ones digit is 0 and the first remainder is 3. Each row of the table is one step: bring down a 0, find the next digit, and subtract to get the new remainder.

Long division of 3 by 7, one step per row
StepRemainder at the startAfter bringing down a 0Quotient digitNew remainder
1
33
3030
44
30−7×4=30−28=230 - 7 \times 4 = 30 - 28 = 2
2
22
2020
22
20−7×2=20−14=620 - 7 \times 2 = 20 - 14 = 6
3
66
6060
88
60−7×8=60−56=460 - 7 \times 8 = 60 - 56 = 4
4
44
4040
55
40−7×5=40−35=540 - 7 \times 5 = 40 - 35 = 5
5
55
5050
77
50−7×7=50−49=150 - 7 \times 7 = 50 - 49 = 1
6
11
1010
11
10−7×1=10−7=310 - 7 \times 1 = 10 - 7 = 3
7
33
3030
44
30−7×4=30−28=230 - 7 \times 4 = 30 - 28 = 2

Read the quotient digits down the table: 4, 2, 8, 5, 7, 1, and then 4 again. Step 7 starts with remainder 3, just as step 1 did. Bringing down a 0 gives 30 again, so step 7 must produce the same digit and the same new remainder as step 1. Step 8 then copies step 2, and so on without end: 37=0.428571‾\frac{3}{7} = 0.\overline{428571}.

The remainder did not come back by luck. A remainder is always less than the denominator, so when you divide by 7 the only possible remainders are 0, 1, 2, 3, 4, 5 and 6. A remainder of 0 would end the division. If that never happens, only six values remain. Seven steps cannot all start with different remainders when there are only six to choose from. So by step 7 at the latest, a remainder has to come back, and from then on the digits repeat. It can come back sooner: for 411\frac{4}{11}, the remainder 4 returned at step 3, long before step 11.

Key concept

Why a rational number's decimal terminates or repeats

A rational number is pq\frac{p}{q} for integers pp and qq with q≠0q \neq 0. A negative sign does not change the digits, so take p≥0p \geq 0 and q>0q > 0. Dividing by qq leaves only qq possible remainders: 0,1,2,…,q−10, 1, 2, \ldots, q-1. Once you are bringing down only 0s, each step depends on its remainder alone.

  • If one of these remainders is 0, the division ends and the decimal terminates.
  • If none of them is 0, only q−1q-1 values are possible. Among the first qq of these steps, two must start with the same remainder. From the second one on, the division copies itself, so a block of digits repeats forever and the decimal repeats.

A rational number has no third option. An irrational number is different: its decimal expansion neither terminates nor repeats.

Worked example

Watch the remainders, not the digits

Write 522\frac{5}{22} as a decimal. Classify the decimal as terminating or repeating, and explain how you know its pattern continues forever.

  1. 22 does not fit into 5, so the ones digit is 0 and the remainder is 5. Bring down a 0 to get 50. 22 fits into 50 twice, so the tenths digit is 2. The remainder is 6.

    50−22×2=50−44=650 - 22 \times 2 = 50 - 44 = 6
  2. Bring down a 0 to get 60. 22 fits into 60 twice, so the hundredths digit is also 2. The remainder is 16.

    60−22×2=60−44=1660 - 22 \times 2 = 60 - 44 = 16
  3. The digit 2 has appeared twice, but those two steps started with different remainders, 5 and 6, so the division has not started over. Keep going. Bring down a 0 to get 160. 22 fits into 160 seven times, so the thousandths digit is 7. The remainder is 6.

    160−22×7=160−154=6160 - 22 \times 7 = 160 - 154 = 6
  4. The remainder 6 has come back. You are bringing down only 0s, so each step depends only on the remainder it starts with. The next step must copy step 2 (digit 2, remainder 16), and the step after it must copy step 3 (digit 7, remainder 6). The remainders go 6, 16, 6, 16 and so on, never 0, so the digits 2, 7 repeat forever.

    522=0.2272727…\frac{5}{22} = 0.2272727\ldots
  5. Draw the bar over one copy of the repeating block, 27. The first 2 stays outside the bar, because it came from the starting remainder 5, which never returns.

    522=0.227‾\frac{5}{22} = 0.2\overline{27}

Answer

522=0.227‾\frac{5}{22} = 0.2\overline{27}, a repeating decimal. The pattern continues forever because the remainders 6 and 16 keep taking turns, and each time you bring down a 0, the same remainder gives the same next digit.

Here is the idea to keep. To write a fraction as a decimal, divide the numerator by the denominator and keep bringing down 0s. Once you are bringing down only 0s, watch the remainders. A remainder of 0 means the decimal terminates. A nonzero remainder that comes back means the decimal repeats. For integers pp and qq with q≠0q \neq 0, one of these must happen, because the division allows only a limited number of different remainders. That is why every rational number has a decimal expansion that terminates or repeats, while an irrational number's expansion does neither. Mark a repeating block with a bar, and write ≈\approx whenever you round.

Next, you will go the other way: you will start with a repeating decimal and find the fraction it equals.