Decimal to Fraction Converter

Convert decimals to fractions and back with exact integer maths. Handles repeating decimals, mixed numbers, percents and nearest 1/16 for inches, with the steps shown.


Write a repeating decimal as 0.1(6) or 0.166... with the repeating digits in brackets.
Fraction
38
Mixed number
38
Decimal
0.375
Percent
37.5%

How it was worked out

  1. The last digit of 0.375 sits in a place worth one over 1000, so the value is 375/1000.
  2. The largest number dividing both 375 and 1000 is 125, so the fraction simplifies to 3/8.

Turning a decimal into a fraction

Every terminating decimal is already a fraction; the decimal point just hides the denominator. Read the last digit and you have it: in 0.375 the last digit sits in the thousandths place, so the value is 375 over 1000. All that remains is to cancel, and dividing both numbers by 125 leaves 3/8. That is the entire method, and it is why the answer is exact rather than rounded. This tool does the same thing with whole numbers throughout, so nothing is ever lost to a floating point approximation.

Why 0.333 and 0.(3) are different numbers

A decimal that stops is not the same as one that repeats. 0.333 is exactly 333/1000, while 0.(3), with the 3 repeating forever, is exactly 1/3. Converting a repeating decimal uses a different rule: subtract the non repeating part from the whole run of digits, then put a 9 under each repeating digit and a 0 under each fixed one. For 0.1(6) that gives 16 minus 1 over 90, which is 15/90, and cancelling leaves 1/6. Write the repeating part in brackets and this tool applies that rule.

Decimals to sixteenths for tape measures

Workshop measurements are read in halves, quarters, eighths and sixteenths, so a decimal like 0.333 in is no use until it becomes a mark you can actually find on a rule. Setting the denominator to nearest 1/16 answers that directly: 0.333 rounds to 5/16, which is the closest mark. The tool says whether the result is exact or rounded, because on a real cut the difference between 5/16 and a true third of an inch is about half a millimetre.

Exact, nearest or simplest

Three different questions get three different answers. Exact gives the fraction that equals the decimal precisely, which is what homework normally wants. Nearest forces a denominator you can use, which is what a tape measure or a recipe wants. Simplest hunts for the friendliest fraction close to the value, which is how 3.14159 comes back as 355/113, an approximation to pi that has been in use since the fifth century and is accurate to seven decimal places.

Worth knowing

  • A fraction gives a terminating decimal only when its denominator has no prime factors other than 2 and 5.
  • Sevenths always repeat with the same six digits, 142857, just starting at a different point.
  • Type a percentage with the sign and it is handled directly; 12.5% becomes 1/8.
  • Mixed numbers work with a space, so 1 3/4 is read as one and three quarters.
  • Nothing is stored. The calculation runs on our server and the result is discarded once it is sent.

Frequently Asked Questions

Write the digits over the place value of the last one, then cancel. For 0.375 the last digit is in the thousandths, giving 375/1000, and dividing both by 125 leaves 3/8. The tool shows each of those steps so the method is visible, not just the answer.

Exactly 3/8. It is 375/1000 before cancelling, and 125 divides into both, which reduces it in one step. As a percentage that is 37.5 per cent. Because 8 has only twos as prime factors, the decimal stops rather than repeating.

Subtract the non repeating part from the full run of digits and place it over a denominator made of a 9 for every repeating digit and a 0 for every fixed one. For 0.1(6) that is 16 minus 1 over 90, giving 15/90, which cancels to 1/6. Enter the repeating digits inside brackets and the tool applies the rule and shows the working.

Because most calculators store numbers in binary, and one tenth cannot be written exactly in binary any more than one third can be written exactly in decimal. This tool never converts your input to a binary number. It reads the digits as whole numbers and keeps them whole, so 0.1 is 1/10 exactly.

Set the denominator to nearest 1/16. A value like 0.333 in comes back as 5/16, the closest mark on a rule. The tool tells you when the answer is rounded rather than exact, which matters when you are cutting: 5/16 differs from a true third of an inch by roughly half a millimetre.

A fraction terminates only when its denominator, once cancelled down, has no prime factors besides 2 and 5. So halves, quarters, fifths, eighths, tenths and sixteenths all stop. Thirds, sixths, sevenths, ninths and elevenths all repeat, because 3, 7 and 11 are none of those factors.

It finds the fraction with the smallest denominator that stays close to your value, rather than the one that matches it exactly. That is why 3.14159 returns 355/113 instead of a fraction over 100000. The method used is the continued fraction expansion, which is guaranteed to give the best approximation available for any denominator size.

Yes. Write a mixed number with a space, so 1 3/4 is one and three quarters, which becomes 7/4. Percentages just need the sign, so 12.5% is read as 12.5 over 100 and reduces to 1/8. Negative values work in both cases.

How do you convert a decimal to a fraction?

Put the digits over the place value of the last one and cancel. 0.375 = 375/1000 = 3/8. This converter works in exact whole numbers, handles repeating decimals like 0.1(6) = 1/6 in both directions, and can round to the nearest 1/16 for tape measures. Every step is shown.