What are the decimal expansions of rational numbers? Every rational number written as $\frac{p}{q}$ in lowest terms ($q \ne 0$) has a decimal expansion that is one of two kinds:
- Terminating — it ends after finitely many digits (e.g. $\frac{1}{4} = 0.25$, $\frac{3}{5} = 0.6$).
- Non-terminating but repeating — it runs forever, repeating a fixed block of digits (e.g. $\frac{1}{3} = 0.\overline{3}$, $\frac{2}{7} = 0.\overline{285714}$).
A rational number can never give a non-terminating, non-repeating decimal — that behaviour belongs to irrational numbers only.
The terminating test. Put $\frac{p}{q}$ in lowest terms and factorise the denominator. Then:
- If $q = 2^{m}\times 5^{n}$ (only the primes 2 and 5, any whole-number powers), the decimal terminates.
- If $q$ has any other prime factor (3, 7, 11, …), the decimal is non-terminating repeating.
Why the test works. A decimal terminates exactly when the fraction can be rewritten with a denominator that is a power of 10. Since $10 = 2 \times 5$, a power of 10 contains only the primes 2 and 5. If $q = 2^{m}\times 5^{n}$, multiply top and bottom by the missing factors to balance the powers of 2 and 5. For example, $\frac{7}{20} = \frac{7}{2^{2}\times 5} = \frac{7 \times 5}{2^{2}\times 5^{2}} = \frac{35}{100} = 0.35$. The decimal terminates after $\max(m, n)$ places.
Examples of the test:
- $\frac{7}{20}$: $20 = 2^{2}\times 5$ → terminates.
- $\frac{13}{3125}$: $3125 = 5^{5}$ → terminates (after 5 places).
- $\frac{5}{6}$: $6 = 2\times 3$ → the factor 3 forces it to repeat.
- $\frac{64}{455}$: $455 = 5\times 7\times 13$ → the factors 7 and 13 force it to repeat.
Repeating-decimal notation. A bar is placed over the repeating block: $0.333\ldots = 0.\overline{3}$ and $0.142857142857\ldots = 0.\overline{142857}$. A terminating decimal can be seen as repeating with zeros, e.g. $0.5 = 0.5\overline{0}$.
Converting a repeating decimal back to a fraction. Let $x$ equal the decimal, multiply by a suitable power of 10 to line up the repeating blocks, then subtract to eliminate the repeating tail. For example, with $x = 0.\overline{63}$: $100x = 63.\overline{63}$, so $100x - x = 63$, giving $99x = 63$ and $x = \frac{63}{99} = \frac{7}{11}$.
Common mistakes to avoid:
- Forgetting to reduce to lowest terms first. $\frac{6}{15}$ looks like it has a factor 3, but $\frac{6}{15} = \frac{2}{5}$ terminates.
- Thinking the numerator matters — only the denominator (in lowest terms) decides terminating vs repeating.
- Mis-reading $0.\overline{0}$-type cases: a terminating decimal is still rational.
- When converting a repeating decimal, multiplying by the wrong power of 10 so the repeating blocks do not align before subtracting.