Decimal to Fraction Calculator - Convert & Simplify
Convert a decimal number into a simplified fraction, including common repeating decimals, using a continued-fraction algorithm.
Fraction
3/4
0.75 ≈ 3 ÷ 4
How to Convert a Decimal to a Fraction
For a terminating decimal, the standard method is to write the digits after the decimal point as the numerator over a power of 10 (matching the number of decimal places), then simplify by dividing both by their greatest common divisor (GCD). This calculator uses a continued-fraction algorithm instead, which finds the simplest fraction that matches your input to a very tight tolerance — this handles terminating decimals exactly and also recovers common repeating decimals (like 0.333333333 → 1/3) when you type enough repeating digits.
Example
Entering 0.75 gives 75/100, and since GCD(75, 100) = 25, dividing both by 25 simplifies it to 3/4. Entering 0.125 gives 125/1000, which simplifies to 1/8. Entering 0.666666667 (rounded from 2/3) is recognized as 2/3.
Common Use Cases
- Converting measurements (like 0.5 inches) into fraction form for woodworking or cooking.
- Checking homework answers that require fraction rather than decimal form.
- Simplifying calculator or spreadsheet output into a cleaner fraction for a report.
FAQs
Does this work for repeating decimals?
Yes, as long as you type enough repeating digits for the pattern to be recognizable (for example, 0.142857143 for 1/7). The algorithm finds the simplest fraction within a tiny tolerance of your input, which correctly recovers common repeating fractions when given sufficient precision.
What about irrational numbers like π?
Irrational numbers (like π or √2) cannot be expressed as an exact fraction by definition. If you enter a truncated value like 3.14159265, the calculator will return the closest simple fraction it can find within its tolerance (such as the well-known approximation 355/113), but this is always an approximation, not an exact equivalent.
Why is the denominator sometimes a large or unexpected number?
If a decimal doesn't match a simple fraction closely, the algorithm may need a larger denominator to represent it within the tolerance. Very long or seemingly random decimal inputs will tend to produce larger denominators than clean fractions like halves, thirds, or quarters.
