Decimal to Fraction Converter
Turn a decimal into a fraction β repeating decimals too β and fractions back into decimals.
Put repeating digits in brackets, 0.1(6), or end with dots, 0.1666...
A fraction, 5/8, or a mixed number, 2 1/8.
58
Working
Type a decimal to get it as an exact fraction in lowest terms, or type a fraction to get its decimal: the two boxes are linked, and whichever you edit fills the other. It opens on 0.625, which is 5/8. Repeating decimals convert exactly, and a decimal that has no neat fraction can be rounded to the nearest sixteenth of an inch or to the closest fraction with a small denominator.
How to use it
Decimal takes a number such as 2.125, -0.75 or 1e-3, of up to 100 digits. Write a repeating part in brackets: 0.(3) is 0.333β¦, and 0.1(6) is 0.1666β¦. A decimal that ends in dots, such as 0.1666..., is read the same way when its last digits repeat at least twice in a row, and a checkbox names the reading (βTreat as 0.1(6)β); untick it to take the digits as they stand, which gives 833/5000. When nothing repeats before the dots, they are ignored and a note says so.
Fraction takes a fraction such as 22/7 or a mixed number such as 2 1/8, and gives the decimal with any repeating digits in brackets: 3.(142857). A repeating part longer than 100 digits is cut there, with its length stated.
Approximate replaces the exact fraction with a nearby simpler one and says how far above or below it is:
- Nearest 1/N rounds to the nearest 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, the divisions of an inch ruler, and reduces the result. A value exactly halfway rounds away from zero.
- Simplest fraction finds the closest fraction whose denominator is at most 10, 100, 1,000 or a number you choose.
Everything runs in your browser.
How it works
A decimal that ends is its digits over a power of ten: three decimal places go over 1,000. Dividing the top and bottom by their greatest common divisor gives lowest terms.
A repeating decimal is multiplied by two powers of ten chosen so that the repeating digits line up after the point. Subtracting one from the other cancels them and leaves a whole number, which is then divided out. Nines that repeat for ever equal the next digit up, so 0.(9) as a fraction gives 1.
The simplest fraction within a denominator comes from the continued fraction of the value, which yields the fractions that are closer than any other with a denominator as small. The conversion itself is exact at any length, on whole numbers rather than floating point.
Examples
0.625 as a fraction
A Decimal of 0.625 gives 5/8.
- There are 3 decimal places, so write the digits over 1,000. 0.625 = 625/1000
- Divide the top and bottom by their greatest common divisor, 125. 625/1000 = 5/8
The repeating decimal 0.1666β¦
A Decimal of 0.1(6) gives 1/6.
- Call the number x. x = 0.1666β¦
- Multiply by 10, so the repeating digits start right after the point. 10x = 1.666β¦
- Multiply x by 100, which moves one full repeat past the point. 100x = 16.666β¦
- Subtract one from the other. The repeating digits cancel. 100x β 10x = 16 β 1, so 90x = 15
- Divide, and simplify. x = 15/90 = 1/6
0.3 inches on a ruler
A Decimal of 0.3 with Approximate on, Nearest 1/N and the nearest 1/16: 5/16, which is 0.0125 above 0.3.
- Multiply by 16 to count in parts of 1/16. 0.3 Γ 16 = 4.8
- Round to the nearest whole number; a half rounds away from zero. 4.8 rounds to 5
- Put it over 16 and simplify. 5/16
Ο as a simple fraction
A Decimal of 3.14159265358979 with Approximate on and Simplest fraction: a largest denominator of 10 gives 22/7 (about 0.001264489267 above 3.14159265358979), and 1,000 gives 355/113 (about 2.667641923 Γ 10β»β· above 3.14159265358979).
Common fractions and their decimals
| Fraction | Decimal |
|---|---|
| 1/16 | 0.0625 |
| 1/8 | 0.125 |
| 3/16 | 0.1875 |
| 1/4 | 0.25 |
| 5/16 | 0.3125 |
| 1/3 | 0.(3) |
| 3/8 | 0.375 |
| 7/16 | 0.4375 |
| 1/2 | 0.5 |
| 9/16 | 0.5625 |
| 5/8 | 0.625 |
| 2/3 | 0.(6) |
| 11/16 | 0.6875 |
| 3/4 | 0.75 |
| 13/16 | 0.8125 |
| 7/8 | 0.875 |
| 15/16 | 0.9375 |
Frequently asked questions
See also
- Fraction Calculator β to add, subtract, multiply and divide fractions.
- Percentage Calculator β to turn a fraction into a percentage.