Decimal to Fraction Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 12/5/2026
To convert a decimal to a fraction, write it over a power of 10, then simplify: 0.375 = 375/1,000 = 3/8. For a number like 0.3333… or π, the calculator finds the closest fraction whose denominator stays within your limit: 1/3, or 355/113 for π.
Explanation
Any terminating decimal can be written as a fraction: place it over the power of 10 matching the number of digits after the decimal point. 0.375 has three decimal places, so 0.375 = 375/1,000. You then simplify by dividing numerator and denominator by their greatest common divisor, here 125, giving 3/8, the fraction in lowest terms. Things get trickier when the number entered is only an approximation: 0.333333 most likely comes from 1/3, and 3.14159265 from π, which is not a fraction at all. The calculator then uses continued fractions, a method that yields the best rational approximations of a number. For π, you get in turn 3, 22/7, 333/106, 355/113… Each fraction is more accurate than any with a smaller denominator. The maximum denominator sets the trade-off between simplicity and accuracy: with a limit of 100, π becomes 311/99; with 1,000, 355/113, accurate to 3 ten-millionths. The difference shown is the gap between the fraction found and the number entered: if it is 0, the conversion is exact. The mixed number separates the whole part from the remaining fraction: 9/4 is written 2 1/4. This is the form used in cooking or for inch measurements, where you choose a maximum denominator of 8, 16 or 32. To simplify a fraction you already have, or find a common divisor, use the GCD and LCM calculator; to express a fraction as a percentage, the percentage calculator.
Example: 0.375
Inputs
Number: 0.375. Maximum denominator: 1,000.
Calculation
0.375 = 375/1,000. GCD(375, 1,000) = 125. 375 ÷ 125 = 3 and 1,000 ÷ 125 = 8, so 0.375 = 3/8.
Result
0.375 = 3/8 exactly: the difference is zero.
Frequently asked questions
How do I convert a repeating decimal, such as 0.272727…?
Enter enough decimal places, for example 0.272727, with a maximum denominator of 100: the calculator finds 3/11. Algebraically, if x = 0.2727…, then 100x − x = 27, so x = 27/99 = 3/11.
Why isn't the result exact?
Because the number entered has no exact fraction within the chosen limit, or is not rational, like π or √2. The fraction shown is then the closest possible; raise the maximum denominator for more accuracy.
What is a mixed number?
It writes a fraction greater than 1 as a whole number followed by a fraction less than 1: 11/4 = 2 3/4, because 11 = 2 × 4 + 3.