Answered by David Joyce Ph.D. in Mathematics, University of Pennsylvania 1979
Case 1. The repetition begins immediately following the decimal point as in 0.142857142857142857. Typically, that is denoted with a bar over the repeating part with a repetition length of six. To write it as a fraction, use the six digits as a numerator and for the denominator use six nines.
142857/999999 = 1/7
Case 2. The repetition begins after a few digits as in 0.357142857. Convert the repeating part as described above and add that fraction into the non-repeating part. In this example the non-repeating part is 357/1000.
357 + 1/7 over 1000
That equals 2500/7000 = 5/14