Free online tools
English EN, Choose a language

Decimal to fraction calculator

Convert a decimal to a fraction in lowest terms, including repeating decimals like 0.333…, or find the closest simple fraction.

Repeating decimals: put the repeating digits in brackets, 0.1(6), or type at least two copies then dots, 0.1666...

Fraction

—

Type a decimal to see it as a fraction.

Runs in your browser. Nothing you type is sent.

Related tools

All calculators →

How to use the decimal to fraction calculator

Type a decimal such as 0.375 and the fraction in lowest terms appears at once, with the working underneath. For a repeating decimal put the repeating digits in brackets, 0.1(6), or type at least two copies of them followed by three dots, 0.1666.... Tick “closest fraction” and set a largest denominator to get a simple approximation, for example to turn 3.14159 into a fraction with a denominator under 1,000. The table of closest simple fractions lists the best approximations in order, each one closer than any fraction with a smaller denominator. Nothing you type is sent anywhere.

How to convert a decimal to a fraction

Count the decimal places, write the digits over 1 followed by that many zeros, then simplify by dividing top and bottom by their greatest common factor:

  1. 0.375 has 3 decimal places, so write it over 10 to the power 3: 0.375 = 375/1,000.
  2. Simplify: the greatest common factor of 375 and 1,000 is 125, so the fraction is 3/8.

So 0.375 = 3/8. A decimal with a whole part works the same way: 2.45 = 49/20, which is 2 9/20 as a mixed number. The GCF calculator shows how the greatest common factor is found.

Repeating decimal to fraction

A repeating decimal is also exactly a fraction. The classic trick for 0.333… is to call it x, multiply by 10 to get 10x = 3.333…, and subtract: 9x = 3, so x = 3/9 = 1/3. The general rule packs that into one formula: subtract the digits before the repeating block from the digits up to the end of the first block, and divide by a number made of one 9 per repeating digit followed by one 0 per non-repeating decimal digit.

  1. In 0.1(6) the block 6 repeats. Repeating digits: 1. Decimal digits before the block: 1.
  2. Repeating-decimal rule: (all digits up to the end of the first block − the digits before the block) ÷ (as many 9s as repeating digits, then as many 0s as non-repeating decimals) = (16 − 1) / 90 = 15/90.
  3. Simplify: the greatest common factor of 15 and 90 is 15, so the fraction is 1/6.

So 0.1(6) = 1/6. And for the pure repeating case, 0.(3) = 1/3.

Type the repeating part carefully: 0.1(6) is 1/6, but 0.(16) is 16/99.

Rounded decimals and the closest fraction

Many decimals you meet were rounded from a simple fraction. Typed exactly, 0.333 is 333/1,000, not 1/3; the calculator notices this and adds a note: If 0.333 was rounded, it may be 1/3 (0.333333…).. It does this when a fraction with a denominator up to 1,000 rounds to the same digits you typed.

With “closest fraction” ticked you choose the largest denominator you accept. This is how the famous approximations of π are found: with denominators up to 10 the best fraction for 3.14159 is 22/7, and up to 1,000 it is 355/113 which differs from 3.14159 by only +0.00000292.

The table comes from the continued fraction of your number. Each row (a convergent) is closer than any fraction with a smaller denominator, a result covered in standard number-theory texts such as Hardy and Wright, An Introduction to the Theory of Numbers (Oxford University Press, 6th edition 2008), chapter 10. Measuring in inches? Fractions with denominators 2, 4, 8, 16, 32 and 64 are the ones on a tape measure, so set the limit to 16 or 64.

Common decimals as fractions

DecimalFractionDecimalFraction
0.11/100.63/5
0.1251/80.6255/8
0.21/50.(6)2/3
0.251/40.753/4
0.(3)1/30.84/5
0.3753/80.8(3)5/6
0.42/50.8757/8
0.51/20.(9)1

The last row is not a mistake: 0.999… repeating forever is exactly 1, as the formula shows: 9/9 = 1.

Mistakes to avoid

For the opposite direction, see the fraction to decimal calculator; to work with the result, use the fraction calculator.

Related calculators and converters

Decimal to fraction calculator FAQ

How do you convert a decimal to a fraction?

Write the digits over 10, 100, 1,000 and so on (one zero per decimal place), then simplify. 0.375 = 375/1000 = 3/8.

What is 0.333… as a fraction?

0.333… repeating forever is exactly 1/3. But 0.333 that stops after three digits is 333/1000.

How do you turn a repeating decimal into a fraction?

Call it x, multiply by a power of 10 so the repeating parts line up, and subtract. For 0.1(6): 100x − 10x = 16.6… − 1.6… = 15, so x = 15/90 = 1/6.

What is 0.125 as a fraction?

0.125 = 125/1000 = 1/8.

What fraction is closest to pi?

22/7 is the best fraction with a denominator up to 10, and 355/113 is the best up to 1,000; it matches pi to six decimal places.

Is 0.999… really equal to 1?

Yes. By the repeating-decimal rule 0.(9) = 9/9 = 1. There is no number between them, so they are the same number.

How do I enter a repeating decimal?

Put the repeating digits in brackets, like 0.1(6) or 0.(142857), or type at least two copies of them followed by three dots, like 0.1666...

Missing something in the decimal to fraction calculator?Suggest an idea. It takes 20 seconds and we read every one.Suggest an idea

Sends only what you type here, never the text you work with. Your email is used only to reply about this idea.

Free online tools