MathsFractions & Decimals

Fraction to Decimal Converter (and
Back).

Turn a fraction into its exact decimal, or a decimal back into a fraction.

How it’s worked out

From a fraction to a decimal

A fraction is a division waiting to happen: 78\tfrac{7}{8} means 7 ÷ 8. Long division writes it out one digit at a time. At each step you multiply what is left by 10, write how many times the bottom number fits, and keep the rest. For 78\tfrac{7}{8} this gives 0.8750.875. The digit strip on the tool shows what is left over under every digit.

Why some decimals stop and others repeat

What is left over is always smaller than the bottom number, so it can only take so many values. Sooner or later it hits 0 and the decimal stops, or it comes back to a value it had before, and from then on the digits repeat. There is no third option. The Common Core standard 7.NS.A.2.d asks students to know exactly this.

You can tell which one you have before dividing. A decimal that stops is a fraction over 10, 100 or 1,000, and those numbers are built only from 2s and 5s. So write the fraction in lowest terms and factor the bottom number:

  • Only 2s and 5s: it stops. 340\tfrac{3}{40} has 40=23×540 = 2^3 \times 5, so it ends at 0.0750.075, after the larger power, 3 places.
  • Any other prime: it repeats. 112\tfrac{1}{12} has 12=22×312 = 2^2 \times 3. The 3 forces a cycle and the two 2s add two digits before it: 0.0830.08\overline{3}.

How long the cycle is

Strip the 2s and 5s from the bottom number and call what remains mm. The cycle length is the smallest whole number kk for which 10k−110^k - 1 divides evenly by mm. For 17\tfrac{1}{7}, that is 6, since 999,999 divides by 7. The tool works this out from the factors, so it knows the exact length of a long block too. 197\tfrac{1}{97} has a cycle of 96 digits.

From a decimal back to a fraction

A decimal that stops is its digits over a power of 10. Then reduce. One that repeats takes one more idea: shift it so the repeating tails line up, and subtract so they cancel. That gives this rule:

top\displaystyle \text{top}=all digits\displaystyle {}=\;\text{all digits}−digits before the cycle\displaystyle {}-\;\text{digits before the cycle}
bottom\displaystyle \text{bottom}=9s, then 0s\displaystyle {}=\;\text{9s, then 0s}
fraction\displaystyle \text{fraction}=topbottom\displaystyle {}= \frac{\text{top}}{\text{bottom}}

Read all the digits as one whole number. The bottom has one 9 per repeating digit, then one 0 per other decimal digit.

All of this uses exact whole numbers, not rounded decimals, so a repeating digit is never lost to a calculator's last place.

Worked examples

Leo reads a caliper

Leo measures a bolt at 0.6875 inches and wants the tape measure mark.

0.6875\displaystyle 0.6875=687510000\displaystyle {}= \frac{6875}{10000}=1116\displaystyle {}= \frac{11}{16}

The answer is 1116\frac{11}{16} inch. It lands exactly on a sixteenth mark, so a tape measure can show it.

Open this example in the tool

Maya checks her homework

Maya divides 5 by 6 and keeps writing 3s. Is that right? In lowest terms the bottom is 6=2×36 = 2 \times 3. The 2 gives one digit before the cycle, and the 3 gives a cycle of one digit.

56\displaystyle \frac{5}{6}=0.83\displaystyle {}= 0.8\overline{3}

So she is right, and the first digit, 8, does not repeat. The left-over numbers go 2, 2, 2, which is why the 3 never stops.

Open this example in the tool

Sam reads an answer key

An answer key prints 0.1666… and asks for a fraction. Sam types it with the repeating digit in brackets. All the digits make 16 and the digit before the cycle is 1. One repeating digit and one other decimal digit give a bottom of 90.

16−190\displaystyle \frac{16 - 1}{90}=1590\displaystyle {}= \frac{15}{90}=16\displaystyle {}= \frac{1}{6}

Open this example in the tool

Reading your result

The bar. A bar over digits means they repeat forever: 0.30.\overline{3} is 0.333… with no end. Some books write this with dots, and many web pages use brackets, as in 0.(3). All three mean the same thing. Type brackets in the decimal box, because a keyboard has no bar.

Rounded to your places. A repeating decimal rounded to any length is close but not equal. 13\frac{1}{3} rounds to 0.33 at 2 places and 0.3333 at 4. Keep the fraction while you work, and round only the final answer. The tool rounds half up from the exact value.

The ruler mark. Tape measures usually show sixteenths, while machine work may use 32nds or 64ths. Any fraction with one of those bottoms sits right on a mark. Other fractions do not, so the tool names the closest mark and how far off it is. Pick the ruler marks you have, and check that the distance is small enough for the job.

The closest simple fraction. When you start from a decimal, the exact fraction may look odd. 0.33 is exactly 33100\frac{33}{100}, not a third. If 0.33 was rounded from something on a label or scale, the likely source is 13\frac{1}{3}, the closest fraction with a bottom up to 16. This is a good guess, not a fact about your number.

Common mistakes

  • Dividing the wrong way round. 78\tfrac{7}{8} is 7 ÷ 8, not 8 ÷ 7. A proper fraction, with the smaller number on top, always gives a decimal below 1.
  • Factoring before reducing. 312\tfrac{3}{12} has a 3 in its bottom number, but it stops, because it reduces to 14\tfrac{1}{4} first. Only the lowest-terms bottom counts.
  • Putting the bar on too many digits. In 0.830.8\overline{3}, the 8 does not repeat, so 0.830.\overline{83} is a different number. In the decimal box, that is the gap between 0.8(3) and 0.(83).
  • Trusting a rounded value as a fraction. Typing 0.33 and expecting 13\tfrac{1}{3} gets you a fraction over 100. To get a third back, type 0.(3).
  • Rounding in a spreadsheet and expecting a tie to behave. 1.005 at 2 places is 1.01 rounded half up on paper, but many programs store 1.005 as slightly less and return 1.00. Exact fractions do not have this problem. The rounding calculator covers it in more depth.

Questions people ask

Reduce it to lowest terms and factor the bottom number. If the only prime factors are 2 and 5, the decimal stops. Otherwise it repeats. For example, 3/40 stops because 40 = 2³ × 5, but 1/12 repeats because 12 has a factor of 3.

Sources