Turning decimals into fractions
A finite decimal is already a fraction over a power of ten: 0.375 = 375/1000. Divide top and bottom by their greatest common factor (125) and you get 3/8. Numbers above 1 become mixed numbers: 2.5 = 5/2 = 2 1/2.
Some decimals are rounded versions of simple fractions: 0.3333 is almost 1/3, and 3.14159265 is almost 355/113. Set a maximum denominator and the page finds the closest fraction whose bottom number is not larger than it. For rulers and tape measures, choose round to 1/16 (or 1/32, 1/64) instead.
Worked example: fractions of an inch
A drawing says 0.3 in, but your tape measure shows sixteenths. Rounded to the nearest 1/16, 0.3 × 16 = 4.8 → 5, so the mark is 5/16 in (0.3125 in), 0.0125 in away. To the nearest 1/64 it becomes 19/64 (0.296875 in).
How this works
The page first reads your decimal exactly as an integer over a power of ten and simplifies it with the greatest common divisor. If the resulting denominator is larger than your limit, it expands the decimal as a continued fraction, the sequence of whole-number steps that best approximates it, and keeps the last approximation whose denominator fits. Those approximations are the closest fractions possible for their size, which is why π gives 22/7 and then 355/113. The result is shown as a fraction and as a mixed number.
Frequently asked
How do I convert 0.75 to a fraction?
0.75 = 75/100, and dividing both by 25 gives 3/4.
How do I get fractions of an inch?
Choose Round to 1/16, 1/32 or 1/64 to match your ruler. 0.3 in rounds to 5/16.
Why does 0.3333 not give 1/3?
Because 0.3333 is exactly 3333/10000. Lower the maximum denominator (for example 100) to get 1/3.
What is the fraction for pi?
22/7 is close (denominator up to 7); 355/113 is much closer (denominator up to 113).
Sources
Reviewed Oct 17, 2026 · test vectors fixtures/calculators/math/decimal-to-fraction/