Decimal to Fraction Calculator
Convert decimals to fractions
How It Works
Overview
A decimal-to-fraction converter takes a number like 0.625 and rewrites it as a clean fraction (5/8) and, when applicable, a mixed number. The basic idea is simple: count the decimal places, put the digits over the matching power of ten, and simplify by the greatest common divisor (GCD). 0.625 has three decimal places, so 625/1000, and dividing by GCD(625,1000) = 125 gives 5/8.
The conversion works exactly for terminating decimals — ones that end after a finite number of digits. Repeating decimals like 0.333… or 0.142857… never terminate, so any finite truncation is just an approximation of the true fraction (1/3, 1/7, etc.). For those you need a small algebra trick rather than a direct conversion.
The Formula
Step by step:
- Step 1: count the digits after the decimal point — call this n.
- Step 2: multiply by 10^n to clear the decimal: numerator = decimal × 10^n.
- Step 3: denominator = 10^n.
- Step 4: compute GCD(numerator, denominator) and divide both by it.
- Step 5: if the absolute value of the numerator is at least the denominator, optionally split into a mixed number: whole = ⌊num / den⌋, fractional remainder = num mod den.
Worked Example
Convert 0.75:
- 2 decimal places → 75/100.
- GCD(75, 100) = 25, divide → 3/4.
Convert 2.5:
- 1 decimal place → 25/10. GCD = 5, divide → 5/2.
- Mixed: 5 ÷ 2 = 2 remainder 1 → 2 1/2.
Convert 0.6666666 (a 7-digit truncation of 1/3):
- Direct conversion gives 6666666/10000000 ≈ 3333333/5000000 — an approximation.
- The exact fraction is 2/3; for repeating decimals, use the algebra trick: x = 0.666…, 10x = 6.666…, subtract → 9x = 6 → x = 2/3.
When to Use This
- Reading recipes & tools: 0.5 cup is 1/2 cup; 0.375 inch on a ruler is 3/8.
- Test answers: homework often expects fraction form rather than a decimal.
- Music intervals and ratios: a 1.5 frequency ratio is the perfect fifth (3/2).
- Construction & carpentry: imperial measurements are reported in halves, quarters, eighths, sixteenths.
- Probability & statistics: express 0.2 as 1/5 to compute exact combinatorics.
Common Mistakes to Avoid
- Forgetting to simplify. 50/100 is correct but not done — keep going to 1/2.
- Treating 0.333 as exactly 1/3. Only 0.333… (infinitely repeating) equals 1/3. The truncation 0.333 = 333/1000.
- Miscounting decimal places. 0.0050 has 4 decimal places; the trailing zero counts when reading as "four-place" even if it's mathematically the same as 0.005.
- Negative signs: -0.75 should give -3/4, not 3/-4. Place the negative on the numerator (or out front) by convention.
- Floating-point noise. Pasting 0.1 + 0.2 = 0.30000000000000004 from another tool will yield a wildly long fraction. Round to a reasonable precision first.
Frequently Asked Questions
Ad Space