How do I convert decimal to fraction?
Type a decimal to see it as an exact fraction in lowest terms and as a mixed number.
- Fraction
- 5/8
0.625 as a fraction is 5/8.
- Mixed number
- 5/8
- How
- 0.625 = 625/1000 = 5/8 (both divided by 125)
Fraction: 5/8. 0.625 as a fraction is 5/8.
How to calculate
Writes a decimal number as an exact fraction in lowest terms, and as a mixed number.
Example with the default inputs (Decimal 0.625): 0.625 as a fraction is 5/8.
Method: Write the decimal over 10 to the power of its number of decimal places, then divide the numerator and denominator by their greatest common factor.
- The decimal is taken exactly as typed: 0.333 is 333/1000, not 1/3.
- The decimal keeps up to 17 significant digits, the precision of a number on this page.
- A negative decimal gives a negative fraction.
Worked examples
Each example is checked against the calculator on every build.
- Decimal 0.625 gives Fraction 5/8, Mixed number 5/8, How 0.625 = 625/1000 = 5/8 (both divided by 125).Source: hand calculation in content.mdx: 625/1000, divide by 125; Python 3 Fraction("0.625") = 5/8
- Decimal 1.25 gives Fraction 5/4, Mixed number 1 1/4.Source: hand calculation in content.mdx: 125/100 = 5/4 = 1 1/4; Python 3 Fraction("1.25") = 5/4
- Decimal -0.75 gives Fraction -3/4, Mixed number -3/4.Source: hand calculation in content.mdx: 75/100 = 3/4, keep the sign; Python 3 Fraction("-0.75") = -3/4
- Decimal 0.3 gives Fraction 3/10, How 0.3 = 3/10, already in lowest terms.Source: hand calculation in content.mdx: 3/10 has no common factor; Python 3 Fraction("0.3") = 3/10
How it works
A decimal with k digits after the point is a whole number over 10^k. For example, 0.625 has 3 decimal places, so it is 625 over 10^3 = 1000.
- Write the decimal as N / 10^k, where N is the decimal without its point.
- Find the greatest common factor (GCF) of N and 10^k.
- Divide both by the GCF. The result is the fraction in lowest terms.
- For a mixed number, divide the numerator by the denominator: the quotient is the whole part and the remainder over the denominator is the fraction part.
Assumptions
- The decimal is read exactly as typed. 0.333 is 333/1000, not 1/3.
- The decimal keeps up to 17 significant digits, the precision of a number on this page. Very small or large numbers are written out in full, never in exponent form: 0.0000001 = 1/10000000.
- A negative decimal gives a negative fraction: the sign stays in front.
Worked examples by hand
0.625. 3 decimal places, so 625/1000. The GCF of 625 and 1000 is 125. 625 ÷ 125 = 5 and 1000 ÷ 125 = 8, so 0.625 = 5/8.
1.25. 2 decimal places, so 125/100. The GCF is 25, which gives 5/4. 5 ÷ 4 = 1 remainder 1, so the mixed number is 1 1/4.
−0.75. 75/100, GCF 25, so −3/4.
0.3. 3/10. The GCF of 3 and 10 is 1, so 3/10 is already in lowest terms.
Other questions people ask
How do I convert a decimal to a fraction?
Write the digits after the decimal point over 10, 100, 1000 and so on (one zero per decimal place), then divide the top and bottom by their greatest common factor. For example, 0.625 = 625/1000, and dividing both by 125 gives 5/8.
What is 0.75 as a fraction?
0.75 = 75/100. Both numbers divide by 25, so 0.75 = 3/4.
How do I write a decimal bigger than 1 as a mixed number?
Convert it to a fraction first, then take out the whole part. 1.25 = 125/100 = 5/4, and 5/4 is 1 whole with 1/4 left, so 1.25 = 1 1/4.
What about repeating decimals like 0.333...?
This converter takes the decimal exactly as you type it, so 0.333 is 333/1000. The repeating decimal 0.333... (threes forever) is exactly 1/3, and 0.666... is 2/3.
Why is 0.1 not a strange fraction here?
Computers store 0.1 as a binary number that is very slightly off. The converter reads the decimal as you wrote it, so 0.1 is exactly 1/10.