Decimal to Fraction Calculator
Convert a decimal number into an exact fraction or its closest simple fraction.
Runs in your browser Your input never leaves your device.
Report a problem with this tool
About this tool
Type a decimal number and get the equivalent fraction in lowest terms. The default Exact method reads the digits as you typed them, so 3.14159 becomes 314159/100000 and 0.75 becomes 3/4; it also accepts scientific notation such as 1e-3. The alternative Closest simple fraction method uses continued fractions to find a short fraction that matches your number to within about 1 part in 100,000, so 0.333333 gives 1/3 and 3.14159 gives 355/113. You can also type a fraction such as 6/8 or a mixed number such as 1 1/2 to reduce it and see it as a decimal. When the fraction is larger than 1, a mixed number such as 3 1/4 is shown as well. Negative numbers keep their sign and whole numbers are shown over 1. The work is done in your browser.
How to use it
- Enter the decimal number.
- Choose Exact to keep every typed digit, or Closest simple fraction for a short approximation.
- Read the fraction and, if shown, the mixed number.
- Check the Decimal entered row to confirm the value that was used.
Example
3.14159 (Exact)
Exact fraction: 314159/100000 Mixed number: 3 14159/100000 Decimal entered: 3.14159
How to convert a decimal to a fraction by hand
- Count the digits after the decimal point. 0.875 has three.
- Write the digits over 1 followed by that many zeros: 875/1000.
- Find the greatest common divisor of the top and bottom. For 875 and 1000 it is 125.
- Divide both by it: 875/1000 = 7/8.
- For a number above 1, keep the whole part: 2.875 = 2 7/8, or 23/8 as an improper fraction.
Repeating decimals
A repeating decimal such as 0.333... has no exact finite form, so the Exact method can only use the digits you type. Choose Closest simple fraction instead: 0.333333 gives 1/3 and 0.142857 gives 1/7.
By hand, use algebra. Let x = 0.333..., then 10x = 3.333..., subtract to get 9x = 3, so x = 1/3. For two repeating digits multiply by 100: 0.272727... gives 99x = 27, so x = 3/11.
A fraction in lowest terms has a decimal that ends only when its denominator has no prime factors other than 2 and 5. That is why 3/8 is 0.375 but 1/3 and 1/7 repeat forever.
Common decimals as fractions
- 0.125
- 1/8
- 0.2
- 1/5
- 0.25
- 1/4
- 0.333...
- 1/3
- 0.375
- 3/8
- 0.5
- 1/2
- 0.625
- 5/8
- 0.666...
- 2/3
- 0.75
- 3/4
- 0.875
- 7/8
Common problems
- A repeating decimal gives a large fraction
- In Exact mode 0.333 gives 333/1000, because that is exactly what you typed. Switch to Closest simple fraction to get 1/3.
- Other text is not accepted
- The field reads a decimal number, a fraction such as 3/4 or a mixed number such as 1 1/2. Words, percent signs and units give no result.
- The closest fraction is not exactly equal
- It is an approximation within about 1 part in 100,000. Use Exact when you need the precise value.
Frequently asked questions
How do I turn a percentage into a fraction?
Divide by 100 first and enter the decimal, since the % sign is not accepted. For example 37.5% is 0.375, which gives 3/8.
Why does 3.14159 give 355/113 and not 22/7?
Closest simple fraction stops at the first fraction within about 1 part in 100,000 of your number. 22/7 is 3.142857, which is too far off, while 355/113 is 3.1415929.
What does a whole number give?
It is shown over 1, so 5 becomes 5/1.