🧮
🧮 Math & statistics

Decimal to Fraction Converter (incl. repeating)

Results update as you type.

Your numbers

Understanding the decimal to fraction converter — concept and principle

This converter turns a decimal into an exact fraction in lowest terms. It handles terminating decimals such as 0.375 and repeating decimals such as 0.1666… (enter 0.1 and the repeating digit 6). It is useful for checking textbook answers, converting measurements to fractional inches, and getting the exact rational value behind a rounded number.

0.375 converted to 3/80.375 has three decimal digits, so it equals 375/1000; dividing by the GCD 125 gives 3/8, which is three of eight pieces of 0.125.Turning 0.375 into a fraction0.3753 digits after the point375 / 1000write over 10³ = 10003 / 8÷ 125 (GCD) top and bottom3 of 8 equal pieces = 0.3750.125
Each eighth is 0.125, and three of them make 0.375.

How it is calculated

Terminating decimals. If x has d digits after the point, write it over 10^d and reduce:

x = N / 10^d, where N = x × 10^d, then divide N and 10^d by their GCD.

Repeating decimals. Enter the non-repeating part as x (with d decimal digits) and the repeating block R (k digits). Let M = x × 10^d. Then

fraction = (M × 10^k + R − M) / (10^d × (10^k − 1)), reduced by the GCD.

Setting the repeating field to 0 means the decimal terminates.

The principle

A terminating decimal is already a fraction with a power-of-ten denominator: 0.375 means 375 thousandths. Reducing removes the common factors of 2 and 5. For a repeating decimal, shifting it by 10^k lines up the repeating tails, and subtracting cancels them. For example, if y = 0.1666…, then 100y = 16.666… and 10y = 1.666…, so 90y = 15 and y = 15/90 = 1/6. The general formula is that subtraction written once for any d and k. This also shows why every repeating decimal is a rational number.

Worked example

  1. Inputs: decimal 0.375, repeating digits 0 (terminating).
  2. There are 3 decimal digits, so x = 375 / 1000.
  3. GCD(375, 1000) = 125.
  4. 375 ÷ 125 = 3 and 1000 ÷ 125 = 8.
  5. Result: 3/8.

How to read the result

The fraction is exact. Its denominator tells you about the decimal: a reduced fraction terminates only when the denominator has no prime factors other than 2 and 5 (8 = 2³, so 3/8 terminates). A denominator containing 3, 7, 11 or other primes produces a repeating decimal. Denominators made of 9s, such as 1/9 or 1/99, reveal a pure repeating pattern.

Common mistakes

Keep in mind: Very long inputs exceed the precision of standard floating-point numbers, so results for more than about 15 significant digits may be inaccurate.

Frequently asked questions

Is 0.999… really equal to 1?

Yes. With x = 0 and repeating digit 9 the formula gives 9/9 = 1. The two notations name the same number.

How do I convert a mixed decimal like 2.75?

It becomes 275/100 = 11/4, or the mixed number 2 3/4.

Can every decimal be written as a fraction?

Every terminating or repeating decimal can. Irrational numbers such as π have non-repeating, non-ending decimals and have no exact fraction.

Sources: G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Chapter 9 (decimal representation of numbers)

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →