Home / Blog / Math & Scientific

Math & Scientific

Convert a Repeating Decimal to an Exact Fraction

Turn repeating decimals into exact fractions by aligning and subtracting repeated digits, including mixed non-repeating prefixes and verification.

Convert a Repeating Decimal to an Exact Fraction

Identify the repeating block

A repeating decimal has a finite block of digits that continues forever. Write which digits repeat before calculating. The notation 0.333... means that 3 repeats indefinitely, while the finite input 0.333 has only three decimal places. Their exact fractions are different: 1/3 versus 333/1000. A calculator cannot infer an infinite repetition from a few entered digits without an explicit notation or mode. If your source uses an overbar, copy its start and end positions accurately; moving the bar changes the number.

Convert one repeating digit

Let x = 0.777... . Multiplying by ten shifts one copy of the repeating digit left: 10x = 7.777... . Subtract the first equation from the second. The infinite decimal tails align and cancel, leaving 9x = 7. Therefore x = 7/9. The same reasoning gives 0.222... = 2/9 and 0.999... = 1. The last equality is exact in the real numbers. It is not a rounding shortcut or a claim that an indefinitely long finite string has a final digit.

Convert a longer block

For x = 0.272727..., two digits repeat, so multiply by 100. Then 100x = 27.272727... and subtraction gives 99x = 27. Reduce 27/99 by dividing numerator and denominator by nine: the answer is 3/11. For a repeating block of k digits beginning immediately after the decimal point, put the block's integer value over 10^k-1, then simplify. Leading zeroes in the block still count toward its length: 0.030303... equals 3/99, or 1/33, rather than 3/9.

Separate a non-repeating prefix

Consider x = 0.1666..., where only 6 repeats. Multiply by ten to obtain 10x = 1.666... . Multiply the original by one hundred to obtain 100x = 16.666... . Subtract these aligned equations: 90x = 15, so x = 15/90 = 1/6. Subtracting x directly from 100x would not align the non-repeating prefix in the same convenient way. Count the non-repeating digits first, shift past them, then make a second shift by the length of the repeating block.

Use the general subtraction rule

If m non-repeating decimal digits are followed by a repeating block of k digits, the denominator before simplification is 10^m(10^k-1). The numerator is the integer formed by the non-repeating prefix plus one repeat block, minus the integer formed by the prefix alone. For 0.1252525..., m=1 and k=2. The numerator is 125-1=124, and the denominator is 10×99=990. Simplifying gives 62/495. This rule is simply the two shifted equations written compactly, so it works even when either block contains zeroes.

Include whole numbers and signs

For 2.272727..., convert the repeating fractional part to 3/11 and add the whole number: 2 + 3/11 = 25/11. For -0.1666..., perform the positive conversion and restore the negative sign to obtain -1/6. Keep that sign outside the repeating block when writing the algebra. To verify 62/495, perform long division or multiply the proposed fraction by the denominator after using the shifted-equation identity. A rounded decimal display can provide a quick pattern check but cannot by itself prove the repetition continues forever.

Use the on-site tools within their scope

The linked decimal-to-fraction calculator preserves the exact finite decimal you enter. Typing 0.1666 therefore asks for 833/5000, not 1/6. Use the algebra above for repeating decimals, then use the Fraction Calculator to simplify or compare the resulting rational numbers. When copying a decimal from a measurement, do not assume an apparent repeated digit represents an exact repeating value. Measurements have uncertainty and finite precision. State whether the source number is a defined mathematical decimal or a rounded observation before deciding what exact fraction would mean.

A compact verification record

For a written solution, keep the original repeating notation, the two multiplied equations, the subtraction step and the reduced fraction together. This makes the exact interpretation visible even when a later calculator displays only a rounded decimal.

Use the Decimal to Fraction Calculator

Open Decimal to Fraction Calculator

Source and scope

OpenStax decimals and fractions