How it’s calculated
Every repeating or ending decimal is a fraction. To convert a repeating decimal, write it as x, multiply by a power of 10 so the repeating block lines up, then subtract. The infinite tails cancel and you are left with a plain equation.
Example: x = 0.4(85) = 0.4858585… The non-repeating part has 1 digit and the block has 2 digits. Multiply by 10: 10x = 4.8585… Multiply by 1000: 1000x = 485.8585… Subtract: 990x = 485 − 4 = 481. So x = 481/990, which is already in lowest terms. Dividing 481 by 990 gives back 0.4(85).
Going the other way, a fraction in lowest terms has an ending decimal only when its denominator has no prime factors other than 2 and 5 (1/8 = 0.125). Otherwise it repeats, and the repeating block can never be longer than the denominator minus 1 (1/7 = 0.(142857) has 6 digits). The page shows the remainders from long division: once a remainder repeats, the digits repeat from there.
This is different from the long division calculator, which divides two whole numbers and shows the quotient and remainder. This one converts between repeating decimals and fractions, with the algebra written out.
Frequently asked questions
Is 0.999… really equal to 1?
Yes. Let x = 0.(9). Then 10x = 9.(9), and subtracting gives 9x = 9, so x = 1. The calculator shows this when you enter 0.(9).
How do I type a repeating decimal?
Put the repeating digits in brackets after the point and any non-repeating digits: 0.(3) for 0.333…, 0.1(6) for 0.1666…, 0.(142857) for 0.142857142857…
How do I write the repeating digits with a bar?
Textbooks draw a bar over the repeating digits. Type those digits in brackets instead; the meaning is the same.
Which fractions give ending decimals?
A fraction in lowest terms ends only if its denominator is made of 2s and 5s, such as 1/2, 3/8 or 7/20. Anything else, such as 1/3, 5/6 or 2/7, repeats.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Prealgebra 2e, §5.3 Decimals and Fractions (repeating decimals) — OpenStax
- Infinite Decimal Expansions (worked example 0.4(85) = 481/990) — LibreTexts Mathematics (Illustrative Mathematics, Grade 8)
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator