Decimal to Fraction Calculator

Turn a decimal into a fraction, including repeating decimals.

Put a repeating part in brackets: 0.1(6) is 0.1666…

Try

Result

You entered1.142857‾1.\overline{142857}

87\displaystyle \frac{8}{7}

Fraction

87\displaystyle \frac{8}{7}

Mixed number

117\displaystyle 1\frac{1}{7}

Decimal

1.142857‾\displaystyle 1.\overline{142857}

Percent

114.2857%\displaystyle 114.2857\%
Show the work
  1. Recurring decimal

    Let xx be the value of the decimal; the bar marks the digits that repeat forever.

    x=1.142857‾x = 1.\overline{142857}
  2. Multiplying by a power of 10

    Multiplying by 106=100000010^{6} = 1000000 moves the decimal point 6 places right, so the repeating block starts just after the point.

    1000000x=1142857.142857‾1000000x = 1142857.\overline{142857}
  3. Subtracting the shifted decimals

    Subtract xx from both sides: the two repeating tails are identical and cancel, leaving a whole number. Here n=0n = 0 is the number of non-repeating digits and r=6r = 6 is the length of the repeating block.

    Using 10n+rx−10nx=(10n+r−10n)x10^{n+r}x - 10^{n}x = \left(10^{n+r} - 10^{n}\right)x

    1000000x−x=999999x=1142856\begin{aligned} 1000000x - x &= 999999x \\ &= 1142856 \end{aligned}
  4. Lowest terms

    The equation gives x=abx = \frac{a}{b} with a=1142856a = 1142856 and b=999999b = 999999; divide both by their highest common factor g=142857g = 142857.

    Using x=ab=a÷gb÷gx = \frac{a}{b} = \frac{a \div g}{b \div g}

    x=1142856999999=87\begin{aligned} x &= \frac{1142856}{999999} \\ &= \frac{8}{7} \end{aligned}
  5. Result

    So the decimal as a fraction is 87\frac{8}{7}.

Worked examples