repeating decimal into fraction calculator

Tip: You can enter repeating and non-repeating decimals. The calculator always returns the simplified fraction.
  • 0.(3) → 1/3
  • 1.2(34) → 611/495
  • -2.41(6) → -29/12

How this repeating decimal into fraction calculator works

A repeating decimal is any decimal number with one or more digits that repeat forever. Common examples include 0.(3), 0.1(6), and 2.(142857). This calculator converts those decimals into exact fractions, then simplifies the result using the greatest common divisor (GCD).

You can also enter terminating decimals like 0.125 or whole numbers like 7. The tool handles all of them and gives you a clean fractional form.

Accepted input formats

  • Pure repeating: 0.(3), 2.(7), .(45)
  • Mixed decimal (non-repeating + repeating): 1.2(34), -5.08(12)
  • Terminating decimals: 0.125, 3.75
  • Whole numbers: 4, -11

The math behind converting repeating decimals

Method idea (algebra subtraction)

Suppose x = 0.1(6). Then the repeating block has length 1, and there is 1 non-repeating digit.

  • 10x = 1.666...
  • 100x = 16.666...
  • 100x - 10x = 15
  • 90x = 15
  • x = 15/90 = 1/6

General formula

Let the number be made of:

  • Integer part: I
  • Non-repeating decimal digits: N with length m
  • Repeating block: R with length n

Then:

numerator = I·10m(10n−1) + N(10n−1) + R
denominator = 10m(10n−1)

After that, reduce numerator and denominator by their GCD.

Why this calculator is useful

Converting repeating decimals to fractions is common in algebra, standardized tests, and science coursework. Fractions are exact values, while rounded decimals can introduce tiny errors in long calculations. If you're solving equations, simplifying ratios, or checking homework, using exact fractions is often the best approach.

Common mistakes to avoid

  • Forgetting parentheses around repeating digits. Write 0.1(6), not 0.1666.
  • Confusing terminating decimals with repeating ones.
  • Not simplifying the final fraction.
  • Dropping a negative sign during conversion.

Quick examples

  • 0.(9) = 1
  • 0.(27) = 27/99 = 3/11
  • 3.1(2) = 281/90
  • -0.(45) = -45/99 = -5/11

FAQ

Can this calculator handle long repeating blocks?

Yes. It uses integer math (BigInt), so it can safely process long digit strings without floating-point rounding issues.

Does it simplify automatically?

Yes. Every result is reduced to lowest terms.

Can I use it for non-repeating decimals too?

Absolutely. Terminating decimals are converted the same way and simplified.

🔗 Related Calculators