How do you convert a decimal to a fraction?

Short answer. Write the decimal digits over the matching power of ten, then reduce. 0.75 has two decimal places, so it is 75/100, and dividing both sides by 25 gives 3/4. Repeating decimals use a different rule: put the repeating block over the same number of nines, so 0.333... is 3/9 = 1/3.

Decimals and fractions are two spellings of the same number. Going from a fraction to a decimal is just division. Going the other way looks harder than it is, because the answer is already sitting in the place value and nobody points that out.

The place value does the work

Read the decimal out loud and you have said the fraction. 0.75 is seventy five hundredths. That is 75/100. The words are the answer.

Formally: count the digits after the point, and that many digits means a denominator of 10 raised to that power.

1 place   0.7      =  7/10
2 places  0.75     =  75/100
3 places  0.625    =  625/1000
4 places  0.0125   =  125/10000

digits after the point  ->  that many zeros on the bottom

That fraction is already correct. It is just wearing an ugly name.

Reducing to lowest terms

To clean it up, divide the top and the bottom by their greatest common divisor, the biggest number that goes into both:

0.75  =   75/100    gcd(75, 100)  = 25
          75 ÷ 25  =  3
         100 ÷ 25  =  4            =  3/4

0.625 =  625/1000   gcd(625, 1000) = 125
         625 ÷ 125 =  5
        1000 ÷ 125 =  8            =  5/8

If spotting the greatest common divisor is not your idea of fun, cancel in easy stages instead. 625/1000 divided by 5 is 125/200, again by 5 is 25/40, again by 5 is 5/8. Same destination, three small steps rather than one clever one.

Decimals bigger than one

Take the whole number off the front, convert what is left, then put it back:

2.4    ->  keep 2,  convert 0.4

0.4  =  4/10  =  2/5        gcd(4, 10) = 2

2.4  =  2 2/5               as a mixed number
     =  12/5                as an improper fraction

check:  2 × 5 + 2 = 12, and 12 ÷ 5 = 2.4

The check at the bottom is worth doing every time. Divide your fraction back out and you should land exactly on the decimal you started with.

Repeating decimals need a different rule

0.333... never stops, so there is no place value to land on. The shortcut is that a repeating block goes over the same number of nines:

0.333333...    1 repeating digit   =   3/9   =  1/3
0.666666...    1 repeating digit   =   6/9   =  2/3
0.363636...    2 repeating digits  =  36/99  =  4/11
0.142857142857...  6 digits  =  142857/999999  =  1/7

It looks like a party trick, but it falls out of one line of algebra. Call the number x, shift it left past one full block, and subtract:

     x  =  0.363636...
  100x  =  36.363636...

100x - x  =  36        the tails are identical, so they cancel
     99x  =  36
       x  =  36/99  =  4/11

When the repeat starts late, the same subtraction still works, and you end up with nines followed by zeros. For 0.1666..., the digit 1 does not repeat and the 6 does:

0.1666...  =  (16 - 1) / 90  =  15/90  =  1/6

one non-repeating digit -> one zero;  one repeating digit -> one nine

The conversions worth memorising

DecimalFractionWhy
0.11/10Already lowest terms
0.1251/8125/1000, both divided by 125
0.21/52/10, both divided by 2
0.251/425/100, both divided by 25
0.333...1/3Repeating, so 3/9
0.3753/8375/1000, both divided by 125
0.51/25/10, both divided by 5
0.6255/8625/1000, both divided by 125
0.666...2/3Repeating, so 6/9
0.753/475/100, both divided by 25
0.8757/8875/1000, both divided by 125

The eighths are the ones that catch people out, because 0.125, 0.375, 0.625 and 0.875 look like they should be hundredths and are not.

The rounding trap in the other direction

Here is where this quietly goes wrong. If the decimal you are converting came off a screen, it may already be rounded, and the fraction you get back will be a fake:

0.33   ->   33/100     an exact reading of a rounded number
1/3    =    0.333333...

33/100 is not 1/3. It is short by 1/300.

Two decimal places cannot hold a third, so a calculator that shows you 0.33 has already thrown the tail away. Convert that back and you get 33/100, which is a perfectly correct answer to the wrong question. The same failure runs through adding fractions as decimals, and it is a cousin of the floating point mess behind 0.1 + 0.2 not being 0.3.

The way out is to never let the number become a decimal in the first place. A calculator doing exact rational arithmetic holds 1/3 as 1/3 rather than as 0.333333, so nothing is lost on the way through and 0.1 + 0.2 comes back as exactly 0.3.

Which form should you actually use

Fractions win when the numbers are thirds, sixths, sevenths or ninths, because those have no exact decimal form at all. Decimals win for money and for anything you are going to sort or compare at a glance. Recipes, tape measures and gear ratios stay in fractions for a reason: the denominators are halves and eighths, and the fractions are the honest version.

Prism Calculator icon

Type 0.625, get 5/8

Prism's fraction mode toggles between decimal and fraction and computes exactly underneath, so 1/3 stays 1/3. Fractions are free forever, no subscription. See the app.