Skip to content
Math

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.

Your details

The top number of the fraction.
The bottom number of the fraction. Must be a positive integer (not zero).
Decimal typeTerminating
Terminating

Whether the decimal terminates or repeats

Decimal expansion0.375
Simplified fraction3/8
Denominator prime factors2 x 2 x 2
Repeating block length0
Repeating digits (0 = terminates)0

3/8 is a terminating decimal.

  • The simplified denominator (8) has only the prime factors 2 and/or 5, so the decimal always ends.
  • Decimal value: 0.375
  • The decimal has 3 digits after the decimal point.
  • Simplified fraction: 3/8. Prime factorisation of denominator: 2 x 2 x 2.

Next stepTerminating decimals can be written as exact fractions with denominators that are powers of 10.

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

FractionSimplifiedDecimalType
1/21/20.5Terminating
1/31/30.(3)Repeating
1/41/40.25Terminating
1/51/50.2Terminating
1/61/60.1(6)Repeating
1/71/70.(142857)Repeating
1/81/80.125Terminating
1/91/90.(1)Repeating
1/101/100.1Terminating
2/32/30.(6)Repeating
3/43/40.75Terminating
2/52/50.4Terminating
5/65/60.8(3)Repeating
7/87/80.875Terminating
4/94/90.(4)Repeating
3/163/160.1875Terminating
1/111/110.(09)Repeating
5/125/120.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.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…