J-Kit
Português

fraction to decimal with repeating

Fraction to Decimal — Repeating Decimal Detection

Every fraction a/b has either a terminating or repeating decimal. This tool detects the repeating block.

When does a fraction have a repeating decimal?

  • A fraction a/b (in lowest terms) has a terminating decimal if and only if the only prime factors of b are 2 and 5. Otherwise, it repeats.
  • 1/4 = 0.25 (terminating, since 4 = 2²). 1/3 = 0.3[3] (repeating, since 3 ≠ 2ⁿ × 5ᵐ).

Examples

Simple repeating

Input
1/3
Expected output
0.3[3]

The digit 3 repeats indefinitely.

Long period

Input
1/7
Expected output
0.[142857]

The block 142857 repeats.

Full tool FAQ

Simplifying means dividing both the numerator and denominator by their Greatest Common Divisor (GCD) until no integer greater than 1 divides both. The resulting fraction is equivalent but in its most reduced form.

Frequently asked questions

Does every fraction have a decimal representation?

Yes. Every rational fraction has either a terminating or repeating decimal.

Does this page replace official or professional review?

No. It helps explain the scenario and use the tool more safely, but real decisions should consider official sources, full context and qualified guidance when needed.