Try it with your numbers
Show every step
Every repeating decimal is a fraction, and every fraction is either a terminating or a repeating decimal. That two-way street is why this conversion always works, and the sections below show the algebra behind it, the shortcut, the mixed and negative cases, and the spots where students lose points.
How do you convert a repeating decimal to a fraction?
The reliable method uses one variable and one subtraction. Mark the repeating block, count its digits, and let that count be .
- Write equal to the decimal.
- Multiply both sides by , which slides one whole block past the decimal point.
- Subtract the original equation from the new one. The endless tails match, so they cancel.
- Solve for and simplify the fraction.
Here it is on , where the block has digits:
The greatest common factor of and is , which is what reduces the fraction. The bar over means those two digits repeat forever. Notice that the left side became because , a detail that matters in the next section.
Quick check
Answer:
Why does the subtract method work?

Multiplying by moves every digit places to the left. Because the pattern never ends, the shifted number has exactly the same infinite tail as the original. Subtracting two equal tails leaves nothing, so only a whole number survives: equals the block. That is the entire trick, and it is a direct use of the properties of equality: you may multiply both sides of an equation by the same number, then subtract equal quantities from equal quantities.
The same result appears from a different angle. A repeating decimal is a geometric series. For :
The first term is the block written as a decimal, and the ratio is . Since turns into , the denominator falls out automatically. That denominator is a string of nines, which is where the shortcut comes from.
For , multiplying by gives , whose tail does not match . Multiply by , where is the block length (a multiple of it also works, with bigger numbers).
This is the most common error. The decimals you can see on the page do not matter. Only the length of the repeating block does.
The nines shortcut for a repeating decimal to fraction
Step 3 above ended with . In general, when the repeat starts right after the decimal point, the equation always reads . So:
The denominator is , , and so on. Take , a three-digit block:
Simplifying is faster if you know what is inside the denominators: , , and (a quick job with prime factorization). So the only common factors to look for are , , and . The divisibility rules handle the rest: the digits of add to , so it divides by , giving , and both of those divide by :
Because is prime and does not divide , the fraction is finished.
Try this: Write , and as fractions using the nines rule. Then divide numerator by denominator on a calculator to confirm each one.
Leading zeros in the block count as digits. That is why is , not .
How to convert a mixed repeating decimal to a fraction
A mixed repeating decimal has some non-repeating digits before the repeat, such as . The nines rule alone fails here, so the algebra needs two multipliers. Use (with the number of non-repeating digits) to land just before the repeat, and to land one block later.
Convert , where and :
The numerator step is plain integer subtraction: . The trap is subtracting itself instead of . Then you get , which is not a whole number, and the cancellation has not worked. Both lines you subtract must have the same tail.
The pattern gives a one-line rule: numerator equals (all digits up to the end of the first block) minus (the non-repeating digits), and the denominator is nines followed by zeros. For :
Check against from above: , the same fraction.
Quick check
Answer:
Negative and whole-number repeating decimals as fractions

For a negative decimal, convert the absolute value and put the minus sign back at the end. For a decimal with a whole part, you can either keep the whole part in the equation or split it off.
Convert . Work with , where the block has two digits:
Restore the sign: , which is as a mixed number. Splitting gives the same thing: .
The trap is the sign. means , not . The second reading gives , which is a different number. When repeating decimals sit inside a bigger expression, convert each one first and then compute with exact fractions. For example,
a standard job for simplifying complex fractions.
Is 0.999… equal to 1?
Yes, and the conversion method proves it. Let . Then , and subtracting gives , so . The nines rule agrees: . A third check: , so tripling both sides gives .
The objection most people have is that must be a hair below . The mistake is treating the decimal as a process that stops somewhere. A finite string of nines equals , which is always short of . But the repeating decimal means all the nines at once, and no positive gap can survive when it is smaller than every . A decimal expansion is a name for a point on the number line, and the real number system lets one point have two names.
This is not a one-off. Any terminating decimal has a twin ending in nines: , and the mixed rule confirms it, since . It explains why a conversion can give an answer that looks different from what you expected but is equal in value.
Which decimals repeat, and when does the method fail?
A fraction in lowest terms, , produces a terminating decimal exactly when has no prime factors except and . Anything else repeats. The block length is at most , since long division can only produce different nonzero remainders before one comes back.
| Fraction | Decimal | Block length |
|---|---|---|
| 1 | ||
| 1 | ||
| 2 | ||
| 6 | ||
| 6 |
The method breaks down in three situations:
- Irrational numbers. The decimals of and never repeat, so no fraction exists. This is the dividing line in rational vs irrational numbers.
- Rounded displays. A calculator showing has cut the decimal off. Taken literally it is , not . You need to know the pattern continues.
- Hidden blocks. Given only , you cannot tell whether the block is the whole string or something longer. Always see at least one complete repeat.
Bar placement also changes the value. , but . A terminating decimal like is the easy case, equal to , and converts by place value: .
Quick check
Answer:
How to check your fraction and where repeating decimals show up
To check, divide the numerator by the denominator with long division (see dividing integers). For : remainder , then remainder . The remainder has come back, so the digit repeats forever, giving . A repeated remainder is always the sign that the block has started over.
A pure repeating decimal reduces to a denominator with no factor of or , as in . A mixed one always keeps a or a , as in . If your answer breaks this rule, recheck the zeros.
Exact fractions matter in practice. In a percent of a number problem, of is exactly , but using gives . Spreadsheets and code have the same issue underneath: computers store numbers in binary, where is the repeating expansion , so it cannot be stored exactly. That is why many programming languages print as . Everyday amounts like of an hour (exactly minutes) or of a cup are repeating decimals in disguise, and the fraction is the exact version.
Practice problems
0 of 5 solved
- Write as a fraction.
Answer:
The block is one digit, so it goes over one nine. . It is already in lowest terms. - Write as a fraction in lowest terms.
Answer:
The block has two digits, so use two nines: . Divide top and bottom by to get . - Write as a fraction in lowest terms.
Answer:
Let . Then and . Subtract: . So . - Write as an improper fraction in lowest terms.
Answer:
The repeating part is . Add the whole part: . - Write as a fraction in lowest terms.
Answer:
Work with and restore the sign at the end. Let , so and . Subtract: , so . The answer is .
Common questions
How do you turn a repeating decimal into a fraction?
Put the repeating block over the same number of 9s, then simplify. For that gives . If digits come before the repeat, use the subtract method or add one zero to the denominator for each of them.
What is 0.333 repeating as a fraction?
. Note that a plain with no repeat is a different number: it equals .
How do you convert a decimal with a non-repeating part, like 0.1666...?
Subtract the non-repeating digits from the digits through the first repeat, and divide by nines followed by zeros. For that is .
Is 0.999... really equal to 1?
Yes. Setting gives , so . The two are different names for the same real number, not two numbers that are very close.
Can every repeating decimal be written as a fraction?
Yes. Every repeating decimal is a ratio of two integers, which is the definition of a rational number. Decimals that never repeat, such as and , cannot be written this way.
How do you know how many 9s to use?
Count the digits in the repeating block, not the digits you can see. The block of has three digits, so the denominator is .