Skip to content
PercentPoint

Decimal to Fraction Calculator

Turn any decimal into a fraction in lowest terms, including repeating decimals such as 0.333… or 1.9545…. You also get the mixed number and the closest fraction in halves, quarters, eighths or sixteenths for tape-measure work.

For planning only. Your school, syllabus or accountant has the final word. First published · Last reviewed by PercentPoint.

How to use the decimal to fraction calculator

  1. Type the decimal. 0.75, 4.09, −0.286 and .5 all work, and commas are ignored.
  2. Mark repeating digits, if there are any. Put the repeating part in parentheses: 0.(3) means 0.333…, and 1.9(54) means 1.954545…. You can also end with three dots, as in 0.1666...; the calculator then treats the last digit as the one that repeats.
  3. Choose a ruler denominator if you want the nearest fraction in halves through sixty-fourths. This is useful when a decimal comes from a measurement and you need to find it on a tape or a drill chart.

The main answer is exact. The calculator builds the fraction from the digits you typed, not from a rounded floating-point number, so 0.1 becomes 1/10 rather than a long approximation.

Terminating decimals: read the place value

A decimal that stops can be read straight off its place value. The last digit tells you the denominator: tenths, hundredths, thousandths and so on. Then reduce.

decimal = (all the digits, without the point) ÷ 10number of decimal places
then divide top and bottom by their greatest common factor

The open textbook Prealgebra 2e from OpenStax (Example 5.4) works three cases:

  • 4.09 ends in the hundredths place: 4 9/100, or 409/100 as an improper fraction. Nothing cancels.
  • 3.7 ends in the tenths place: 3 7/10, or 37/10.
  • −0.286 ends in the thousandths place: −286/1000. Both numbers are even, so divide by 2 to get −143/500.

A few more that come up often: 0.75 = 75/100 = 3/4; 0.125 = 125/1000 = 1/8; 2.6 = 26/10 = 13/5 = 2 3/5; 0.05 = 5/100 = 1/20.

Repeating decimals: subtract the repeat away

A repeating decimal is also a fraction, just one whose denominator has prime factors other than 2 and 5. The standard algebra trick multiplies the number by a power of ten so the repeating parts line up, then subtracts to make them disappear.

0.333… Let x = 0.333…. Then 10x = 3.333…. Subtract: 9x = 3, so x = 3/9 = 1/3.

1.9545… (the 54 repeats). Let x = 1.95454…. Move the point past the non-repeating 9: 10x = 19.5454…. Move it past one more full cycle: 1000x = 1954.5454…. Subtract: 990x = 1935, so x = 1935/990 = 43/22. That matches OpenStax Example 5.30, which goes the other way and divides 43 by 22 to get 1.9 with 54 repeating.

The calculator uses the shortcut version of the same idea:

fraction = (digits through one full cycle − digits before the cycle) ÷ (10k × (10r − 1))
k = non-repeating decimal places, r = length of the repeating block

For 1.9(54): (1954 − 19) ÷ (10 × 99) = 1935/990 = 43/22. For 0.1(6), which is 0.1666…: (16 − 1) ÷ (10 × 9) = 15/90 = 1/6.

Rounded decimals and measurements

A calculator display such as 0.333333 is not the same number as 0.(3). Typed without the repeat mark, it becomes 333,333/1,000,000, an exact but unhelpful fraction. If you know the digits repeat, mark them. If they come from a measurement, use the nearest-fraction line instead.

The nearest-fraction line rounds to the denominator you pick: it multiplies by the denominator, rounds to a whole number and reduces. 0.3125 is exactly 5/16. A reading of 0.33 inch is closest to 5/16 on a sixteenths scale (0.3125, off by 0.0175) and to 21/64 on a sixty-fourths scale (0.328, off by 0.002). The “off by” figure tells you whether the coarser scale is close enough. A drawing that lists a hole as 0.188 inch almost certainly means 3/16 (0.1875); the nearest sixteenth is off by only 0.0005.

Common inch equivalents: 1/16 = 0.0625, 1/8 = 0.125, 3/16 = 0.1875, 1/4 = 0.25, 5/16 = 0.3125, 3/8 = 0.375, 1/2 = 0.5, 5/8 = 0.625, 3/4 = 0.75, 7/8 = 0.875.

Checking a conversion

Divide the numerator by the denominator and you should get the decimal back. The fraction to decimal calculator does this by long division and marks any repeating block, so the two tools check each other.

