Fraction to Decimal Calculator
Convert a fraction to a decimal by long division, with the repeating block marked and measured.
Updated
As a decimal
0.(142857)repeating
the digits in brackets repeat forever, every 6
- Terminates
- no
- Repeating block
- 142857 (6 digits)
- Digits before the repeat
- 0
- Rounded to 6 places
- 0.142857
It repeats because the reduced denominator carries a prime other than 2 or 5, so no power of ten is divisible by it.
Advertisement
In short
How do you convert a fraction to a decimal?
Divide the top by the bottom. It either stops or repeats, and which one is decided by the denominator: 1/8 is 0.125 and ends, while 1/7 is 0.142857 repeating forever in a six-digit cycle. Only denominators built from 2s and 5s can terminate.
A calculator rounds the repeat away. This one marks it and measures how long it is.
How to use the fraction to decimal calculator
Enter a fraction and read its decimal. The division is the easy part; what an ordinary calculator will not tell you is whether the answer stops, and if it does not, how long the repeating block is before it comes round again.
That matters more than it sounds. A calculator showing 0.142857142857 has silently truncated an infinite expansion, and nothing on the display distinguishes it from a number that genuinely ends there. The two are different kinds of quantity, and the difference is the whole reason fractions are still written as fractions.
0.125
One eighth, and it stops
8 is 2 x 2 x 2
6
Digits in the cycle of 1/7
0.(142857)
2 and 5
The only primes that terminate
the factors of ten
Advertisement
The rule behind it is short enough to carry around. Base ten is two times five, so a fraction can only terminate when its reduced denominator is built entirely from twos and fives. Eight is two cubed, so an eighth stops after three places. Seven is neither, so a seventh has no choice but to cycle.
Long division is what produces both halves of the answer here, and it is worth seeing why. Each step leaves a remainder, and there are only so many possible remainders below the denominator. The moment one repeats, every digit after it must repeat too, because the same remainder always produces the same next digit.
- 1/2, 1/4, 1/5, 1/8
- terminate
- 1/3
- 1 digit — 0.(3)
- 1/6
- 1 digit after a 1 — 0.1(6)
- 1/7
- 6 digits — 0.(142857)
- 1/9
- 1 digit — 0.(1)
- 1/11
- 2 digits — 0.(09)
- 1/13
- 6 digits
The sevenths are the famous case because all six of them use the same six digits in the same cyclic order: 1/7 starts at 142857, 2/7 starts at 285714, and so on around the ring. That is a property of seven, not a coincidence of notation.
Turn a decimal back into a fraction
The reverse page reads the digits exactly rather than guessing a nearby fraction, and handles the repeating case with the identity that makes it exact.
Open decimal to fraction →Common fractions with their decimal expansions, whether the expansion terminates, and how long the repeating block is when it does not.
| Fraction | Decimal | Terminates | Cycle length |
|---|---|---|---|
| 1/2 | 0.5 | yes | — |
| 1/3 | 0.(3) | no | 1 |
| 1/4 | 0.25 | yes | — |
| 1/5 | 0.2 | yes | — |
| 1/6 | 0.1(6) | no | 1 |
| 1/7 | 0.(142857) | no | 6 |
| 1/8 | 0.125 | yes | — |
| 1/9 | 0.(1) | no | 1 |
| 1/11 | 0.(09) | no | 2 |
| 1/12 | 0.08(3) | no | 1 |
| 1/16 | 0.0625 | yes | — |
| 1/20 | 0.05 | yes | — |
Why the remainder decides everything
Work one division by hand and the whole behaviour falls out. Dividing 1 by 7, the remainders run 3, 2, 6, 4, 5, 1 and then back to 3. Six distinct remainders, then a repeat, and the digits repeat with them. Nothing else could have happened, because there are only six possible non-zero remainders below seven.
- Remainder 1, bring down a zero
- digit 1, remainder 3
- Remainder 3
- digit 4, remainder 2
- Remainder 2
- digit 2, remainder 6
- Remainder 6
- digit 8, remainder 4
- Remainder 4
- digit 5, remainder 5
- Remainder 5
- digit 7, remainder 1
- Back to remainder 1
- the cycle closes
The seventh step would produce the same remainder the first one started from, so from there on the digits 142857 repeat unchanged. The cycle can never be longer than one less than the denominator, which is the ceiling every repeating decimal obeys.
That ceiling has a useful consequence. A fraction with denominator 97 can have a cycle up to 96 digits long, and it does. So a display showing twelve digits of it is showing an eighth of one cycle, which is not enough to see any pattern at all.
When rounding is the right answer anyway
Most of the time you want the rounded figure and the exact expansion is a curiosity. The cases where it is not are the ones where the fraction will be used again: a ratio that gets multiplied out, a measurement that gets scaled, a rate that compounds.
Do
- Reduce the fraction before deciding whether it terminates
- Keep the fraction itself when the value will be reused
- Round only at the point of display, never mid-calculation
- Read the cycle length before trusting a truncated display
Don't
- Assume a calculator display shows a number that ends
- Round a repeating decimal early and then convert it back
- Compare two rounded decimals to test whether fractions are equal
- Judge termination from the denominator as written
The last point catches people comparing fractions. 3/8 and 0.375 are the same number, but 1/3 and 0.333 are not, so testing equality by rounding both to three places will say they match when they do not. Comparing the fractions directly, by cross-multiplying, never has that problem.
Advertisement
The formula, worked line by line
One division, done long rather than by floating point. The method is the same one taught in school, and it is used here because it produces information a float cannot: where the repeat begins and how long it runs.
“Every fraction either terminates or repeats. There is no third possibility, and the reason is that a division has only so many remainders to run through.”
That is worth stating plainly because it is often assumed rather than known. An irrational number like the square root of two neither terminates nor repeats, and that is precisely what makes it irrational.
decimal = numerator / denominator, by long division
terminates when the reduced denominator is 2^a x 5^b
1/8 = 0.125 8 = 2^3, so it stops
1/7 = 0.(142857) 7 is neither 2 nor 5, so it cycles
cycle length is at most (denominator - 1)- 12 factors as
- 2 x 2 x 3
- The 2s can be absorbed
- by a power of ten
- The 3 cannot
- so something must repeat
- Result
- 0.08(3)
- Two digits, then a cycle of one
- 0.0833333…
- Prefix length
- 2 digits
The number of digits before the repeat begins is set by the twos and fives, and the cycle length by whatever is left. That is why a denominator mixing both kinds produces an expansion in two parts rather than one.
The sevenths, and their shared ring
All six sevenths use the digits 142857 in the same cyclic order, starting at a different point. 1/7 begins at 1, 2/7 at 2, 3/7 at 4, and so on. Multiplying 142857 by anything from one to six produces a rotation of itself, which is a property of the number rather than of the notation.
Where the terminating denominators come from
- 2, 4, 8, 16, 32
- powers of two
- 5, 25, 125
- powers of five
- 10, 20, 40, 50, 100
- mixtures of both
- 3, 6, 7, 9, 11, 12
- all repeat
- 14, 15, 21, 22
- all repeat
Every denominator in the first three rows divides some power of ten exactly, which is what allows the division to finish. Everything in the last two carries a prime that no power of ten contains.
The practical rule is one line: cancel the fraction, then look for anything other than a two or a five underneath. If there is nothing else, it stops; if there is, it cycles.
Advertisement
Questions people ask
How do I convert a fraction to a decimal?
Divide the numerator by the denominator. The result either terminates or repeats forever, and which one depends on the reduced denominator: only those built from twos and fives can stop, because ten is two times five and nothing else divides a power of ten exactly.
Why does 1/7 repeat every six digits?
Because long division by seven has only six possible non-zero remainders, and once one recurs every digit after it must recur too. The remainders run 3, 2, 6, 4, 5, 1 and then close the loop, giving the six-digit block 142857 that repeats forever.
Which fractions have decimals that end?
Those whose denominator, after reducing, contains only the primes 2 and 5. Halves, quarters, eighths, fifths, twentieths and hundredths all terminate. Thirds, sixths, sevenths, ninths and elevenths cannot, because their denominators carry a prime that no power of ten is divisible by.
Does 6/12 repeat because of the 3 in twelve?
No, because the rule applies after reducing. 6/12 cancels to 1/2, whose denominator is a single two, so it terminates at 0.5. Always reduce first: a denominator that looks awkward often has its awkward factor cancelled by the numerator.
Why does my calculator not show the repeat?
Because it stores a fixed number of digits and truncates the rest without saying so. A display reading 0.142857142857 has cut off an infinite expansion, and nothing distinguishes it from a number that genuinely ends there. Marking the cycle is the only way to tell the two apart.
Related guides
Math
Why the Quadratic Formula Loses Accuracy on One of Its Two Roots
Completing the square takes four lines and produces the formula. It also shows which of the two roots is safe to trust, and the calculator on this site was corrected to use the other route.
August 19, 2026 · 10 min read
Math
Geometry Backwards: Finding the Radius from the Area
Every geometry formula is printed in the direction you need least. Running it backwards is not the same operation reversed; it is a root, and roots can refuse.
August 17, 2026 · 10 min read
Math
When Cross Multiplication Gives You the Wrong Answer
Cross multiplication answers every question you put to it, including the ones it should refuse. The test is one line: if the input were zero, would the output be zero?
August 17, 2026 · 10 min read