Write the fraction in simplest form and look at the denominator. If its only prime factors are 2s and 5s (like 2, 4, 5, 8, 10, 16, 20, 25, 40, 50), the decimal terminates. If it has any other prime factor (like 3, 7 or 11), the decimal repeats. 3/8 terminates (8 = 2 × 2 × 2); 5/6 repeats (6 = 2 × 3).