What is a repeating decimal?
A repeating (or recurring) decimal is a number whose digits after the decimal point eventually repeat forever, such as 0.333…, 0.1666…, or 0.142857142857…. Every repeating decimal is a rational number, which means it can be written exactly as a fraction. This calculator converts any repeating decimal — with optional non-repeating digits and an integer part — into its simplest fraction.
How to use the calculator
Enter the integer part (the digits before the decimal point), the non-repeating decimal digits (the digits right after the point that do not repeat), and the repeating digits (the block that repeats). For 0.1666…, the integer part is 0, the non-repeating digit is "1", and the repeating digit is "6". Leave the non-repeating field blank for pure repeating decimals like 0.333….
The formula explained
Let N be the non-repeating digit string with m digits and R be the repeating string with k digits. The repeating part of the value equals \((\overline{NR} - N) / ((10^{k} - 1)\cdot 10^{m})\), where NR means the digits of N and R written side by side as one integer. The integer part is then added back and the fraction is reduced using the greatest common divisor.
$$\text{Fraction} = \text{Int} + \frac{\overline{\text{NonRep}\,\text{Rep}} - \text{NonRep}}{\left(10^{k} - 1\right)\cdot 10^{m}}$$
Worked example
Convert 0.1666… Here N = "1" (\(m = 1\)), R = "6" (\(k = 1\)), integer part 0. NR = 16, N = 1, so the fraction =
$$\frac{16 - 1}{\left(10 - 1\right)\cdot 10} = \frac{15}{90} = \frac{1}{6}$$The decimal value confirms \(1 \div 6 = 0.1666\ldots\)
Key Terms and Variables
| Term | Meaning |
|---|---|
| Repeating (recurring) decimal | A decimal whose digits eventually fall into a block that repeats forever, such as \(0.8\overline{3}\) or \(0.\overline{142857}\). Every repeating decimal equals some fraction of integers. |
| Terminating decimal | A decimal with finitely many digits, such as 0.375. It can be seen as a repeating decimal with repetend 0 (0.375000…) or, equivalently, with repetend 9 (0.374999…). |
| Period / repetend | The block of digits that repeats. In \(0.41\overline{6}\) the repetend is 6; in \(0.\overline{27}\) it is 27. |
| Period length \(k\) | How many digits are in the repetend. For \(1/7 = 0.\overline{142857}\), \(k = 6\). For a reduced fraction \(p/q\) with \(q\) coprime to 10, \(k\) is the multiplicative order of 10 modulo \(q\), and it never exceeds \(q - 1\). |
| Non-repeating (pre-period) digits, count \(m\) | The digits sitting between the decimal point and the start of the repetend. In \(0.41\overline{6}\), the pre-period is 41 and \(m = 2\). For a reduced fraction, \(m\) equals the larger of the exponents of 2 and 5 in the denominator. |
| Vinculum (bar notation) | The horizontal bar drawn over the repeating digits, as in \(0.\overline{45}\). Common alternatives are dots over the first and last repeating digit (\(0.\dot{4}\dot{5}\), usual in the UK) or an ellipsis, \(0.4545\ldots\). |
| Integer part | The whole-number portion to the left of the decimal point — the 2 in \(2.41\overline{6}\). It is set aside during the algebra and re-attached at the end. |
| Rational number | Any number expressible as \(p/q\) with integers \(p\) and \(q \neq 0\). A decimal expansion is rational exactly when it terminates or eventually repeats; non-repeating infinite expansions such as \(\pi\) are irrational. |
| Numerator / denominator | The top and bottom of a fraction: in \(5/12\), 5 is the numerator and 12 the denominator. |
| Simplest form (lowest terms) | A fraction whose numerator and denominator share no common factor greater than 1, so \(\gcd(p, q) = 1\). \(375/900\) is not in lowest terms; \(5/12\) is. |
| Greatest common divisor (GCD) | The largest integer dividing both numbers. Euclid's algorithm finds it by repeated remainders: \(\gcd(900, 375) = \gcd(375, 150) = \gcd(150, 75) = 75\). Dividing both parts by the GCD reduces the fraction in one step. |
| Mixed number | An integer plus a proper fraction, such as \(2\tfrac{5}{12}\), as opposed to the improper form \(29/12\). Both describe the same value. |
Why some fractions repeat and others do not. A fraction already written in lowest terms has a terminating decimal expansion if and only if its denominator's prime factorisation contains nothing but 2s and 5s — the prime factors of 10. So \(3/8\), \(7/20\) and \(1/50\) terminate, while \(1/3\), \(5/6\) and \(2/7\) must repeat, because their denominators carry a factor of 3 or 7. When both kinds of factor are present, as in \(12 = 2^2 \cdot 3\), the expansion has a pre-period (from the 2s and 5s) followed by a repeating block (from the rest) — which is precisely the \(m\) and \(k\) of \(5/12 = 0.41\overline{6}\).
FAQ
What about a pure repeating decimal like 0.333…? Leave the non-repeating field empty and enter 3 as the repeating digit: you get \(3/9 = 1/3\).
Can I convert a terminating decimal? Yes — leave the repeating field blank (or enter nothing) and put the digits in the non-repeating field; 0.25 becomes \(25/100 = 1/4\).
Does it work with an integer part? Yes. For 2.1666… enter 2, "1", and "6" to get \(13/6\).