Fraction to Decimal Not Working? 7 Easy Fixes, Explained
When a fraction to decimal result looks wrong, it is almost always one of seven ordinary problems: an endless tail of digits, two answers that disagree, a mixed number read the wrong way, or a computer that quietly rounded for you. This fraction to decimal page matches each symptom to its cause and gives the fix, with the numbers worked out.
Seven fraction to decimal symptoms, causes and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| The decimal never stops, such as 0.3333333 | The fraction is a repeating decimal, which is normal | Write 0.(3) or round to the places you need |
| Two tools show 0.67 and 0.66 for 2/3 | One rounds, the other truncates | Pick one rule and state it |
| 0.333 turns into 333/1000, not 1/3 | 0.333 is a terminating decimal, a different number | Enter the repeating digit as repeating |
| 2 3/4 gives 1.5 | The mixed number was multiplied, not added | Use 2 + 3/4 = 2.75 |
| 3/4 returns 0 in code | Integer division drops the remainder | Convert one operand to a float first |
| 0.1 + 0.2 shows 0.30000000000000004 | Binary floating point cannot store 0.1 exactly | Use exact fractions or round for display |
| Result shows 50/100, not 1/2 | The fraction was not reduced | Divide top and bottom by their greatest common divisor |
Fix 1: endless digits are not an error
In fraction to decimal work, divide 1 by 3 and the remainder is 1 again after every digit. The same step repeats, so the same digit repeats. The converter detects this by recording every remainder it has seen. Once a remainder shows up twice, the block of digits between the two visits is the repeating part.
Here is the rule that tells you in advance. A fraction in lowest terms ends exactly when its denominator has no prime factors other than 2 and 5. Anything else repeats. The repeat can never be longer than the denominator minus 1, because there are only that many different non zero remainders.
| Fraction | Denominator factors | Decimal | Type |
|---|---|---|---|
| 3/4 | 2 × 2 | 0.75 | Ends |
| 7/8 | 2 × 2 × 2 | 0.875 | Ends |
| 3/40 | 2 × 2 × 2 × 5 | 0.075 | Ends |
| 1/3 | 3 | 0.(3) | Repeats, period 1 |
| 5/6 | 2 × 3 | 0.8(3) | Repeats after one digit |
| 7/12 | 2 × 2 × 3 | 0.58(3) | Repeats after two digits |
| 5/11 | 11 | 0.(45) | Repeats, period 2 |
| 1/7 | 7 | 0.(142857) | Repeats, period 6 |
| 1/13 | 13 | 0.(076923) | Repeats, period 6 |
18/30 has a 3 in its denominator but is not a repeating decimal. Reduced, it is 3/5 = 0.6. Always simplify first, then look at the prime factors. A GCD and LCM calculator finds the divisor for you, and a prime factorization tool shows the factors.
Enter the whole part, numerator and denominator, or go the other way from a decimal to an exact fraction. Repeating digits are detected and shown in brackets.
Open the Fraction to Decimal ConverterFix 2: when rounding and truncating disagree
Two fraction to decimal answers that differ in the last place are usually two valid choices. Rounding looks at the next digit. Truncating cuts and ignores it. For repeating decimals the difference shows up often.
| Fraction | Exact decimal | 2 places rounded | 2 places truncated | 3 places rounded |
|---|---|---|---|---|
| 2/3 | 0.(6) | 0.67 | 0.66 | 0.667 |
| 1/6 | 0.1(6) | 0.17 | 0.16 | 0.167 |
| 5/6 | 0.8(3) | 0.83 | 0.83 | 0.833 |
| 7/12 | 0.58(3) | 0.58 | 0.58 | 0.583 |
| 1/7 | 0.(142857) | 0.14 | 0.14 | 0.143 |
Which one is right? Rounding is the usual fraction to decimal rule for reporting. Truncating is sometimes required for money rules or for programs that must never overstate a value. Write which one you used.
Fix 3: decimal to fraction returns the wrong fraction
Type 0.333 into a decimal to fraction tool and you get 333/1000. That is correct for what you typed, since 0.333 has exactly three digits. It is just not 1/3. If you mean an endless 3, say so, by using the repeating option.
The algebra behind repeating decimals is short. Let x be the number, shift it by a power of ten to line up the repeat, subtract, and the repeating tail cancels.
- Pure repeat: x = 0.(27)The block has two digits, so multiply by 100: 100x = 27.(27). Subtract x: 99x = 27. So x = 27/99 = 3/11.
- Mixed repeat: x = 0.8(3)Multiply by 10 to get 10x = 8.(3), and by 100 to get 100x = 83.(3). Subtract: 90x = 75. So x = 75/90 = 5/6.
- Check by dividing3 ÷ 11 gives 0.2727 and so on, and 5 ÷ 6 gives 0.8333 and so on. Both match.
Related oddity: 0.(9) is exactly 1, not a number just under it. The Wikipedia article on repeating decimals explains why: 0.(9) is 9/9.
Fix 4 and 5: mixed numbers and integer division
A mixed number such as 2 3/4 means 2 plus 3/4. Convert it to an improper fraction first: 2 × 4 + 3 = 11, so 11/4, which is 2.75. Reading it as 2 times 3/4 gives 1.5, a classic slip.
In code, the trap is integer division. Many languages divide two whole numbers and throw the remainder away. For fraction to decimal in Python 3, / is true division and // for floor division, so both appear below.
Python fraction to decimal: division behaves differently by operator
print(3 / 4) # 0.75
print(3 // 4) # 0
print(11 / 4) # 2.75
print(2 + 3 / 4) # 2.75
print(2 * 3 / 4) # 1.5 (the mixed number slip)Fix 6: why 0.1 plus 0.2 is not 0.3 on a computer
Fraction to decimal on a computer is tricky because computers store most decimals in binary. A fraction ends in base 10 when its denominator is built from 2 and 5, but in base 2 it only ends when the denominator is a power of 2. So 1/10 repeats forever in binary and gets rounded when stored. Adding two such values exposes the error.
Fraction to decimal: floating point against exact fractions
print(0.1 + 0.2)
# 0.30000000000000004
from fractions import Fraction
print(Fraction(1, 10) + Fraction(2, 10))
# 3/10The converter on this page avoids the problem for fraction to decimal work. It performs long division on whole numbers, and its decimal to fraction direction uses exact integer arithmetic instead of approximation.
Fix 7: fractions that will not simplify
In fraction to decimal work, the fraction 75/100 is right but untidy. Find the greatest common divisor with the Euclidean algorithm: 100 = 75 × 1 + 25, then 75 = 25 × 3 + 0. The divisor is 25, so 75/100 becomes 3/4. If the divisor is 1 the fraction is already in lowest terms.
Before the fix
- 50/100
- 0.333 read as 333/1000
- 2 × 3/4 = 1.5
- 3/4 = 0 in code
After the fix
- 1/2
- 0.(3) read as 1/3
- 2 + 3/4 = 2.75
- 3.0 / 4 = 0.75
Quick reference: common values
Memorise a handful and you will rarely need a tool for everyday work. The patterns also help you sanity check a result that looks off. Eighths step by 0.125, twelfths step by 0.08(3), and ninths simply repeat the numerator.
| Fraction | Decimal | Fraction | Decimal |
|---|---|---|---|
| 1/2 | 0.5 | 1/8 | 0.125 |
| 1/3 | 0.(3) | 3/8 | 0.375 |
| 2/3 | 0.(6) | 5/8 | 0.625 |
| 1/4 | 0.25 | 1/9 | 0.(1) |
| 3/4 | 0.75 | 2/9 | 0.(2) |
| 1/5 | 0.2 | 1/11 | 0.(09) |
| 1/6 | 0.1(6) | 1/12 | 0.08(3) |
| 1/10 | 0.1 | 1/20 | 0.05 |
Diagnostic checklist for your result
Need a percentage after fraction to decimal? A percentage calculator turns 0.75 into 75% in one step.
The block has six digits, so multiply by 1,000,000 and subtract: 999999x = 142857. Dividing both by 142857 gives x = 1/7.
Frequently asked questions
How do I convert a fraction to a decimal?
Divide the numerator by the denominator. For 3/4 that is 3 ÷ 4 = 0.75. If the division never ends, the decimal repeats.
Why does fraction to decimal for 1/3 give 0.3333 and never stop?
Each step of long division leaves a remainder of 1, so the same digit 3 comes out again and again. The exact value is written 0.(3).
How can I tell if a fraction terminates?
Reduce it to lowest terms, then factor the denominator. If only 2 and 5 appear, the decimal ends. Otherwise it repeats.
What is 5/6 in fraction to decimal form?
It is 0.8333 and so on, written 0.8(3). The 8 appears once and the 3 repeats forever.
How long can the repeating part be?
For a denominator k, the repeating block is never longer than k minus 1 digits. For 1/7 it is exactly 6 digits.
Is 0.999 repeating equal to 1?
Yes. Written as a fraction, 0.(9) is 9/9, which is 1. It is another way to write the same number.
Sources: Wikipedia: Repeating decimal
