Decimal to Fraction Converter
Turn any decimal or percent into its simplest fraction and mixed number, with the steps. Repeating decimals like 0.333... or 0.1(6) work too, and you can go the other way: fraction to decimal, with the repeating part found for you.
Repeating? Type 0.333... or 0.1(6). You can also type pi, e, sqrt2 or phi.
For 0.1666… type 0.1 in the first box and 6 here.
Like 3/8, 1 1/2 (a mixed number) or −5/4.
Exact shows repeating digits with a bar over them, like 0.16.
Pick mm or cm to get the nearest inch fraction of a metric size (1 inch = 25.4 mm).
Nearest fractions and conversions table
Nearest inch fractions
| Nearest | Fraction | Decimal | Off by |
|---|
Best simple fractions
Each one is the closest fraction for its size of bottom number (continued-fraction convergents).
| Fraction | Decimal | Off by |
|---|
Common conversions: sixteenths
| Fraction | Decimal | Percent | mm (if inches) |
|---|
How your fraction is worked out
Write the decimal over 10, 100 or 1000, then divide the top and bottom by their GCD.
- 1
Write over 10s
3 decimal places0.375 = 375/1000bottom 1000
- 2
Find the GCD
of 375, 10003 divisionsGCD = 125
- 3
Divide both
375 ÷ 125 = 31000 ÷ 125 = 8= 3/8
- 4
Answer
3/8= 37.5%
Read more: the formula, a worked example, repeating decimals and inch fractions
A decimal is a fraction whose bottom is 10, 100, 1000 and so on: 0.375 means 375 thousandths. To get the simplest fraction, write it that way and then divide the top and bottom by their greatest common divisor (GCD). Repeating decimals need one extra step, shifting the number so the repeats cancel. Going the other way, a fraction is just the top divided by the bottom.
The formula
decimal with k places = (the digits without the point) / 10^k
simplest form = (top ÷ GCD) / (bottom ÷ GCD)
repeating decimal x with f fixed digits and r repeating digits:
x = (all digits up to the end of the first repeat − the digits before the repeat) / (10^f × (10^r − 1))
percent p% = p / 100
fraction to decimal = top ÷ bottom (long division; a remainder seen before means the digits repeat)
nearest 1/N = round(x × N) / N, off by (that fraction − x)
Worked example
0.375 has 3 decimal places, so write it over 10^3 = 1000: 0.375 = 375/1000. Find the GCD of 375 and 1000 with Euclid’s method: 1000 = 2 × 375 + 250, then 375 = 1 × 250 + 125, then 250 = 2 × 125 + 0, so the GCD is 125. Divide both: 375 ÷ 125 = 3 and 1000 ÷ 125 = 8, so 0.375 = 3/8. As a percent that is 3/8 × 100 = 37.5%. Check: 3 ÷ 8 = 0.375.
Repeating decimals
For 0.1666… (written 0.1(6) or 0.16), one digit (1) comes before the repeat and one digit (6) repeats. Let x = 0.1666…. Then 100x = 16.666… and 10x = 1.666…. Subtract: 100x − 10x = 16 − 1, so 90x = 15 and x = 15/90. The GCD of 15 and 90 is 15, so x = 1/6. When the repeat starts straight after the point, the shortcut is the repeating digits over the same number of 9s: 0.(3) = 3/9 = 1/3, 0.(27) = 27/99 = 3/11 and 0.(142857) = 142857/999999 = 1/7. And yes, 0.999… = 9/9 = 1 exactly.
If you type dots, like 0.1666... or 0.142857142857..., the converter looks for the shortest block that appears at least twice at the end and treats that as the repeat. If no block shows twice (0.12...), the last digit repeats.
Fraction to decimal, and why some repeat
Divide the top by the bottom. For 1/7: 10 ÷ 7 = 1 remainder 3, 30 ÷ 7 = 4 r 2, 20 ÷ 7 = 2 r 6, 60 ÷ 7 = 8 r 4, 40 ÷ 7 = 5 r 5, 50 ÷ 7 = 7 r 1. Remainder 1 is where we started, so the digits 142857 repeat for ever: 1/7 = 0.(142857). A simplified fraction stops only when its bottom is made of 2s and 5s (the factors of 10), because only then can enough 10s divide it exactly. 7/12 has a 3 in its bottom (12 = 2 × 2 × 3), so it is 0.58(3): two digits before the repeat (from the two 2s), then 3 repeating.
Inch fractions for tape measures
Imperial tape measures and drill bits go in halves, quarters, eighths, sixteenths, thirty-seconds and sixty-fourths. To round a decimal to the nearest 1/16, multiply by 16, round to a whole number and put it over 16: 0.3 × 16 = 4.8 → 5, so 0.3″ ≈ 5/16″ (0.3125″, 0.0125″ too long). For a metric size, change it to inches first by dividing by 25.4: 7.9 mm ÷ 25.4 = 0.311″, and 0.311 × 16 = 4.98 → 5, so it is about 5/16″.
Best simple fractions (continued fractions)
“Best fraction with bottom up to N” finds the closest fraction whose bottom is no bigger than N. It uses the continued fraction of your number. π = 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + …)))), written [3; 7, 15, 1, 292, …]. Cutting it off at each step gives the convergents 3, 22/7, 333/106 and 355/113. 22/7 = 3.142857… is off by about 0.00126, and 355/113 = 3.1415929… is off by only about 0.000000267. Each convergent is closer than any fraction with a smaller bottom.
Common fractions
| Fraction | Decimal | Percent | mm (as inches) |
|---|---|---|---|
| 1/64 | 0.015625 | 1.5625% | 0.397 |
| 1/32 | 0.03125 | 3.125% | 0.794 |
| 1/16 | 0.0625 | 6.25% | 1.588 |
| 1/10 | 0.1 | 10% | 2.54 |
| 1/8 | 0.125 | 12.5% | 3.175 |
| 1/6 | 0.1(6) | 16.67% | 4.233 |
| 1/5 | 0.2 | 20% | 5.08 |
| 1/4 | 0.25 | 25% | 6.35 |
| 1/3 | 0.(3) | 33.33% | 8.467 |
| 3/8 | 0.375 | 37.5% | 9.525 |
| 1/2 | 0.5 | 50% | 12.7 |
| 5/8 | 0.625 | 62.5% | 15.875 |
| 2/3 | 0.(6) | 66.67% | 16.933 |
| 3/4 | 0.75 | 75% | 19.05 |
| 7/8 | 0.875 | 87.5% | 22.225 |
| 1/7 | 0.(142857) | 14.29% | 3.629 |
Everything is worked out exactly with whole numbers of any size, so there is no rounding error: 0.1 + 0.2 really is 3/10 here. Decimals are only rounded when you pick a number of decimal places.
Common questions
How do I convert a decimal to a fraction?
Write the decimal over 1 followed by as many zeros as it has decimal places, then divide the top and bottom by their greatest common divisor. 0.375 has 3 places, so it is 375/1000. The GCD of 375 and 1000 is 125, and 375/1000 = 3/8.
How do I turn a repeating decimal into a fraction?
Call the number x and multiply it by powers of 10 so the repeating parts line up, then subtract. For 0.1666…: 100x = 16.666… and 10x = 1.666…, so 90x = 15 and x = 15/90 = 1/6. A pure repeat is the repeating digits over the same number of 9s: 0.(3) = 3/9 = 1/3 and 0.(142857) = 142857/999999 = 1/7.
How do I convert a fraction to a decimal?
Divide the top by the bottom. If the remainder reaches 0, the decimal stops (3/8 = 0.375). If a remainder comes back that you have seen before, the digits from that point repeat for ever: 1/7 = 0.142857142857…, written 0.(142857) or with a bar over 142857.
Which fractions give decimals that stop?
Simplify the fraction first. If the bottom number has no prime factors other than 2 and 5, the decimal stops. 3/8 (8 = 2 × 2 × 2) stops at 0.375, and 7/20 (20 = 2 × 2 × 5) stops at 0.35. Any other factor, like the 3 in 1/6 or the 7 in 1/7, makes it repeat.
What is 0.3 inches as a fraction on a tape measure?
Multiply by 16 and round: 0.3 × 16 = 4.8, which rounds to 5, so 0.3 inch is about 5/16 inch (0.3125). That is 0.0125 inch too big. To the nearest 1/32 it is 10/32 = 5/16 again, and to the nearest 1/64 it is 19/64 (0.296875), only 0.003125 inch short.
What fraction is closest to π?
The best simple fractions for π come from its continued fraction [3; 7, 15, 1, 292, …]: 22/7 (off by 0.00126), 333/106, and 355/113, which is right to 6 decimal places (off by only 0.000000267). Type pi in the box and switch to Advanced to see the whole list.
Related calculators
Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.