Terminating Decimal Calculator

Terminating Decimal Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

Numerator aDenominator b terminates⇔d=1where{g=gcd⁡(a,b)d=|b|g with all factors 2 and 5 removed\begin{gathered} \frac{{{\text{Numerator }a}}}{{{\text{Denominator }b}}} \text{ terminates} \iff d = 1 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} g &= \gcd\!\left(a,\ b\right) \\ d &= \frac{\left|b\right|}{g}\ \text{ with all factors }2\text{ and }5\text{ removed} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Decimal Value
0.35
This is a terminating decimal
Reduced fraction 7 / 20
Terminates? Yes
Reduced numerator 7
Reduced denominator 20

Report an error on this page

What Is a Terminating Decimal?

A terminating decimal is a decimal number that has a finite number of digits after the decimal point — for example 0.75 or 0.125. A repeating (non-terminating) decimal continues forever with a recurring block, such as 0.3333… or 0.142857142857…. This calculator takes any fraction a/b, computes its decimal value, and tells you whether that decimal terminates or repeats.

How to Use It

Enter the numerator (the top number, a) and the denominator (the bottom number, b). The tool reduces the fraction to lowest terms, evaluates the decimal, and reports whether it terminates. The denominator cannot be zero.

The Rule Explained

First reduce the fraction to lowest terms by dividing both numbers by their greatest common divisor (GCD). Then look only at the new denominator. A fraction in lowest terms produces a terminating decimal if and only if its denominator's only prime factors are 2 and 5. That is, the denominator must be writable as \(2^{m}\times 5^{n}\). Any other prime factor (3, 7, 11, …) forces the decimal to repeat.

$$\frac{\text{Numerator }a}{\text{Denominator }b} \text{ terminates} \iff \frac{b}{\gcd(a,b)} = 2^{m}\cdot 5^{n}$$
Advertisement
Flowchart deciding if a reduced fraction terminates based on its denominator's prime factors
A reduced fraction terminates only if its denominator factors into 2s and 5s.

Worked Example

Take 3/8. The GCD of 3 and 8 is 1, so it is already reduced. The denominator \(8 = 2^{3}\) has only the prime factor 2, so 3/8 terminates:

$$3 \div 8 = 0.375$$

By contrast, 1/6 reduces to 1/6; since \(6 = 2 \times 3\) contains the prime factor 3, it does not terminate — it equals 0.1666….

Prime factorization tree of a denominator showing only factors 2 and 5
When the denominator's prime factors are only 2 and 5, the decimal terminates.

More Worked Examples

Always reduce the fraction first. Only the reduced denominator decides the verdict: the decimal terminates exactly when that denominator has no prime factors other than 2 and 5.

Example 1: 9/12 (terminates only after reduction)

  1. GCD: \(\gcd(9,12)=3\).
  2. Reduce: \(\frac{9}{12}=\frac{9\div 3}{12\div 3}=\frac{3}{4}\).
  3. Factor the reduced denominator: \(4=2^{2}\), so it has only the prime 2.
  4. Verdict: terminating. Decimal: \(3\div 4=\)0.75, with \(\max(2,0)=2\) decimal digits.

Note that the original denominator \(12=2^{2}\cdot 3\) contains a 3. Judging by the unreduced fraction would wrongly suggest a repeating decimal.

Example 2: 7/20 (terminates)

  1. GCD: \(\gcd(7,20)=1\), so the fraction is already reduced.
  2. Factor: \(20=2^{2}\cdot 5^{1}\).
  3. Verdict: terminating, with \(\max(2,1)=2\) digits. Multiply top and bottom by 5 to reach a power of 10: \(\frac{7}{20}=\frac{7\cdot 5}{20\cdot 5}=\frac{35}{100}=\)0.35.

Example 3: 1/7 (repeating)

  1. GCD: \(\gcd(1,7)=1\); the fraction is already reduced.
  2. Factor: \(7\) is prime and is neither 2 nor 5.
  3. Verdict: repeating. Long division gives \(1\div 7=0.142857\,142857\ldots\), written 0.(142857).
  4. Period: the smallest \(k\) with \(10^{k}\equiv 1 \pmod 7\) is \(k=6\), so the repeating block has 6 digits.

