Decimal to Fraction Calculator

Convert any decimal to a fraction or mixed number in lowest terms — including repeating decimals like 0.333… — with full step-by-step working.

Loading calculator…

How to use this calculator

Type the decimal in the first box — whole numbers (5), plain decimals (1.625), leading-dot decimals (.5), and negatives (-0.75) all work. If the decimal repeats forever, enter how many of its last digits repeat in the second box: 1.83 with 1 repeating digit means 1.83=1.83331.8\overline{3} = 1.8333…, and 0.36 with 2 means 0.36=0.3636360.\overline{36} = 0.363636…. Leave it at 0 for an ordinary terminating decimal.

The answer shows the fraction in lowest terms (plus the mixed-number form when it's improper), with every step of the working underneath.

Tip: Type the digits of one full repeating block and set the counter to that block's length. For 0.727272… enter 0.72 with 2 repeating digits — you don't need to type the block twice.

Terminating decimals — the four-step method

  1. Write the decimal over 1. 1.625/1.
  2. Multiply top and bottom by 10x10^x, where xx is the number of digits after the decimal point. 1.625 has three, so multiply by 1000: 16251000\frac{1625}{1000}.
  3. Reduce by the GCD. gcd(1625,1000)=125\gcd(1625, 1000) = 125, giving 138\frac{13}{8}.
  4. Convert to a mixed number if the fraction is improper: 138=158\frac{13}{8} = 1\frac{5}{8}.

This calculator does all of this with exact big-integer arithmetic — no floating-point rounding, no matter how many digits you enter.

Repeating decimals — the two-equation method

The trick: build two copies of the number whose repeating tails line up, then subtract so the tails cancel.

For x=1.83x = 1.8\overline{3} (enter 1.83, repeating digits 1):

  1. Multiply by 10 so the repeat starts at the point: 10x=18.310x = 18.\overline{3} — equation 1.
  2. Multiply by 10 once more (one full block): 100x=183.3100x = 183.\overline{3} — equation 2.
  3. Subtract: 90x=18318=16590x = 183 - 18 = 165.
  4. Solve and reduce: x=16590=116=156x = \frac{165}{90} = \frac{11}{6} = 1\frac{5}{6}.
Tip: The denominator before reducing is always made of nines followed by zeros: one 9 per repeating digit, one 0 per non-repeating decimal digit. 0.360.\overline{36} gives 99; 1.831.8\overline{3} gives 90.

Worked examples

Example 1 — terminating: 2.625

26251000\frac{2625}{1000}, gcd=125\gcd = 125218=258\frac{21}{8} = 2\frac{5}{8}.

Example 2 — repeating from the point: 2.666…

Enter 2.666 with 3 repeating digits. 1000xx=266621000x - x = 2666 - 2, so 999x=2664999x = 2664 and x=2664999=83=223x = \frac{2664}{999} = \frac{8}{3} = 2\frac{2}{3}.

Example 3 — mixed repeat: 0.3636…

Enter 0.36 with 2 repeating digits. 100xx=360100x - x = 36 - 0, so 99x=3699x = 36 and x=3699=411x = \frac{36}{99} = \frac{4}{11}.

Common decimals as fractions

DecimalFraction
0.1251/8
0.21/5
0.251/4
0.333… (3 repeating)1/3
0.51/2
0.6255/8
0.666… (6 repeating)2/3
0.753/4

Frequently asked questions

How do you convert a decimal to a fraction?
Four steps: write the decimal over 1, multiply top and bottom by 10 for every digit after the decimal point, reduce by the greatest common divisor, and convert to a mixed number if the fraction is improper. For 1.625: 16251000\frac{1625}{1000} reduces by 125 to 138=158\frac{13}{8} = 1\frac{5}{8}.
What is 0.625 as a fraction?
0.625 = 58\frac{5}{8}. Write 6251000\frac{625}{1000}, then divide both numbers by their GCD 125: 625÷125=5625 \div 125 = 5 and 1000÷125=81000 \div 125 = 8.
How do you turn a repeating decimal like 0.333… into a fraction?
Set x=0.333x = 0.333… and multiply by 10: 10x=3.33310x = 3.333…. Subtract the first equation from the second — the repeating tails cancel: 9x=39x = 3, so x=39=13x = \frac{3}{9} = \frac{1}{3}. Enter 0.3 with 1 repeating digit in this calculator to see it worked out.
What is 0.1666… (6 repeating) as a fraction?
It equals 16\frac{1}{6}. With x=0.16x = 0.1\overline{6}: 10x=1.610x = 1.\overline{6} and 100x=16.6100x = 16.\overline{6}. Subtracting gives 90x=1590x = 15, so x=1590=16x = \frac{15}{90} = \frac{1}{6}.
Does 0.999… really equal 1?
Yes — exactly, not approximately. With x=0.9x = 0.\overline{9}: 10x=9.910x = 9.\overline{9}, subtract to get 9x=99x = 9, so x=1x = 1. Try 0.9 with 1 repeating digit and the calculator returns the whole number 1.
Why does typing 0.333 give 333/1000 instead of 1/3?
Because 0.333 as written is a terminating decimal — exactly 333 thousandths. Only the infinite repeating decimal 0.333… equals 13\frac{1}{3}. Set the repeating-digits field to 1 to tell the calculator the 3 repeats forever.
Can I convert a negative decimal to a fraction?
Yes. The sign passes straight through: convert the positive value, then attach the minus sign. 1.625=138=158-1.625 = -\frac{13}{8} = -1\frac{5}{8}.
What is a terminating vs a repeating decimal?
A terminating decimal ends after a finite number of digits (0.75). A repeating decimal has a block of digits that recurs forever (0.727272…). Both are rational, so both convert to exact fractions — but the methods differ, which is why this calculator asks how many trailing digits repeat.

Related calculators