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.
How it was worked out
- The last digit of 0.375 sits in a place worth one over 1000, so the value is 375/1000.
- 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.