converting repeating decimals to fractions calculator

Repeating Decimal to Fraction Calculator

Enter a decimal value and use parentheses for repeating digits.

Tip: You can also enter whole numbers like 7 or repeating values like 12(45).
  • 0.(3) = 1/3
  • 1.2(34) = 611/495
  • 0.125 = 1/8

How to Convert Repeating Decimals to Fractions

Repeating decimals are decimals where one or more digits repeat forever. For example, 0.3333... can be written as 0.(3), and 1.272727... as 1.(27). Every repeating decimal can be written as an exact fraction.

This calculator automates the algebra: it builds the numerator and denominator, then reduces the fraction to lowest terms. That means you get an exact rational form, not a rounded approximation.

How to Use This Calculator

  • Type your decimal in the input field.
  • Use parentheses to mark repeating digits, like 0.(6) or 2.1(54).
  • Click Convert to Fraction.
  • Read the simplified fraction and review the conversion steps shown below it.

The Core Math Rule

Suppose a decimal has:

  • an integer part,
  • a non-repeating part with length m, and
  • a repeating part with length k.

Then we form two whole numbers by concatenating digits:

  • A = integer + non-repeating + repeating
  • B = integer + non-repeating

The fraction is:

(A - B) / (10m+k - 10m)

After that, reduce by dividing numerator and denominator by their greatest common divisor (GCD).

Worked Examples

Example 1: 0.(3)

Here, m = 0, k = 1. A = 3, B = 0. Fraction = (3 - 0) / (10 - 1) = 3/9 = 1/3.

Example 2: 1.2(34)

Integer = 1, non-repeating = 2, repeating = 34. A = 1234, B = 12. Fraction = (1234 - 12) / (103 - 101) = 1222/990 = 611/495.

Example 3: 0.125

This one is terminating, not repeating. Write as 125/1000 and simplify: 1/8.

Why Fractions Are Better for Exact Values

Repeating decimals are infinite strings of digits, but fractions are compact and exact. If you are solving algebra problems, checking calculator output, or doing programming with rational numbers, fractions avoid rounding drift and preserve precision.

Common Input Mistakes

  • Forgetting parentheses around repeating digits (use 0.(142857)).
  • Adding extra symbols or spaces in the middle of numbers.
  • Using commas as decimal separators instead of a period.

FAQ

Can negative repeating decimals be converted?

Yes. Example: -0.1(6) converts exactly to -1/6.

What if the repeating part is zero?

If the repeating block is all zeros, the number is treated as a terminating decimal.

Does this tool simplify automatically?

Yes. Every result is reduced to lowest terms before display.

🔗 Related Calculators