How to Convert a Decimal to a Fraction (Including Repeating Decimals)

Write the decimal over a power of 10 and simplify, or use a short algebra trick for repeating decimals. Includes an inch-fraction chart.

To convert a terminating decimal to a fraction, write the digits after the decimal point over the matching power of 10, then simplify. 0.375 = 375/1000 = 3/8, because 375 and 1,000 share a greatest common factor of 125. Repeating decimals need one extra step, an algebra trick that turns 0.272727… into 27/99 = 3/11.

Converting a terminating decimal

A terminating decimal ends after a fixed number of digits. Its place value tells you the denominator directly.

  1. Count the decimal places. 0.375 has 3.
  2. Write the digits over 1 followed by that many zeros. 375/1000.
  3. Simplify by dividing the numerator and denominator by their greatest common factor. GCF(375, 1000) = 125, so 375/1000 = 3/8.
0.d1d2…dn = d1d2…dn / 10n

Decimals greater than 1

Keep the whole number separate, convert the decimal part, and combine.

2.45 → whole part 2, decimal part 0.45 = 45/100 = 9/20

2.45 = 2 9/20 as a mixed number, or (2 × 20 + 9)/20 = 49/20 as an improper fraction

Simplifying shortcuts

Because the denominator is always a power of 10, which is made of 2s and 5s only, the only factors you can ever cancel are 2 and 5. That makes simplifying fast: keep dividing by 2 or 5 while both numbers allow it. If the numerator is odd and does not end in 5, as with 583/1000, the fraction is already in lowest terms. More techniques are in how to simplify fractions.

Converting a repeating decimal

A repeating decimal has a block of digits that repeats forever, written with a bar or with dots: 0.272727… or 0.1666…

Pure repeating decimals: the 9s rule

When the repeating block starts immediately after the decimal point, put the block over the same number of 9s:

0.d1…dk = d1…dk / (k nines)
  • 0.333… = 3/9 = 1/3
  • 0.272727… = 27/99 = 3/11
  • 0.454545… = 45/99 = 5/11
  • 0.142857142857… = 142857/999999 = 1/7

Mixed repeating decimals: the algebra method

When some digits come before the repeating part, as in 0.1666…, use algebra. The idea is to multiply by powers of 10 so the repeating tails line up, then subtract them away.

Let x = 0.1666…

Multiply so the repeating part starts at the point: 10x = 1.666…

Multiply so one full block has passed: 100x = 16.666…

Subtract: 100x − 10x = 16.666… − 1.666… → 90x = 15

x = 15/90 = 1/6

The same steps work for longer blocks. For 0.123434… (non-repeating “12,” repeating “34”), the shortcut version is: take all the digits through the first repeat (1234), subtract the non-repeating digits (12), and divide by as many 9s as repeating digits followed by as many 0s as non-repeating digits.

0.12343434… = (1234 − 12) / 9900 = 1222/9900 = 611/4950

Why the 9s rule works

The 9s rule is the algebra method in compressed form. For 0.272727…, let x equal the decimal. Multiplying by 100 shifts one full block left: 100x = 27.272727… Subtracting the original removes the endless tail, leaving 99x = 27, so x = 27/99. A block of k digits always means multiplying by 10k and subtracting, which leaves 10k − 1 in the denominator, and 10k − 1 is always k nines.

The same argument explains a result that surprises many people: 0.999… equals exactly 1. With x = 0.999…, 10x = 9.999…, so 9x = 9 and x = 1.

The decimal to fraction calculator accepts repeating decimals in parentheses notation, such as 0.1(6), and shows these steps.

Common decimal to fraction conversions

Measurements in inches use halves, quarters, eighths and sixteenths, so these conversions come up constantly in shops and on job sites.

Decimal Fraction Decimal Fraction
0.0625 1/16 0.5625 9/16
0.125 1/8 0.625 5/8
0.1875 3/16 0.6875 11/16
0.25 1/4 0.75 3/4
0.3125 5/16 0.8125 13/16
0.375 3/8 0.875 7/8
0.4375 7/16 0.9375 15/16
0.5 1/2 0.333… 1/3

