🔢 Decimal to Fraction Calculator
Convert any decimal to a fraction in simplest form with steps — including repeating decimals, mixed numbers and the nearest 1/16 or 1/64 inch.
For a repeating decimal, put the repeating digits in parentheses: 0.(3) is 0.333…, 0.1(6) is 0.1666…, 2.(142857) repeats 142857.
Steps
- Write the digits over a power of ten — 3 decimal places means 103: 625 / 1,000.
- The greatest common divisor of 625 and 1,000 is 125. Divide both by it: 5 / 8.
Nearest simple fraction
5/8 = 0.625 (exact)
Nearest inch fractions
| Precision | Fraction | Error |
|---|---|---|
| 1/2" | 1/2" | −0.1250" |
| 1/4" | 3/4" | +0.1250" |
| 1/8" | 5/8" | exact |
| 1/16" | 5/8" | exact |
| 1/32" | 5/8" | exact |
| 1/64" | 5/8" | exact |
What Decimal to Fraction Calculator Does
This decimal to fraction calculator turns any decimal into a fraction in simplest form and shows the steps — the power of ten, the greatest common divisor, and the mixed number when the value is greater than one. It works just as well for repeating decimals: type 0.(3) for 0.333… or 0.1(6) for 0.1666… and you get the exact fraction, 1/3 or 1/6.
Two extra results cover everyday needs that a plain conversion misses. The inch table rounds the decimal to the nearest 1/2, 1/4, 1/8, 1/16, 1/32 and 1/64 inch and shows the error, which is what you want when a drawing says 0.3125 and your tape measure says sixteenths. The nearest-simple-fraction result finds the closest fraction with a small denominator, so 3.14159 gives 355/113 rather than 314159/100000.
All arithmetic on the exact fraction uses whole-number integers of any length, so long decimals come out exactly rather than rounded.
How to Use Decimal to Fraction Calculator
- Type a decimal, or put the repeating digits in parentheses such as 0.(6)
- Read the fraction in simplest form and the mixed number
- Follow the steps to see the power of ten and the greatest common divisor
- Pick a largest denominator to get the nearest simple fraction
- Use the inch table for the nearest 1/16, 1/32 or 1/64 inch
Formula Used by Decimal to Fraction Calculator
Terminating decimal
x = digits ÷ 10ⁿ, then divide top and bottom by their greatest common divisor
- n
- Number of digits after the decimal point
Worked example
0.625
- Three decimal places: 625 / 1000
- GCD(625, 1000) = 125
- 625 ÷ 125 = 5 and 1000 ÷ 125 = 8
Result: 0.625 = 5/8
Repeating decimal
x = (all digits − non-repeating digits) ÷ (10ⁿ⁺ʳ − 10ⁿ)
- n
- Digits after the point that do not repeat
- r
- Length of the repeating block
Worked example
0.1(6) = 0.1666…
- n = 1, r = 1
- (16 − 1) ÷ (100 − 10) = 15/90
- GCD(15, 90) = 15
Result: 0.1666… = 1/6
Common Decimals as Fractions
| Decimal | Fraction | Decimal | Fraction |
|---|---|---|---|
| 0.5 | 1/2 | 0.0625 | 1/16 |
| 0.25 | 1/4 | 0.1875 | 3/16 |
| 0.75 | 3/4 | 0.3125 | 5/16 |
| 0.125 | 1/8 | 0.4375 | 7/16 |
| 0.375 | 3/8 | 0.2 | 1/5 |
| 0.625 | 5/8 | 0.4 | 2/5 |
| 0.875 | 7/8 | 0.(3) | 1/3 |
| 0.1 | 1/10 | 0.(6) | 2/3 |
| 0.05 | 1/20 | 0.1(6) | 1/6 |
| 0.01 | 1/100 | 0.(142857) | 1/7 |
How to Read Your Result
Rounded decimals are not repeating decimals
0.33 is exactly 33/100, not 1/3. If a value came from a calculator and was rounded, enter the repeating form, 0.(3), or use the nearest simple fraction with a small maximum denominator, which will find 1/3.
Choosing a denominator for measurements
Woodworking tape measures usually go to 1/16 inch, machinist rules to 1/32 or 1/64. Pick the finest mark you can actually read; the error column shows whether the nearest mark is close enough for the job.
Limitations & Accuracy Notes
- The nearest-simple-fraction and inch results use double-precision arithmetic, accurate to about 15 significant digits; the exact fraction does not.
- Scientific notation such as 1.5e-3 is not accepted; write it out as 0.0015.