Turn a decimal into the exact fraction behind it, repeating ones included.
Decimal to an exact fraction
Repeating digits go in brackets.
0.375 for a terminating one. 0.1(6) means 0.1666… — the brackets are the overline.
0.1(6)
1/6
Exact — the infinite tail was cancelled algebraically, not rounded away.
Fraction
1/6
lowest terms
Mixed number
1/6
proper — no whole part
Before reducing
15/90
90 = 1 nine followed by 1 zero — one 9 for each repeating digit, one 0 for each digit before the repeat.
Read back
0.1(6)
identical to what was typed
The four lines that make it exact
1Name itx = 0.166…The dots mean the block goes on forever, which is why no finite fraction of tenths can be the answer.
2Multiply by 1010x = 1.66…Moves the point past the 1 digit that do not repeat.
3Multiply by 10^210^2x = 16.66…One whole block further, so the two tails line up exactly.
4Subtract(10^2 − 10)x = 16 − 1 = 15Every digit after the point is identical on both lines, so the whole infinite tail cancels. That is the trick, and it is exact rather than approximate.
5Dividex = 15/90
6Reduce15/90 ÷ 15 = 1/615 is the greatest common divisor, so this single division finishes it.
The subtraction is the whole idea: two lines whose decimal tails are identical, so subtracting removes the infinity entirely and leaves whole numbers.
Where that denominator comes from
90 = 1 nine followed by 1 zero — one 9 for each repeating digit, one 0 for each digit before the repeat.
After reducing, the denominator is 6 = 2 × 3. It still has a factor other than 2 and 5, which is exactly why the decimal repeats.
The answer was expanded back to a decimal and matched what you typed, digit for digit.
What this tool shows
Type the repeating digits in brackets — 0.1(6) means 0.1666… — and the answer is exact rather than approximate. The page also expands the answer back to a decimal and checks it against what you typed.
Terminating decimals by place value
Repeating decimals by the algebraic subtraction
A run-in before the repeat, handled properly
Why the denominator is nines and zeros
The reduction, with the divisor shown
The answer expanded back as a check
Repeating decimals, exactly The four algebra lines shown Answer expanded back and compared Reduced, with the divisor named
Exact conversion, checked by expanding the answer back.
Updated 7 September 2026 · Works in any browser, no installation
A terminating decimal is its digits over a power of ten: 0.375 is 375/1000, which reduces to 3/8. A repeating one needs the algebra: call it x, multiply by ten enough times to line up two copies of the repeating block, and subtract. The infinite tails are identical, so they cancel exactly — 0.1(6) becomes (16 − 1)/90, which is 15/90, which is 1/6.
At a glance
Formula shown
For a decimal with integer part I, non-repeating run-in R of length p and repeating block B of length q: value = I + (RB \u2212 R) / (10^p \u00d7 (10^q \u2212 1)). With no repeat, value = digits / 10^p.
Scenario support
Turning a measurement written as a decimal back into a fraction of an inch; giving an exact answer where a decimal was only ever an approximation; settling whether a recurring decimal is really the fraction someone claims.
Educational estimate
Planning support from the values you enter — not professional advice.
The repeating trick, in four lines
Take 0.1(6), meaning 0.1666… with the 6 going on forever. Call it x.
Multiply by 10 to get past the digit that does not repeat: 10x = 1.666…. Multiply by 10 again to shift exactly one block: 100x = 16.666…. Now subtract the first from the second. Every digit after the point is identical on both lines, so the entire infinite tail cancels and what remains is 90x = 15.
So x = 15/90 = 1/6. Exactly — not approximately, not to within some tolerance. The subtraction removed the infinity rather than truncating it, which is the difference between this and typing 0.166666 into a converter.
The tool shows those four lines with your own digits in them, which is the part worth copying into a homework answer.
Why nines and zeros
The denominator that comes out of that subtraction always has the same shape: one nine for every repeating digit, followed by one zero for every digit before the repeat.
0.(3) has one repeating digit and nothing before it, so the denominator is 9 — and the answer is 3/9 = 1/3. 0.(142857) has six, so it is 999999, and 142857/999999 reduces to 1/7. 0.58(3) has one repeating digit and two before it, so it is 900.
That rule is usually taught as a thing to memorise. It is not: it falls straight out of the subtraction, because 10ⁿ − 1 is a string of nines and multiplying by 10ᴵ adds the zeros. Seeing where it comes from is more use than remembering it.
Terminating decimals are easier
If the decimal stops, no algebra is needed. The last digit names the denominator: a digit in the thousandths column means the whole thing counts thousandths, so 0.375 is 375/1000.
What is left is reduction, and that is where the recognisable answer appears. 375 and 1000 share a factor of 125, so 375/1000 is 3/8. The page shows both the raw fraction and what it divided by.
A terminating decimal always reduces to a denominator built only from 2s and 5s, because it started as a power of ten and reduction can only remove factors. That is the same fact, read backwards, that decides which fractions terminate in the first place.
0.(9) really is 1
The argument people have about this is settled by the same four lines as everything else on this page. Let x = 0.999…. Then 10x = 9.999…, and subtracting gives 9x = 9, so x = 1.
Not “so close to 1 that it makes no difference”. Equal. 0.(9) and 1 are two ways of writing the same number, in the same way that 1/2 and 2/4 are.
Enter 0.(9) in the tool above and it returns 1, with the subtraction shown. It is the shortest honest answer to the question, and it is the same method that turns 0.(3) into a third — which almost nobody objects to, though it is exactly as surprising.
A rounded decimal cannot be undone
If you type 0.333333, this page will faithfully give you 333333/1000000, reduced. That is the exact fraction for the digits you entered, and it is not 1/3.
There is no way round this. A decimal that has already been rounded has lost information, and nothing can recover it — the same six digits could have come from 1/3, or from 333333/1000000, or from any number between them. Converters that guess 1/3 are guessing.
So if the number really does repeat, say so with brackets. The page tells you which happened: it expands its own answer back to a decimal and reports whether that matches what you typed.
Which decimals have nice fractions
Every terminating decimal, and every repeating one, is a fraction. That is the definition of a rational number, and this page will find it in every case.
What varies is how tidy the fraction looks. Denominators built from 2s and 5s give short decimals; a 3 or a 7 or an 11 in the denominator gives a repeat. 1/7 repeats after six digits, 1/3 after one, and 1/97 after ninety-six.
A decimal that neither stops nor repeats — π, or the square root of two — is not a fraction at all, and no amount of algebra will make it one. Typing its first few digits here will give you the exact fraction for those digits, which is a different number.
Sources and methodology
The identity behind the repeating case is standard; these set out where it and the notation come from.
Method. A terminating decimal is read as its digits over a power of ten and reduced. A repeating one is solved by the standard algebraic identity: multiply by 10^p to clear the run-in, multiply by 10^q more to shift exactly one block, then subtract — the two infinite tails are identical and cancel completely, leaving whole numbers. Nothing is rounded at any point, and the resulting fraction is expanded back to a decimal and compared with the input. That engine is verified on every change against 58 hand-written assertions, including that every one of eight thousand fractions expands to a decimal and reads back as the identical fraction, and that 0.(9) returns exactly 1. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Fraction to DecimalConvert a fraction to its exact decimal, with the length of the repeat worked out from the denominator before dividing and the long division shown remainder by remainder.
FractionAdd, subtract, multiply and divide fractions and mixed numbers exactly, with the least common denominator chosen, the cross-cancelling done first, and the true repeating decimal beside the answer.
Simplify FractionsReduce a fraction to lowest terms with both routes to the divisor shown side by side — Euclid line by line and the shared primes — and a stated proof when nothing can be cancelled.
Mixed NumberAdd, subtract, multiply and divide mixed numbers with the borrow shown where it happens, plus a second independent check worked through improper fractions.
Comparing FractionsOrder up to eight fractions with all three methods shown on your own numbers, and a figure for how many decimal places the closest pair need before they stop looking equal.
PercentageSolve X% of Y, what percent X is of Y, reverse percentage, increase/decrease, discounts, and tax, tip, or commission.
The other direction is on the Fraction to Decimal Calculator, which works out how long the repeat will be before it does any dividing. If what you have is already a fraction and you only want it reduced, the Simplify Fractions Calculator does that step with both routes to the divisor shown.
Educational use disclaimer
This is an educational tool. The conversion is exact for the digits you enter — but a decimal copied from a calculator display has usually already been rounded, and no method can recover what was thrown away.
Published the decimal to fraction page: repeating decimals are taken with the block in brackets and solved by the algebraic subtraction, so 0.1(6) returns exactly 1/6.
The denominator of nines and zeros is explained as a consequence of that subtraction rather than presented as a rule to memorise.
The answer is expanded back to a decimal and compared with the input, so a rounded decimal is reported as rounded instead of being silently guessed at.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.