Menu

Decimal to Fraction Calculator

Any decimal as an exact fraction in lowest terms, repeating ones included.

By Nethanel Bar, Co-founder & CEO

Last updated

Want to solve these without the calculator?

The Coddy math course teaches the method itself - you work each step on an interactive board and get told exactly where a move went wrong.

Every decimal is already a fraction

A decimal is a fraction written in a particular way. 0.375 means three hundred and seventy-five thousandths, which is 375/1000, which cancels to 3/8. That is the whole method for a terminating decimal: read the digits over the right power of ten, then divide top and bottom by their greatest common factor.

A repeating decimal needs something cleverer, and it is the part almost no calculator will show you. You cannot write 0.1666… over a power of ten, because the digits never stop. Instead you make two copies of the number, shifted so their endless tails line up, and subtract - the tails cancel each other exactly, and what is left is an ordinary whole number you can divide by.

Everything here is exact. Nothing is computed in floating point, so 0.1 is one tenth rather than the 0.1000000000000000055 a computer usually means by it, and a fraction like 1/7 comes back as 1/7 rather than something that rounds to it.

What to notice

  • The number of decimal places is the number of zeros. Three places means thousandths, so the first fraction is over 1000 - always, before any cancelling.
  • Cancelling is one division, not a hunt. Divide top and bottom by their greatest common factor once and you are in lowest terms; dividing by 2 repeatedly gets there too, just slower.
  • A repeating decimal is never over a power of ten. It is over a string of nines (and possibly some zeros) - 0.(3) is 3/9, 0.(45) is 45/99 - and that is the shift-and-subtract in disguise.
  • The percentage stays exact too. 1/6 is 16⅔%, not 16.67%. A rounded percentage of an exact fraction is a step backwards.
  • 0.999… really is 1. Run it through: the algebra gives 9x = 9, so x = 1. It is not an approximation and not a trick of notation.

How to convert a decimal to a fraction

  1. Count the decimal places

    Write the digits after the point as a whole number, and put it over 1 followed by that many zeros. 0.375 has three places, so it starts as 375/1000.

  2. Find the greatest common factor

    Work out the largest number that divides both the top and the bottom. For 375 and 1000 that is 125.

  3. Divide both by it

    375 ÷ 125 = 3 and 1000 ÷ 125 = 8, so 0.375 = 3/8. If the greatest common factor is 1, the fraction was already in lowest terms.

  4. For a repeating decimal, shift and subtract instead

    Multiply by a power of ten so the repeating block moves past the point, subtract the original (shifted if needed), and the endless tails cancel. Type it as 0.1(6) and this page writes out every line.

Common decimals as fractions

The conversions worth knowing by heart. Everything else, the calculator above will do exactly.

DecimalFractionPercentage
0.11/1010%
0.1251/812.5%
0.21/520%
0.251/425%
0.333… (0.(3))1/333⅓%
0.3753/837.5%
0.51/250%
0.6255/862.5%
0.666… (0.(6))2/366⅔%
0.753/475%
0.8757/887.5%
0.1666… (0.1(6))1/616⅔%

Worked examples

A terminating decimal: 0.375

plain
0.375

Three decimal places, so start with 375/1000. The greatest common factor of 375 and 1000 is 125, and dividing both by it gives 3/8. Two lines, and the second one is the only place a mistake can hide: getting the greatest common factor wrong leaves you with 15/40, which is correct but not in lowest terms and will usually be marked down.

A repeating decimal: 0.(3)

plain
0.(3)

Let x = 0.333…. Multiply by 10 to get 10x = 3.333…. The two tails are identical, so subtracting the first from the second leaves 9x = 3 exactly - no approximation anywhere - and x = 3/9 = 1/3. The nine in the denominator is not a coincidence: one repeating digit always gives ninths.

A mixed repeating decimal: 0.1(6)

plain
0.1(6)

Here the 1 does not repeat but the 6 does, so two shifts are needed. 100x = 16.666… and 10x = 1.666…, and subtracting gives 90x = 15, so x = 15/90 = 1/6. The 90 is 9 (one repeating digit) times 10 (one fixed digit), which is where every denominator of this kind comes from.

Bigger than one: 2.5

plain
2.5

The method does not change: 25/10, cancel by 5, and you get 5/2. Because the top is bigger than the bottom this is an improper fraction, and the calculator also gives the mixed number 2½. Which form your answer should take depends on the question - improper fractions are easier to compute with, mixed numbers are easier to picture.

Common mistakes

  • Counting the digits before the point. Only the decimal places set the power of ten: in 2.5 there is one place, so it is 25/10 and not 25/100.
  • Stopping before lowest terms. 375/1000 is a correct answer to the wrong question - most marking schemes want 3/8.
  • Putting a repeating decimal over a power of ten. 0.(3) is not 3/10, and it is not 33/100 either; it is 3/9. Endless digits need the subtraction method.
  • Rounding first. Converting 0.333 (three digits) gives 333/1000, which is not 1/3. If the decimal repeats, say so with brackets or dots.
  • Forgetting the sign. -0.75 is -3/4, and the minus belongs to the whole fraction, not to the numerator and the denominator separately.
  • Reading 0.999… as 'nearly 1'. It equals 1 exactly, and the algebra above proves it in two lines.

Decimal to fraction FAQ

How do you turn a decimal into a fraction?
Write the digits after the point over 1 followed by as many zeros as there are decimal places, then divide the top and bottom by their greatest common factor. 0.375 becomes 375/1000, and dividing both by 125 gives 3/8. A repeating decimal needs a different method - see the next answer.
How do I convert a repeating decimal?
Call it x, multiply by a power of ten so the repeating block moves to the left of the point, and subtract the original from that. The endless tails are identical, so they cancel exactly and leave a whole number. For 0.(3): 10x = 3.333…, minus x = 0.333…, gives 9x = 3 and x = 1/3. Type it here as 0.(3) or 0.333... and every line is written out.
What is 0.375 as a fraction?
3/8. It starts as 375/1000, and the greatest common factor of 375 and 1000 is 125, which leaves 3 over 8. As a percentage it is exactly 37.5%.
Is 0.999... really equal to 1?
Yes, exactly, and the same method proves it. Let x = 0.999…, then 10x = 9.999…, and subtracting gives 9x = 9, so x = 1. It is not a rounding or a quirk of the notation: 0.999… and 1 are two ways of writing the same number.
Why does it give a fraction and not a decimal answer?
Because the fraction is the exact value and the decimal you typed is one way of writing it. On a question that asks for a fraction in simplest form, a decimal is marked wrong - and the whole point of this page is to hand you the form the question asks for.
Can it handle negative numbers and numbers bigger than one?
Both. -0.75 gives -3/4, and 2.5 gives 5/2 with the mixed number 2½ shown alongside it. The method is identical; only the presentation of the answer changes.
How do I type a repeating decimal?
Two ways, and both work. Put the repeating digits in brackets - 0.(3), 0.1(6), 0.(142857) - which is unambiguous, or just end with dots - 0.333..., 0.1666... - and the repeating block is worked out from the digits you gave.

More math tools

Coddy programming languages illustration

Learn math with Coddy

GET STARTED