Decimal to Fraction Calculator
Convert any decimal number to a simplified fraction in lowest terms, with step-by-step working. Handles terminating and long decimals.
Did this tool work for you?
How to use this calculator
Write the decimal as a fraction with denominator 10^n (where n = number of decimal places), then simplify using the Greatest Common Divisor.
- 1
Enter the decimal number you want to convert.
- 2
The fraction in lowest terms is shown with a three-step explanation.
- 3
If the fraction is improper (numerator > denominator), the mixed number is also displayed.
- 4
The decimal verification confirms the fraction equals your original input.
Frequently asked questions
How do you convert a decimal to a fraction by hand?
Write the digits over a power of ten, one zero per decimal place: 0.625 has 3 places, so 625/1000. Find the GCD of 625 and 1000, which is 125, and divide both by it to get 5/8. The tool shows these as its raw fraction, GCD and simplified steps.
Is there a limit on how many decimal places it handles?
The only limit is the 15 to 17 significant digits a typed number can carry. The tool reads the digits of the shortest decimal form and does the arithmetic with exact big integers, so 0.333333333333 returns 333333333333/1000000000000. Entered as 0.1 + 0.2, the stored value 0.30000000000000004 becomes 7500000000000001/25000000000000000.
Does it recognise 0.3333 as 1/3?
No. It converts exactly what you type, so 0.3333 returns 3333/10000 and 0.142857 returns 142857/1000000. There is no search for a nearby simple fraction and no denominator cap. To get 1/3 exactly, use the algebra x = 0.333…, 10x − x = 3.
How are negative numbers, zero and whole numbers shown?
The minus sign sits on the numerator, so −0.75 gives −3/4 and −2.5 gives −5/2 with the mixed number −2 1/2. Zero returns 0/1, and a whole number such as 4 returns 4/1 with no mixed-number row. A cleared box is treated as zero.
What does the mixed number row show?
It appears when the magnitude is at least 1 and the fraction is not a whole number. 2.375 simplifies to 19/8 and appears as 2 3/8, since 19 − 2 × 8 = 3. Numbers below 1 do not get the row.
What happens with very small or very large numbers?
Numbers that JavaScript writes in exponent form, such as 1e-7 or 1e21, are expanded correctly. 1e-7 returns 1/10000000. Earlier, 1e-7 returned 0/1 because the exponent form has no decimal point to count.
What is the decimal verification row?
It divides the simplified numerator by the denominator and shows the result to 12 significant digits with trailing zeros removed. For 5/8 it prints 0.625. It confirms the fraction matches the input to that precision, nothing more.
Can irrational or repeating decimals be converted exactly?
Only the finite digits you type are converted. Repeating decimals are rational but need algebra, and irrational numbers such as π have no fraction at all, so entering 3.14159 returns 314159/100000, which is not π.
Decimal to fraction — simplify with GCD and show mixed number
The GCD method explained
The key to decimal-to-fraction conversion is the GCD (Greatest Common Divisor). After writing the decimal as a ratio (e.g., 625/1000), the GCD of numerator and denominator tells us the largest factor that divides both — dividing by it gives the simplest form. The Euclidean algorithm finds the GCD efficiently: GCD(625, 1000) = GCD(625, 375) = GCD(375, 250) = GCD(250, 125) = GCD(125, 0) = 125. So 625/1000 = 5/8.
Terminating vs. repeating: which decimals are fractions?
Every terminating decimal is a fraction (rational number). Repeating decimals are also rational — 0.142857142857… = 1/7. Non-terminating, non-repeating decimals (like π = 3.14159… or √2 = 1.41421…) are irrational numbers and cannot be expressed as fractions. If a decimal terminates or repeats, it is guaranteed to have a fractional equivalent.
When fractions are more useful than decimals
Fractions preserve exactness in arithmetic. 1/3 + 1/6 = 1/2 exactly; as decimals: 0.3333… + 0.1666… = 0.5 (requires rounding). In baking and carpentry, fractions (3/4 cup, 5/8 inch) are the standard — not because of tradition but because rulers and measuring cups are divided into halves, quarters, and eighths. Fractions also reveal relationships: 0.333… is just "a number," but 1/3 shows it is exactly one part of three equal parts.
Common decimals and their fractions
These are the conversions that come up most often in cooking, carpentry and school maths. The middle column shows the fraction before simplification.
| Decimal | Before simplifying | In lowest terms |
|---|---|---|
| 0.05 | 5/100 | 1/20 |
| 0.125 | 125/1000 | 1/8 |
| 0.15 | 15/100 | 3/20 |
| 0.2 | 2/10 | 1/5 |
| 0.25 | 25/100 | 1/4 |
| 0.375 | 375/1000 | 3/8 |
| 0.4 | 4/10 | 2/5 |
| 0.5 | 5/10 | 1/2 |
| 0.6 | 6/10 | 3/5 |
| 0.625 | 625/1000 | 5/8 |
| 0.75 | 75/100 | 3/4 |
| 0.8 | 8/10 | 4/5 |
| 0.875 | 875/1000 | 7/8 |
Worked example: 2.375 as a mixed number
2.375 has 3 decimal places, so write it as 2375/1000. The GCD of 2375 and 1000 is 125, and dividing both by 125 gives 19/8. As a mixed number that is 2 3/8, because 2 × 8 = 16 and 19 − 16 = 3. Check: 19 ÷ 8 = 2.375.
Repeating decimals: why 0.3333 is not 1/3
The calculator converts exactly the digits you type. Typing 0.3333 gives 3333/10000, not 1/3, because 0.3333 is a rounded value. To get the exact fraction of a repeating decimal, use algebra (for 0.333…: 10x − x = 3, so x = 1/3) or look it up below.
| Exact fraction | Value you type | Calculator returns |
|---|---|---|
| 1/3 | 0.3333 | 3333/10000 |
| 2/3 | 0.666667 | 666667/1000000 |
| 1/7 | 0.142857 | 142857/1000000 |
More runs: negatives, long decimals and exponent notation
Each row below was produced by running the tool. The sign always sits on the numerator, a whole number comes back over 1, and a value like 1e-7, which has no decimal point when written out by the computer, is still expanded correctly.
| Input | Fraction | Mixed number |
|---|---|---|
| -0.75 | -3/4 | none |
| -2.5 | -5/2 | -2 1/2 |
| 4 | 4/1 | none |
| 0 | 0/1 | none |
| 1e-7 | 1/10000000 | none |
| 0.30000000000000004 | 7500000000000001/25000000000000000 | none |
Learn more from an authoritative source:
WikipediaSimplify Fractions Calculator
Reduce any fraction to its simplest form (lowest terms) using the GCD. Shows the GCD used and the decimal equivalent.
Compare & Order Fractions
Compare and order up to four fractions from smallest to largest, showing decimal equivalents and the LCD. Leave unused fields at 0.
Equivalent Fractions Calculator
Generate a list of equivalent fractions for any given fraction. Shows the simplified form and up to 10 equivalents.
LCD — Least Common Denominator
Find the Least Common Denominator (LCD) of up to four denominators, with prime factorization method shown step-by-step.
Long Division Calculator
Divide any two integers with step-by-step long division. Shows quotient, remainder, decimal result, and the full long division process as text.
Scientific Calculator
Evaluate mathematical expressions including trigonometry, logarithms, exponents, and more.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →