Guide · Theory
Terminating and Repeating Decimals
Updated: June 2026
Convert a fraction to a decimal and one of two things always happens: the digits stop, or they fall into a repeating loop. There is no third option, and you can predict which you will get just by looking at the denominator. Understanding the rule turns a mystery into a one-glance judgement.
Free · No upload · Instant in the browser
Two kinds of decimal
A terminating decimal ends after a finite number of digits, like 0.75 or 0.125. A repeating decimal goes on forever but cycles through a fixed block, like 0.(3) or 0.(142857). Every fraction — every rational number — is exactly one of these two.
1/3 = 0.333… (repeats)
What separates them is not the numerator but the denominator, once the fraction is in lowest terms.
The 2-and-5 rule
Here is the whole secret. Reduce the fraction first. If the denominator's only prime factors are 2 and 5, the decimal terminates. If any other prime sneaks in — 3, 7, 11, 13 — the decimal repeats.
1/20 → 20 = 2×2×5 → terminates
1/6 → 6 = 2×3 → repeats (the 3)
1/7 → 7 = 7 → repeats
The reason is that our number system is base ten, and ten factors into 2 × 5. A denominator built only from 2s and 5s can be scaled up to a power of ten, which is what a terminating decimal really is.
Why a power of ten matters
A terminating decimal is secretly a fraction whose denominator is 10, 100, 1000 and so on. So a fraction terminates precisely when you can rewrite it with such a denominator.
(8 × 125 = 1000, so it fits)
Try the same with 1/3 and you fail: no power of ten is divisible by 3, so 1/3 can never be written as something-over-a-power-of-ten, and therefore cannot terminate.
How long is the repeat?
For a repeating decimal, the length of the repeating block is at most one less than the denominator. Sevenths repeat with a six-digit cycle (0.(142857)); elevenths repeat with two digits (0.(09)). The exact length relates to the order of 10 modulo the denominator, but the practical takeaway is simpler: small denominators with a factor of 3, 7 or 11 produce the repeats you meet most often.
Irrational numbers are neither
Terminating and repeating decimals together account for every rational number — every fraction. Numbers that neither stop nor repeat, like pi (3.14159…) or √2 (1.41421…), are irrational: they cannot be written as a fraction at all. So the very fact that a decimal repeats is proof that it is a fraction, which is exactly why the repeating-decimal formula can always recover it.
- Terminates → rational, denominator only 2s and 5s.
- Repeats → rational, denominator has another prime.
- Neither → irrational, no exact fraction exists.
Frequently asked questions
How can I tell if a fraction terminates?
Reduce it, then factor the denominator. If only 2s and 5s appear, it terminates; any other prime makes it repeat.
Why does 1/3 repeat but 1/8 does not?
8 factors into 2×2×2, which divides a power of ten, so 1/8 terminates. 3 does not divide any power of ten, so 1/3 repeats.
Are all repeating decimals fractions?
Yes. Any terminating or repeating decimal is a rational number and can be written as an exact fraction. Only non-repeating, non-terminating decimals are irrational.