Common Fractions: Terminating or Repeating

The table shows the fraction 1/d for each denominator d. Repeating digits are written in parentheses, so 0.(3) means 0.333… For another numerator, reduce first: if the numerator cancels every factor other than 2 and 5, the result can change (for example 3/12 = 1/4 terminates).

Denominator d Prime factorization Verdict for 1/d Decimal of 1/d Repeat period
2 2 Terminating 0.5 —
3 3 Repeating 0.(3) 1
4 2² Terminating 0.25 —
5 5 Terminating 0.2 —
6 2·3 Repeating (mixed) 0.1(6) 1
7 7 Repeating 0.(142857) 6
8 2³ Terminating 0.125 —
9 3² Repeating 0.(1) 1
10 2·5 Terminating 0.1 —
11 11 Repeating 0.(09) 2
12 2²·3 Repeating (mixed) 0.08(3) 1
13 13 Repeating 0.(076923) 6
14 2·7 Repeating (mixed) 0.0(714285) 6
15 3·5 Repeating (mixed) 0.0(6) 1
16 2⁴ Terminating 0.0625 —
17 17 Repeating 0.(0588235294117647) 16
18 2·3² Repeating (mixed) 0.0(5) 1
19 19 Repeating 0.(052631578947368421) 18
20 2²·5 Terminating 0.05 —
25 5² Terminating 0.04 —
40 2³·5 Terminating 0.025 —
50 2·5² Terminating 0.02 —
100 2²·5² Terminating 0.01 —
Advertisement

Interpreting Your Result

Terminating results

Write the reduced denominator as \(2^{m}\cdot 5^{n}\). The decimal then has exactly \(\max(m,n)\) digits after the decimal point, because you must multiply by \(10^{\max(m,n)}\) to turn the denominator into a power of 10. For example, \(\frac{3}{40}\) has \(40=2^{3}\cdot 5^{1}\), so \(\max(3,1)=3\) digits: \(0.075\).

Repeating results

If the reduced denominator is \(2^{m}\cdot 5^{n}\cdot q\) with \(q>1\) and \(\gcd(q,10)=1\), the decimal repeats. The period length depends only on \(q\): it is the multiplicative order of 10 modulo \(q\), meaning the smallest \(k\) with \(10^{k}\equiv 1 \pmod q\). By Euler's theorem this order always divides \(\varphi(q)\). For example, \(q=13\) has order 6, which divides \(\varphi(13)=12\); \(q=7\) has order 6 and \(q=17\) has order 16.

Pure versus mixed repeating decimals

  • Pure repeating: the denominator has no factor of 2 or 5 (\(m=n=0\)), so the repeat starts right after the decimal point. Example: \(\frac{1}{3}=0.\overline{3}\) and \(\frac{1}{7}=0.\overline{142857}\).
  • Mixed repeating: the denominator has both a factor of 2 or 5 and a factor \(q>1\). A non-repeating prefix of \(\max(m,n)\) digits comes first, then the block repeats. Example: \(\frac{1}{6}\) with \(6=2\cdot 3\) gives a 1-digit prefix and a period of 1: \(0.1666\ldots\). Likewise \(\frac{1}{12}=0.08333\ldots\) has a 2-digit prefix \(08\) and period 1.

In every case, a fraction that is not terminating still has a decimal expansion that repeats eventually, since a rational number never gives a non-repeating infinite decimal.

FAQ

Does the numerator affect whether it terminates? No. Only the reduced denominator's prime factors matter, though the numerator can change the GCD and thus the reduced denominator.

Is every fraction either terminating or repeating? Yes. Every rational number has a decimal expansion that either terminates or eventually repeats.

What about 10/4? It reduces to 5/2; the denominator 2 has only the factor 2, so it terminates: 2.5.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators