Decimal to Fraction Calculator
Turn any decimal, including a repeating one like 0.1666..., into an exact fraction in lowest terms and a mixed number, with the working shown and an optional rounding to the nearest 1/16 or 1/64.
To turn a decimal into a fraction, write its digits over 1 followed by one zero for each place after the point, then cancel the common factor. 0.375 has three places, so it is 375/1000; both divide by 125, giving 3/8. A repeating decimal works differently: 0.1666... is (16 − 1) / 90 = 15/90, which reduces to 1/6. This calculator does both exactly; rounding to sixteenths is a separate option.
This calculator does not guess repeating digits: a decimal typed without its repeat marked is treated as ending where you stopped typing. It converts up to 30 digits in all, and the nearest-fraction option assumes the 1/2 to 1/64 marks of an inch tape, rounding an exact half away from zero.
For a repeating decimal, type the digits that repeat in the second box (0.1 and 6 for 0.1666...), or write them in parentheses in the first: 0.1(6). Up to 30 digits in all.
0.3 as a fraction
3/10
- Mixed number
- 3/10
- Back to a decimal
- 0.3
- Nearest 1/16
- 5/16
- Rounding error
- +1/80 (0.0125)
Working
- 1 digit after the point: 3/10
- No common factor, so it is already in lowest terms
Embed this calculator on your site →
About the Decimal to Fraction Calculator
Every terminating decimal is already a fraction in disguise: the digits after the point are tenths, hundredths or thousandths, so 0.3 is 3/10 and 2.5 is 25/10. The real work is cancelling, done here with Euclid's algorithm, so 25/10 becomes 5/2, or 2 1/2 as a mixed number. Repeating decimals need one more idea. Call the number x. Multiplying x by a power of ten shifts the digits without changing the repeating tail, so two shifted copies subtract to a whole number. For 0.1666..., 100x and 10x share the same endless tail of 6s, so 100x minus 10x is exactly 16 minus 1, which is 15; that makes 90x = 15, so x is 15/90, or 1/6. The same reasoning shows that 0.999... is exactly 1, not a hair less. The rounding option is for measuring. A tape marks halves, quarters, eighths and sixteenths of an inch, so 0.3 inch needs to become a mark you can find: to the nearest 1/16 that is 5/16, which is 1/80 of an inch (0.0125) too long. The error carries its sign, so you know which way the rounding went. The reverse has its own page, the Fraction to Decimal Calculator.
Frequently asked questions
How do I convert a decimal to a fraction by hand?+
Count the digits after the point and write the number without its point over 1 followed by that many zeros: 0.375 is 375/1000. Then divide the top and bottom by their greatest common divisor, here 125, to get 3/8. If the top is bigger than the bottom, take out the whole number for a mixed number.
How do I enter a repeating decimal?+
Type the part before the repeat in the Decimal box and only the digits that repeat in the second box: 0.1 and 6 for 0.1666..., or 0 and 3 for 0.333.... You can also write the repeating digits in parentheses in the first box, as 0.1(6). If you type 0.333 with no repeat marked, the calculator treats it as exactly 333/1000, which is not the same number as 1/3.
Is 0.999... really equal to 1?+
Yes. With x = 0.999..., 10x and x share the same tail of 9s, so 10x minus x is exactly 9 minus 0, which makes 9x = 9 and x = 1. Enter 0 in the Decimal box and 9 in the repeating box: the working gives (9 − 0) / (10^1 − 1) = 9/9, which is 1.
How do I turn a decimal into sixteenths of an inch?+
Choose 1/16 in the "Also round to the nearest" menu. The calculator multiplies the decimal by 16, rounds to the nearest whole number and reduces, so 0.3 inch becomes 5/16 and 0.625 inch is exactly 5/8. An exact half is rounded away from zero: 0.03125 is halfway between 0 and 1/16 and goes to 1/16. The Rounding error line says how far the mark is from your number.
Why does my fraction have such a big denominator?+
Because the decimal you entered is exact and not a simple fraction. 0.3333 with four digits is 3333/10000 and nothing cancels. If you meant one third, mark the 3 as repeating (0 and 3). The rounding menu cannot return 1/3: in sixteenths, 0.3333 rounds to 5/16.
Embed this calculator
Free to use on your own site. Paste this snippet where you want the decimal to fraction calculator to appear — it resizes itself automatically.
<iframe
src="https://manytools.co/embed/decimal-to-fraction-calculator"
title="Decimal to Fraction Calculator by ManyTools"
data-manytools="decimal-to-fraction-calculator"
width="100%"
height="640"
loading="lazy"
style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
window.addEventListener("message", function (e) {
if (e.origin !== "https://manytools.co") return;
var d = e.data || {};
if (d.type !== "manytools:embed:height" || d.slug !== "decimal-to-fraction-calculator") return;
var f = document.querySelector('iframe[data-manytools="decimal-to-fraction-calculator"]');
if (f && d.height) f.style.height = d.height + "px";
});
})();
</script><a href="https://manytools.co/math/decimal-to-fraction-calculator">Decimal to Fraction Calculator by ManyTools</a>