Terminating Decimals Calculator

Calculate terminating decimals — enter your values and get an accurate result with the underlying formula.

Quick Facts

Termination rule
Denominator = 2^p × 5^q only
A reduced fraction's decimal terminates only if its denominator has no prime factors besides 2 and 5.
Decimal length
Places = max(p, q)
The number of digits after the decimal point equals the larger exponent of 2 or 5 in the denominator.
Otherwise
Repeats forever
Any other prime factor (3, 7, 11, ...) in the reduced denominator makes the decimal repeat, e.g. 1/3 = 0.(3).

Your Results

Calculated
Simplified Fraction
-
Numerator/denominator in lowest terms
Terminating or Repeating
-
Based on the reduced denominator's prime factors
Decimal Expansion
-
Repeating digits shown in parentheses
Decimal Places / Period
-
Digits after the point, or the repeat cycle length

Ready

Enter a numerator and denominator, then press Calculate.

Formula and Method for Terminating Decimals

A fraction a/b, once reduced to lowest terms, has a decimal expansion that terminates (ends after a finite number of digits) if and only if the reduced denominator b has no prime factors other than 2 and 5. Write the reduced denominator as b = 2^p × 5^q; the decimal terminates after exactly max(p, q) digits. If, after dividing out every factor of 2 and 5, anything other than 1 remains in the denominator, the decimal instead repeats forever, and long division reveals the repeating block.

How the calculation works

Enter a numerator and denominator. The calculator first reduces the fraction by dividing both by their greatest common divisor (GCD). It then strips all factors of 2 (counting p) and all factors of 5 (counting q) out of the reduced denominator. If nothing but 1 is left, the fraction terminates after max(p, q) decimal places — for example, 3/8 has denominator 2³, so it terminates after 3 places: 3/8 = 0.375. If a factor other than 2 or 5 remains, the calculator performs long division and tracks every remainder it sees; when a remainder repeats, the digits between the two occurrences form the repeating block, shown in parentheses (for example, 1/6 = 0.1(6), meaning 0.1666...).

Common mistakes

  • Not reducing the fraction first: the termination rule applies to the denominator in lowest terms. 6/15 looks like it has a factor of 3 in the denominator, but it reduces to 2/5, which terminates (0.4).
  • Forgetting the sign: a negative numerator or denominator only flips the sign of the result — it has no effect on whether the decimal terminates or repeats.
  • Assuming any small denominator terminates: denominators like 3, 6, 7, 9, 11, and 12 all contain a prime factor other than 2 or 5, so fractions like 1/3, 1/6, 1/7, 1/9, 1/11, and 1/12 all repeat, even though the numbers look simple.

Real-world applications

  • Currency and measurement conversions rely on terminating decimals (like 1/4 = 0.25) to avoid rounding error when splitting bills or measuring materials.
  • Teaching fraction-to-decimal conversion uses the 2-and-5 rule to predict, before dividing, whether a fraction will terminate or repeat.
  • Programming and floating-point analysis use the same rule to explain why fractions like 1/10 are exact in base 10 but not exact in binary floating point.
  • Number theory and cryptography use the related idea of the "period" of a repeating decimal, which equals the multiplicative order of 10 modulo the denominator's non-2, non-5 part.

Frequently Asked Questions

How do I know if a fraction's decimal terminates?
Reduce the fraction to lowest terms and factor the denominator. If the only prime factors are 2 and 5, the decimal terminates. If any other prime factor (3, 7, 11, and so on) remains, the decimal repeats forever.
How many decimal places will a terminating fraction have?
Write the reduced denominator as 2^p × 5^q. The decimal terminates after max(p, q) places. For example, 3/8 has denominator 2³, so it terminates after 3 places: 0.375.
What does it mean when a decimal repeats, and how is the period found?
If the reduced denominator has a prime factor other than 2 or 5, long division never reaches a remainder of 0 — the remainders eventually cycle, and the digits from that point repeat forever. The repeat length (period) equals the number of digits before the remainder pattern returns to a value it already had.
Why does 1/3 repeat but 1/4 terminate?
1/4 has denominator 4 = 2², which contains only the factor 2, so it terminates: 0.25. 1/3 has denominator 3, which is not 2 or 5, so long division never ends and the digit 3 repeats forever: 0.333... = 0.(3).