Home › Generators & Text Tools › Decimal to Fraction Calculator
Decimal to Fraction Calculator
Use this decimal to fraction converter to turn a decimal such as 0.625 into an exact fraction — 5/8 — simplified with the greatest common divisor. The result is shown both as a plain fraction and, when it is larger than one, as a mixed number such as 2 1/2.
The conversion is done from the digits you type, not from a floating-point approximation, so 0.333 stays honestly 333/1000. If your decimal actually repeats forever, tick the repeating option and mark the repeating block: 0.333… then becomes 1/3, 0.1666… becomes 1/6, and 0.142857142857… becomes 1/7. Negative numbers and very long decimals are handled exactly.
For a repeating decimal, type the number up to the end of the first repeated block, tick the box, and enter the block that repeats. Example: for 0.1666…, type 0.16 and repeating digit 6.
How to use this converter
- Type the decimal number, for example 0.625 or 2.5.
- If the decimal repeats forever, tick This decimal repeats and type the repeating block — for 0.1666…, type the number as 0.16 and the repeating digit as 6.
- Press Convert.
- Read the mixed number in the big result and the simplified fraction in the result box.
- Read the working under the result: the unsimplified fraction, the GCD used, and the simplified answer.
How decimal to fraction conversion works
A finite decimal is already a fraction in disguise: the digits after the point sit over a power of ten. So 0.625 is 625/1000, and 2.5 is 25/10. The only remaining job is to simplify — divide the top and bottom by their greatest common divisor. Dividing 625 and 1000 by 125 gives 5/8, and dividing 25 and 10 by 5 gives 5/2, written as the mixed number 2 1/2.
A repeating decimal needs one extra idea. If the block r of length n repeats after a non-repeating prefix, the fraction is built with the 9s method: the denominator is made of n nines followed by as many zeros as the prefix has digits, and the numerator is the number formed by the prefix plus one copy of the block, minus the prefix alone. That is how 0.777… becomes 7/9 and 0.1666… becomes (16 − 1)/90 = 15/90 = 1/6.
The distinction matters: a typed 0.333 is a finite number and is exactly 333/1000, very close to but not equal to 1/3. Only mark a decimal as repeating when the block genuinely continues forever; the converter keeps the two cases separate so the answer is always the value you actually entered.
Fractions are still the working language of kitchens, workshops and classrooms: half a teaspoon, three-eighths of an inch, two-thirds of a class. Converting a decimal measurement or calculator answer into an exact fraction makes it usable with measuring cups, spanners and rulers, and for maths homework the method lines under the result show the unsimplified fraction and the GCD, so the working can be copied and checked.
Common decimals as fractions
| Decimal | Fraction | Mixed number |
|---|---|---|
| 0.1 | 1/10 | — |
| 0.125 | 1/8 | — |
| 0.25 | 1/4 | — |
| 0.333 (finite) | 333/1000 | — |
| 0.5 | 1/2 | — |
| 0.625 | 5/8 | — |
| 0.75 | 3/4 | — |
| 0.8 | 4/5 | — |
| 1.25 | 5/4 | 1 1/4 |
| 1.5 | 3/2 | 1 1/2 |
| 2.75 | 11/4 | 2 3/4 |
Worked example
Convert 0.625 to a fraction.
Write the digits over a power of ten: 0.625 = 625/1000. The greatest common divisor of 625 and 1000 is 125, so divide both numbers by 125: 625 ÷ 125 = 5 and 1000 ÷ 125 = 8.
The simplified answer is 5/8, which is the example loaded in the tool. For contrast, 2.5 becomes 5/2, shown as 2 1/2, and a plain finite 0.333 becomes 333/1000 — mark it repeating, with block 3, only when you mean 0.333… forever, which is exactly 1/3.
FAQ
What is 0.625 as a fraction?
0.625 is 5/8. Write it as 625/1000 and simplify by the greatest common divisor, 125: 625 ÷ 125 = 5 and 1000 ÷ 125 = 8. Eighths are common in measuring — 5/8 of an inch, for example — and this page opens with the 0.625 example, showing the unsimplified fraction and the GCD step under the result.
How do I write 2.5 as a fraction?
2.5 is 25/10, which simplifies to 5/2 when 25 and 10 are divided by their GCD, 5. Because 5/2 is more than one whole, it is usually written as the mixed number 2 1/2. This converter shows the mixed number as the big result and keeps the plain simplified fraction, 5/2, in the result box so you can use whichever form your work needs.
Is 0.333 the same as 1/3?
Not exactly. One third is 0.333… with the 3 repeating forever. A typed 0.333 stops after three digits and is exactly 333/1000 — close to 1/3 but smaller by 1/3000. If you mean the repeating value, tick “This decimal repeats” and enter 3 as the repeating block; the converter then gives exactly 1/3. Keeping the two apart is what makes the answers on this page trustworthy.
How does the repeating option work?
Type the decimal up to the end of its first repeating block, tick the box, and enter the block. For 0.1666… type 0.16 with repeating digit 6; for 0.777… type 0.7 with repeating digit 7; for 1/7 type 0.142857 with repeating block 142857. The calculator applies the 9s method — a denominator of nines for the block and zeros for the prefix — then simplifies by the GCD.
How do I convert a negative decimal to a fraction?
In exactly the same way, keeping the sign. The converter works with the size of the number and attaches the minus sign to the finished fraction, so −0.625 becomes −5/8 and −2.5 becomes −2 1/2. The sign belongs to the whole value, not to the numerator or denominator separately, and it is never dropped during simplification.
How exact is this converter for very long decimals?
Completely exact for the digits you type, because the fraction is built from the digit string with big-integer arithmetic rather than from a binary floating-point value. A twenty-digit whole part such as 12345678901234567890.5 converts to its exact fraction and mixed number. The only approximation in this area would be one you type yourself — a shortened repeating decimal, for instance — and the repeating option exists to remove exactly that problem.
Do I need an account to use the Decimal to Fraction Converter?
No. The Decimal to Fraction Converter works without any account or login, and you can use it as many times as you like. There is nothing to install either — it opens directly in your browser.
Can I use the Decimal to Fraction Converter on my phone?
Yes. The Decimal to Fraction Converter runs in your phone's browser, so there is nothing to download or install. The layout adjusts to small screens and the calculation works exactly the same as on a computer.