Intermediate

Terminating Decimals Calculator — Does a Fraction Repeat?

Enter any fraction p/q to instantly find out whether its decimal expansion terminates (like ¼ = 0.25) or repeats forever (like ⅓ = 0.(3)). The calculator simplifies the fraction, explains the divisibility rule for termination, shows the full decimal expansion with the repeating block in parentheses, and gives the period length.
Positive or negative integer
Non-zero integer (1–999 999)
Repeating decimal
0.(142857)
Terminates?
No
Simplified fraction
1/7
Repeating period length
6
Decimal value
0.142857
Why does this fraction terminate or repeat?
1

Simplify the fraction using GCD

GCD(1, 7) = 1 → 1/7 = 1/7
2

Factor the reduced denominator

7 has prime factor 7 → repeating
=

Long division reveals a repeating cycle

0.(142857)
14%
86%
1/7
remainder
Fraction as proportion of the whole
-1-0.6-0.30.10.50.91.31.620.(142857)Value on the number line
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

A fraction p/q terminates if and only if the reduced denominator has no prime factors besides 2 and 5. Otherwise it repeats forever with a cycle length (period) equal to the order of 10 mod the reduced denominator. Enter any fraction to see whether it terminates, and to get the full decimal expansion with the repeating block shown in parentheses.

Formula
p/q terminates ⟺ the reduced denominator has only 2s and 5s as prime factors • Period length = multiplicative order of 10 mod q_reduced
How this is calculated

A fraction p/q in lowest terms has a terminating decimal expansion if and only if the denominator q has no prime factors other than 2 and 5. Fractions with denominators like 2, 4, 5, 8, 10, 16, 20, 25 — all of which divide some power of 10 — terminate. Fractions with any other prime in the denominator (3, 7, 11, 13, …) produce a repeating decimal, because 10^n is never divisible by those primes no matter how large n is.

The length of the repeating cycle (period) equals the smallest positive integer k such that 10^k ≡ 1 (mod q_reduced), where q_reduced is the denominator after removing all factors of 2 and 5. For example, 1/7 has period 6 because 10⁶ ≡ 1 (mod 7); you can verify this from the repeating block 142857. This calculator finds the cycle via long division — tracking which remainders have been seen before — which is both the algorithm students learn and the most reliable method for arbitrary denominators.

The result is exact for denominators up to 999,999. For very large denominators the period can be long (up to q−1 digits), so the output is capped at 40 displayed digits to keep the result readable.

Frequently asked questions

1/4 = 1/2² — the denominator in lowest terms is a pure power of 2, so it divides 10² = 100; hence 1/4 = 25/100 = 0.25 exactly. 1/3 has the prime factor 3 in the denominator, and 10^n is never divisible by 3, so the long-division remainder cycles: 10/3 = 3 rem 1, 10/3 again → same remainder → repeating block '3' of length 1.

For a prime denominator p (with 2 and 5 removed), the period divides p−1. The maximum is p−1, achieved when 10 is a primitive root mod p. For example, 1/7 has period 6 (= 7−1), 1/17 has period 16 (= 17−1). For composite denominators the period divides the LCM of the periods of the prime-power factors.

Yes. Let x = 0.(9); then 10x = 9.(9); subtracting gives 9x = 9, so x = 1. Alternatively, 1/3 = 0.(3), so 3 × 1/3 = 1 and 3 × 0.(3) = 0.(9), confirming 0.(9) = 1. This is not an approximation — it's an exact equality that follows from the definition of a limit.

Also known as

does fraction terminate or repeat
terminating decimal checker
repeating decimal calculator
fraction to decimal expansion
recurring decimal period length
fraction terminates or repeats
decimal expansion of fraction
repeating decimal pattern finder

APA

TG we-Calculate Editorial Team. (2026). Terminating Decimals Calculator — Does a Fraction Repeat? [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/terminating-decimals-calculator

Chicago

TG we-Calculate Editorial Team. "Terminating Decimals Calculator — Does a Fraction Repeat?." TG we-Calculate. 2026. https://we-calculate.com/calculator/terminating-decimals-calculator.

IEEE

TG we-Calculate Editorial Team, "Terminating Decimals Calculator — Does a Fraction Repeat?," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/terminating-decimals-calculator

BibTeX

@misc{wecalculate_terminating_decimals_calculator, title = {Terminating Decimals Calculator — Does a Fraction Repeat?}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/terminating-decimals-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?