Decimal to Fraction Calculator
Exact fractions for decimals and repeating decimals, plus the closest simple fraction.
About this tool
Type a decimal such as 0.375 or 2.125. For a repeating decimal, put the repeating digits in brackets: 0.(3) for 0.333โฆ or 1.1(6) for 1.1666โฆ. You'll see the exact fraction, the mixed number and the percentage. For long decimals, you also get the closest fraction with a denominator no larger than the limit you set.
Converting decimals to fractions
A terminating decimal is already a fraction over a power of ten. 0.375 is 375/1000, and dividing the top and bottom by their greatest common divisor, 125, gives 3/8. Repeating decimals have exact fractions too, and the trick is to subtract away the repeat. If x = 0.333โฆ, then 10x = 3.333โฆ, and 10x โ x = 3, so x = 3/9 = 1/3. For 1.1666โฆ, multiplying by 10 and by 100 and subtracting gives 7/6. The calculator does this algebra with exact whole-number arithmetic, however many digits you type. Some decimals are only approximations of something else, such as 3.14159 for ฯ. For those, the tool uses continued fractions to find the best fraction with a small denominator: 22/7 with denominators up to 100, and 355/113 up to 1,000. That's handy for measurements, recipes or gear ratios. Honest limits: a decimal typed without brackets is treated as exact, so 0.333 becomes 333/1000, not 1/3. Add brackets when you mean a repeat. The fraction calculator, the percentage calculator and the rounding calculator are related, and Fractions, decimals and percentages: the same number three ways, and how to convert explains the links between them.
Frequently asked questions
How do you convert a decimal to a fraction?
Write it over a power of ten (0.375 = 375/1000), then divide the top and bottom by their greatest common divisor to get 3/8.
How do I enter a repeating decimal?
Put the repeating digits in brackets: 0.(3) for 0.333โฆ or 0.1(6) for 0.1666โฆ.
What fraction is 0.333?
Exactly 333/1000. If you mean 0.333 repeating, enter 0.(3) to get 1/3.
Is my input stored?
No. Conversion runs in your browser and nothing is stored or sent.