Decimal to Fraction Calculator

Repeating Digits

For a repeating decimal such as 0.3333, choose how many trailing digits repeat (here, 1) to recover the exact fraction.

Fraction3/4
Numerator3
Denominator4

This converter turns a decimal number into its simplest equivalent fraction. For a terminating decimal it writes the digits over the matching power of ten and reduces by the greatest common divisor. For a repeating decimal you specify how many trailing digits repeat, and it applies the algebraic method to recover the exact fraction such as 1/3 or 5/6.

Formula

terminating: value = digits / 10ᵏ, then divide by gcd; repeating: subtract the shifted forms to clear the repeat

k
Number of decimal places
gcd
Greatest common divisor used to reduce the fraction

How it works

  1. Enter the decimal value. If it terminates (for example 0.75) leave the repeating-digits option on "None".
  2. For a terminating decimal the tool places the digits over 10, 100, 1000, … and divides numerator and denominator by their greatest common divisor to fully simplify.
  3. For a repeating decimal, pick how many trailing digits repeat; the calculator uses the standard 9s/0s method to convert the repeating block into an exact fraction.

Worked example

Convert the terminating decimal 0.625 to a fraction.

  1. Write the digits over a power of ten: 0.625 = 625/1000.
  2. The greatest common divisor of 625 and 1000 is 125.
  3. Divide both by 125: 625 ÷ 125 = 5 and 1000 ÷ 125 = 8.

0.625 = 5/8.

Frequently asked questions

How do I convert a repeating decimal like 0.3333…?
Enter 0.3333 and set the repeating-digits option to 1. The calculator treats the trailing 3 as the repeating block and applies the algebraic method, returning the exact fraction 1/3.
Is the resulting fraction always fully simplified?
Yes. After forming the raw fraction the calculator divides the numerator and denominator by their greatest common divisor, so the answer is always in lowest terms.
What about a decimal greater than 1, such as 2.25?
It is handled the same way. 2.25 becomes 225/100, which reduces to 9/4, and the result is also shown as the mixed number 2 1/4.
Why do I need to tell it how many digits repeat?
A typed decimal is finite, so the tool cannot know whether 0.3333 means exactly 0.3333 or the repeating 0.333… Specifying the repeating block length removes that ambiguity and lets it return the exact fraction.