A quick test tells you in advance whether a fraction will terminate. Reduce it, then factor the denominator. If the only prime factors are 2 and 5, the decimal stops, because the denominator divides some power of ten. 7/40 terminates (40 = 2³ × 5) at 0.175. 1/12 repeats (12 = 2² × 3) as 0.08333….

Worked conversions to practice on

  • 0.45 = 45/100. The GCF of 45 and 100 is 5, so 0.45 = 9/20.
  • 0.0375 = 375/10,000. Dividing by 125 gives 3/80.
  • 2.125 = 2 125/1000 = 2 1/8, or 17/8 as an improper fraction.
  • 0.(27) = 0.272727…: the block has two digits, so 27/99, which reduces to 3/11.
  • 0.58(3) = 0.58333…: two fixed digits and a one-digit repeat, so (583 − 58) ÷ 900 = 525/900 = 7/12.
  • −1.(6) = −1.666… = −(16 − 1) ÷ 9 = −15/9 = −5/3, or −1 2/3.

Each of these can be typed into the calculator exactly as written above to check your work.

Why 0.999… equals 1

The same subtraction trick gives a surprising result. Let x = 0.999…. Then 10x = 9.999…, and subtracting leaves 9x = 9, so x = 1. Type 0.(9) and the calculator returns 1. This is not rounding: 0.999… and 1 are two ways of writing the same number, just as 1/2 and 0.5 are. By the same logic 0.4(9) equals 0.5.

Why other calculators show 0.30000000000000004

Computers store most decimals in binary, where 0.1 and 0.2 can’t be represented exactly, much as 1/3 can’t be written exactly in decimal. Adding them gives a binary value a hair above 0.3, and some apps display it as 0.30000000000000004. A converter that starts from that stored number can produce an enormous fraction. This calculator reads the digits you type as text and builds the fraction from them, so 0.3 is 3/10, and the result is exact for up to about fifteen significant digits.

Percentages that are friendly fractions

A percent is a decimal in disguise, so the same conversion applies once you divide by 100. 12.5% is 0.125, which is 1/8. 6.25% is 0.0625, or 1/16. 37.5% is 0.375, or 3/8. A third is 33.(3)%, entered here as 0.(3), and two thirds is 0.(6). Knowing these makes mental math easier: taking 12.5% of a number is the same as dividing it by 8, and 37.5% is three eighths of it.

Sources & assumptions

How this calculator gets its numbers. Full method: our methodology.

  • The fraction is built from the digits you type, so 0.1 is 1/10 exactly; it is not converted through a rounded binary number.
  • Digits in parentheses repeat forever; a trailing “...” repeats the last digit.
  • Repeating decimals use (digits through one cycle − digits before the cycle) ÷ (10^k × (10^r − 1)), then reduce.
  • The nearest-fraction line rounds to the chosen denominator, as when reading a ruler.
  • Exact for about 15 significant digits.

Sources

  1. OpenStax (Rice University), Prealgebra 2e, 5.1 Decimals. Example 5.4: 4.09 = 4 9/100, 3.7 = 3 7/10 and −0.286 = −143/500, using the place value of the last digit.
  2. OpenStax (Rice University), Prealgebra 2e, 5.3 Decimals and Fractions. A fraction bar means division (3/4 = 0.75, −7/2 = −3.5) and repeating decimals by long division, including Example 5.30, 43/22 = 1.9 with 54 repeating.

Last reviewed . A rounded display such as 0.333333 is a different number from 0.333…; mark the repeat if you mean the repeating value.

Frequently asked questions

How do you convert a decimal to a fraction?

Write the digits over 10, 100, 1000 or the power of ten that matches the number of decimal places, then simplify. 0.75 = 75/100 = 3/4.

What is 0.333 repeating as a fraction?

It is 1/3. Let x = 0.333…, so 10x = 3.333…. Subtracting gives 9x = 3, so x = 1/3.

What is 0.625 as a fraction?

0.625 = 625/1000. The greatest common factor is 125, so it reduces to 5/8.

How do I enter a repeating decimal?

Put the repeating digits in parentheses, such as 0.(6) for 0.666… or 0.1(6) for 0.1666…. You can also type 0.1666... with three dots and the last digit is treated as repeating.

What is 1.25 as a mixed number?

1.25 = 125/100 = 5/4, which is 1 1/4 as a mixed number.

How do I convert a decimal to a fraction of an inch?

Multiply the decimal by the denominator you want, such as 16, round to the nearest whole number, and put it over 16. 0.4 × 16 = 6.4, which rounds to 6, so about 6/16 = 3/8 inch.