Decimal to Fraction Calculator
Type a decimal and get the matching fraction in lowest terms, plus the mixed-number form when the value is above 1.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
How to convert a decimal to a fraction
A decimal is already a fraction written in a different way: each digit after the point counts tenths, hundredths, thousandths and so on. Converting it means writing those digits over the matching power of ten and then simplifying.
- Count the digits after the decimal point. Call that number k.
- Write all the digits (without the point) as the numerator and 10k as the denominator.
- Find the greatest common divisor of the numerator and denominator, and divide both by it.
- If the original number was larger than 1, rewrite the improper fraction as a whole number plus a proper fraction to get the mixed number.
decimal = digits ÷ 10^k, then divide top and bottom by their greatest common divisor
Example 1. 0.375 has three decimal places, so it is 375/1000. The greatest common divisor of 375 and 1000 is 125, and 375 ÷ 125 = 3 while 1000 ÷ 125 = 8. The answer is 3/8.
Example 2. 2.04 has two decimal places, so it is 204/100. Dividing by the greatest common divisor, 4, gives 51/25. As a mixed number, 51 ÷ 25 is 2 remainder 1, so 2.04 = 2 1/25.
Example 3, a negative decimal. −0.125 is −125/1000, which reduces to −1/8. The sign simply stays in front.
If you need to reduce a fraction you already have, use the simplify fractions calculator; to check the greatest common divisor, try the GCD calculator.
Using the calculator and reading the results
Enter a decimal in the Decimal number box and press Convert to Fraction. What you see depends on the size of the number:
- Between −1 and 1: one row, Fraction, such as 3/4 for 0.75.
- 1 or more, or −1 or less: two rows, Mixed fraction (2 1/2 for 2.5) and Simple fraction, the improper form (5/2).
- Whole numbers: the mixed form is just the number, and the simple form puts it over 1 (3 becomes 3/1).
- Zero: the mixed form is 0 and the simple form is 0/1.
Behind the scenes the calculator does not simply put the digits over a power of ten. It searches for the simplest fraction whose value is within about one part in ten billion of what you typed. For ordinary decimals such as 0.2, 0.35 or 12.5 that is exactly the fraction you would find by hand (1/5, 7/20, 25/2). For decimals with a long run of repeated digits it will find the neat fraction behind them, so a twelve-digit 0.333333333333 comes out as 1/3 and 0.142857142857 as 1/7.
Short or medium-length repeating entries can land on an awkward near-match, because the tolerance is tighter than the gap between the typed decimal and the neat fraction. Typing 0.333333 (six threes) returns 333332/999997, not 1/3. If you meant a repeating decimal, enter at least twelve digits or use the algebra method below.
Converting repeating decimals
A repeating decimal such as 0.3333... has no last digit, so it cannot be written over a power of ten. Algebra handles it: let x be the decimal, multiply by a power of ten that shifts one full repeat past the point, and subtract to cancel the repeating tail.
0.333... Let x = 0.333... Then 10x = 3.333..., and 10x − x = 3, so 9x = 3 and x = 1/3.
0.1666... (the 6 repeats). Let x = 0.1666... Then 100x = 16.666... and 10x = 1.666..., so 100x − 10x = 15, giving 90x = 15 and x = 15/90 = 1/6.
0.142857142857... (six repeating digits). Multiply by 106 and subtract: 999999x = 142857, so x = 142857/999999. Because 142857 × 7 = 999999, this reduces to 1/7.
Decimal to fraction conversion table
| Decimal | Fraction |
|---|---|
| 0.0625 | 1/16 |
| 0.05 | 1/20 |
| 0.1 | 1/10 |
| 0.125 | 1/8 |
| 0.15 | 3/20 |
| 0.2 | 1/5 |
| 0.25 | 1/4 |
| 0.35 | 7/20 |
| 0.375 | 3/8 |
| 0.4 | 2/5 |
| 0.5 | 1/2 |
| 0.6 | 3/5 |
| 0.625 | 5/8 |
| 0.75 | 3/4 |
| 0.8 | 4/5 |
| 0.875 | 7/8 |
| 1.125 | 1 1/8 |
| 0.333... (repeating) | 1/3 |
| 0.666... (repeating) | 2/3 |
| 0.1666... (repeating) | 1/6 |
Why some decimals end and others repeat
A fraction in lowest terms gives a terminating decimal exactly when its denominator has no prime factors other than 2 and 5, the prime factors of 10. So 3/8 (denominator 23) is 0.375 and 7/20 (22 × 5) is 0.35. A denominator with any other prime factor, like the 3 in 1/3 or the 7 in 1/7, produces a decimal that repeats forever.
That is also why converting a typed decimal is always possible: if the decimal ends, it equals a fraction with a power-of-ten denominator, and if it repeats, the algebra above finds a fraction with a denominator made of nines. To go the other way, divide with the fraction to decimal calculator, or turn a decimal into a percent with the decimal to percent calculator.
Common mistakes
- Miscounting zeros. 0.05 is 5/100 = 1/20, not 1/5. Every decimal place adds a zero to the denominator.
- Leaving the fraction unsimplified. 50/100 is correct but incomplete; the lowest-terms form is 1/2.
- Treating a rounded decimal as a repeating one. 0.33 is exactly 33/100, and only an endless run of threes equals 1/3.
- Losing the sign on a mixed number. −2.5 is −2 1/2, meaning minus two and a half, not −2 + 1/2.
Frequently asked questions
How do I turn a decimal into a fraction?
Write the digits after the point over a power of ten with as many zeros as there are decimal places, then divide both numbers by their greatest common divisor. For 0.375 that gives 375/1000 = 3/8.
How do I convert a decimal above 1 to a mixed number?
Keep the whole part and convert only the decimal part. For 2.04 the whole part is 2 and the decimal part 0.04 is 1/25, so the result is 2 1/25.
Can the calculator convert repeating decimals?
Yes, if you type enough digits. A run of twelve or more repeated digits, such as 0.333333333333, is recognised as 1/3. With fewer digits you may get a close but awkward fraction, so use the algebra method for exact results.
What is the difference between the mixed and the simple fraction?
A simple (improper) fraction has one numerator and denominator, such as 5/2. A mixed fraction pairs a whole number with a proper fraction, such as 2 1/2. They are the same value.
Does the sign carry over to the fraction?
Yes. A negative decimal gives a negative fraction, for example −0.125 becomes −1/8 and −2.5 becomes −2 1/2.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Decimal to Fraction Calculator. Reeliy. https://reeliy.com/calculators/decimal-to-fraction-calculator“Decimal to Fraction Calculator.” Reeliy, 2026, https://reeliy.com/calculators/decimal-to-fraction-calculator.