Terminating Decimals Calculator
Enter a fraction to find out whether it produces a terminating decimal (one that ends) or a repeating decimal (one that cycles forever). The calculator simplifies the fraction, factors the denominator, and shows the full decimal expansion with any repeating block clearly marked. Step-by-step working explains the reasoning at each stage.
What is a terminating decimal?
A terminating decimal is a decimal number that has a finite number of digits after the decimal point. In other words, it ends. Examples include 0.5, 0.25, and 0.125. Every terminating decimal can be written as an exact fraction with a denominator that is a power of 10 (10, 100, 1000, and so on). For example, 0.375 = 375/1000. By contrast, a repeating decimal has one or more digits that cycle endlessly, such as 0.333... or 0.142857142857...
The prime factorisation rule
The key insight for deciding whether a fraction terminates comes from the prime factorisation of its denominator. First simplify the fraction to lowest terms by dividing numerator and denominator by their greatest common divisor (GCD). Then factorise the simplified denominator into primes. If every prime factor is either 2 or 5, the fraction will always produce a terminating decimal. If the denominator contains any other prime (3, 7, 11, 13, and so on), the decimal will repeat forever. This rule works because the decimal system is base 10, and 10 = 2 x 5. Denominators made up only of factors of 2 and 5 can always be scaled up to a power of 10 exactly.
How to convert a fraction to a decimal by long division
Divide the numerator by the denominator using standard long division. Keep a record of each remainder you get. If you reach a remainder of zero, the decimal terminates. If you see a remainder you have already seen before, the decimal is repeating: the point at which the earlier remainder first appeared marks the start of the repeating block, and the digits from there to the current step form the repeating cycle. For example, 1 / 7: remainders cycle through 1, 3, 2, 6, 4, 5, 1, and when 1 appears again the cycle repeats, giving 0.(142857) with a 6-digit period.
Converting a repeating decimal back to a fraction
Let x represent the repeating decimal. If the repeat starts immediately after the decimal point (purely repeating), multiply both sides by 10^n where n is the length of the repeating block, then subtract x from 10^n * x. The repeating parts cancel and you solve for x as a fraction. For mixed decimals (some non-repeating digits before the repeat), multiply by the appropriate power of 10 to shift past the non-repeating part first, then apply the same subtraction. For example, x = 0.(3): 10x = 3.(3), so 10x - x = 3, giving 9x = 3 and x = 1/3.
Common fractions: terminating vs repeating
| Fraction | Simplified | Decimal | Type |
|---|---|---|---|
| 1/2 | 1/2 | 0.5 | Terminating |
| 1/3 | 1/3 | 0.(3) | Repeating |
| 1/4 | 1/4 | 0.25 | Terminating |
| 1/5 | 1/5 | 0.2 | Terminating |
| 1/6 | 1/6 | 0.1(6) | Repeating |
| 1/7 | 1/7 | 0.(142857) | Repeating |
| 1/8 | 1/8 | 0.125 | Terminating |
| 1/9 | 1/9 | 0.(1) | Repeating |
| 1/10 | 1/10 | 0.1 | Terminating |
| 2/3 | 2/3 | 0.(6) | Repeating |
| 3/4 | 3/4 | 0.75 | Terminating |
| 2/5 | 2/5 | 0.4 | Terminating |
| 5/6 | 5/6 | 0.8(3) | Repeating |
| 7/8 | 7/8 | 0.875 | Terminating |
| 4/9 | 4/9 | 0.(4) | Repeating |
| 3/16 | 3/16 | 0.1875 | Terminating |
| 1/11 | 1/11 | 0.(09) | Repeating |
| 5/12 | 5/12 | 0.41(6) | Repeating |
A fraction terminates if and only if its simplified denominator has no prime factors other than 2 and 5.
Frequently asked questions
How do I know if a decimal terminates without dividing?
Write the number as a fraction and simplify it to lowest terms. Then factorise the denominator. If the only prime factors are 2 and/or 5, the decimal terminates. You never need to do any division at all - the denominator test is enough.
Is every terminating decimal a rational number?
Yes. Any number that can be written as a fraction of two integers (with a non-zero denominator) is rational, and terminating decimals always can be: just use the decimal digits as the numerator and the appropriate power of 10 as the denominator. Repeating decimals are also rational for the same reason. Irrational numbers, such as pi or the square root of 2, are neither terminating nor repeating.
Why does 1/3 repeat but 1/4 terminate?
1/4 simplifies to 1/4 and the denominator 4 = 2 x 2, so only the prime factor 2 appears - it terminates (0.25). 1/3 has denominator 3, which is a prime other than 2 or 5, so it repeats: 0.(3).
Can a fraction with a large denominator still terminate?
Absolutely. 3/16 terminates because 16 = 2^4, which only has 2 as a prime factor, giving 0.1875. On the other hand, 1/6 has denominator 6 = 2 x 3, and because 3 is present, it repeats. The size of the denominator does not matter - only its prime factors do.
What does the length of the repeating block depend on?
For a fraction p/q in lowest terms where q has a prime factor other than 2 or 5, the length of the repeating block (called the period) is the smallest positive integer k such that 10^k is congruent to 1 modulo the "odd-and-not-five" part of q. For example, 1/7 has period 6 because 10^6 = 1000000 = 142857 x 7 + 1, and no smaller power works. This is related to the order of 10 in modular arithmetic modulo the prime factors of the denominator.
Does a negative fraction behave differently?
No. The sign does not affect whether the decimal terminates or repeats. Negative fractions such as -3/8 terminate (-0.375) or repeat (-0.(6) for -2/3) in exactly the same way their positive counterparts do. The prime factorisation rule applies to the absolute value of the denominator.