The fraction to decimal chart extends this to 64ths.

Rounding a decimal to the nearest fraction of an inch

Measured decimals rarely land exactly on a sixteenth. To round to the nearest 1/16:

  1. Multiply the decimal part by 16.
  2. Round to the nearest whole number. That is the numerator.
  3. Put it over 16 and simplify.

0.83 inch: 0.83 × 16 = 13.28 → 13 → 13/16 inch (0.8125, off by less than 1/50 inch)

Use 8, 32 or 64 instead of 16 for coarser or finer resolution. When converting from metric, the millimeters to inches converter gives the decimal inches to start from.

Approximating irrational numbers

Decimals that never end and never repeat, such as π = 3.14159…, cannot be written as exact fractions. You can still find good approximations:

Fraction Decimal Error vs π
3/1 3 0.1416
22/7 3.142857 0.00126
355/113 3.1415929 0.00000027

These come from a technique called continued fractions, which finds the best approximation for any size of denominator. For everyday work, round the decimal and convert it as a terminating decimal.

Common mistakes

  • Using the wrong power of 10. The denominator depends on the number of decimal places, not the size of the number. 0.05 is 5/100 = 1/20, not 5/10.
  • Treating a rounded decimal as exact. A calculator showing 0.3333333 is displaying 1/3 rounded. Converting the eight digits literally gives 3,333,333/10,000,000, which is close to 1/3 but not equal. If a decimal looks like it repeats, use the repeating method.
  • Applying the 9s rule to a mixed repeating decimal. 0.1666… is not 16/99. When digits come before the repeating block, use the algebra method.
  • Forgetting to simplify. 375/1000 is correct but unfinished. Most teachers and most practical uses expect lowest terms.
  • Dropping the whole number. In 2.45, the 2 must reappear in the answer as 2 9/20 or 49/20.

Decimals and fractions in spreadsheets

Excel and Google Sheets can display a decimal as a fraction with a number format. The format # ?/? shows the closest fraction with a one-digit denominator, # ??/?? allows two digits, and # ?/16 forces sixteenths, which is handy for cut lists. The underlying value stays the same decimal, so later calculations are not affected by the displayed rounding.

Going the other way

To turn a fraction back into a decimal, divide the numerator by the denominator: 5/8 = 5 ÷ 8 = 0.625. If the denominator has any prime factor other than 2 or 5, the decimal will repeat, which is why 1/3, 1/6 and 1/7 never terminate. The fraction to decimal calculator marks the repeating block, and the step-by-step method is the same as in how to do long division. To convert a percentage instead, divide by 100 first or use the percent to fraction calculator.

Frequently asked questions

How do you convert a decimal to a fraction?

Write the digits after the decimal point over 10, 100, 1,000 or whatever power of 10 matches the number of decimal places, then simplify. 0.375 has three decimal places, so it becomes 375/1000, which simplifies to 3/8.

How do you convert a repeating decimal to a fraction?

For a decimal where the repeating block starts right after the point, put the repeating digits over the same number of 9s. 0.272727… becomes 27/99, which simplifies to 3/11. Other cases use the algebra method in this guide.

Is 0.999… really equal to 1?

Yes. Using the repeating-decimal method, x = 0.999…, so 10x = 9.999…, and subtracting gives 9x = 9, so x = 1. They are two ways of writing the same number, just as 1/3 and 0.333… are.

What fraction is 0.625?

0.625 = 625/1000. The greatest common factor of 625 and 1,000 is 125, so it simplifies to 5/8.

Can every decimal be written as a fraction?

Every terminating or repeating decimal can, because those are exactly the rational numbers. Decimals that never end and never repeat, such as π or √2, are irrational and have no exact fraction, though they can be approximated, as with 22/7 or 355/113 for π.