Repeating Decimal Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Split the decimal into its whole part, the digits that do not repeat and the block that repeats forever. The calculator returns the exact fraction, not a rounded one.
Result
Exact fraction (lowest terms)
Numerator
- Denominator
- Mixed number: whole part
- Mixed number: remaining numerator (over the same denominator)
- Decimal value (rounded to 4 places)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Whole number part (before the decimal point): enter a number from 0 to 1,000,000.
- Non-repeating digits after the point, as a whole number (0 if none): enter 0 or more.
- How many non-repeating digits (count leading zeros): enter a number from 0 to 10.
- Repeating block, as a whole number: enter 0 or more.
- How many digits in the repeating block (count leading zeros): enter a number from 1 to 10.
- Read the result: Exact fraction (lowest terms); the panel also shows Numerator, Denominator, Mixed number: whole part, Mixed number: remaining numerator (over the same denominator) and Decimal value (rounded to 4 places).
How this calculator works
Write x = I.A(B), with A the m non-repeating digits and B the k-digit repeating block. Then 10^(m+k)·x − 10^m·x removes the repeating tail, so x = I + (AB − A) ÷ (10^m × (10^k − 1)), where AB is A followed by B.
Example 0.1(6) = 0.1666…: AB = 16, A = 1, m = 1, k = 1, so the fraction is (16 − 1) ÷ (10 × 9) = 15/90 = 1/6.
The result is reduced to lowest terms by dividing numerator and denominator by their greatest common divisor.
Leading zeros matter: 0.0(5) has A = 0 with m = 1, and 0.(09) has B = 9 with k = 2. For a negative number, convert the positive value and put the minus sign in front.
Worked example
| Whole number part (before the decimal point) | 0 |
|---|---|
| Non-repeating digits after the point, as a whole number (0 if none) | 1 |
| How many non-repeating digits (count leading zeros) | 1 |
| Repeating block, as a whole number | 6 |
| How many digits in the repeating block (count leading zeros) | 1 |
| Exact fraction (lowest terms) | 1/6 |
|---|---|
| Numerator | 1 |
| Denominator | 6 |
| Mixed number: whole part | 0 |
| Mixed number: remaining numerator (over the same denominator) | 1 |
| Decimal value (rounded to 4 places) | 0.1667 |
Frequently asked questions
What is 0.333… as a fraction?
A = 0 with m = 0, B = 3 with k = 1: 3/9 = 1/3.
Why is 0.999… equal to 1?
With B = 9 and k = 1 the method gives 9/9 = 1. The two are the same number written two ways.
What is 2.142857142857… as a fraction?
Whole part 2 and repeating block 142857 (6 digits): 2 + 142857/999999 = 2 + 1/7 = 15/7.