Decimal to Fraction Converter
Turn a decimal into a fraction: the exact fraction, the simplest close fraction with a denominator as small as you like, and a mixed number. Repeating decimals such as 0.1(6) are understood too.
How to Use
- Type a decimal such as 0.4375, or a repeating decimal with the repeating part in brackets, such as 0.1(6).
- Set the largest denominator you want for the simplest close fraction: 16 for inches, 100 for everyday use, 1,000 for more accuracy.
- Read the exact fraction, the best fraction within your limit, the mixed number and the error.
- The table also shows the exact fraction a computer stores for the number as a double.
- The ruler marks your number and the fraction chosen.
Worked Example
0.4375 to a fraction. Four decimal places, so 0.4375 = 4,375/10,000. The greatest common divisor of 4,375 and 10,000 is 625; dividing both gives 7/16, exactly. On a tape measure that is seven sixteenths of an inch.
3.14159 with a denominator up to 1,000. Its continued fraction begins [3; 7, 15, 1, 25, …], so the convergents are 3, 22/7, 333/106 and 355/113; the next one has a denominator over 1,000. The closest fraction within the limit is 355/113 = 3.1415929, off by 2.9 × 10⁻⁶.
The common mistake: rounding the decimal to a few digits first. 0.333 is not 1/3; it is 333/1000. If you mean one third, type 0.(3), or let the denominator limit pick 1/3 as the closest simple fraction, and the error shown tells you how far it is from what you typed.
Show Work
Formulas
Fractions Before Decimals
For most of history people wrote parts of a whole as fractions; decimal fractions were popularised in Europe only in 1585, by Simon Stevin’s pamphlet De Thiende (“The Tenth”). Going back from a decimal to a fraction is a matter of cancelling common factors, which Euclid’s algorithm does efficiently.
Finding the simplest fraction close to a number is a deeper problem, solved by continued fractions: their convergents are the best approximations for their size. Programming languages build this in, such as Python’s Fraction.limit_denominator, and it is how calculators show 0.6666666667 as 2/3.
About This Calculator
This converter turns a decimal, including a repeating decimal written with brackets, into its exact fraction in lowest terms, the closest fraction with a denominator up to the limit you set, and a mixed number, with the error. It also shows the exact fraction stored when the number is held as a 64-bit double, and marks the value and the fraction on a ruler.
Everything runs in your browser; nothing is sent anywhere. The arithmetic is exact, so long decimals are never rounded along the way.
Related calculators: Continued Fraction Converter, Fraction Calculator, and Stern–Brocot Tree.
Frequently Asked Questions
How do I convert a decimal to a fraction?
Write the digits over the power of ten that matches the decimal places, then cancel common factors. 0.4375 = 4,375/10,000; both divide by 625, giving 7/16. 0.75 = 75/100 = 3/4.
How do I convert a repeating decimal to a fraction?
A block of k digits repeating straight after the point is that block over k nines: 0.(3) = 3/9 = 1/3, 0.(142857) = 142857/999999 = 1/7. With digits before the repeat, shift first: 0.1(6) = (1 + 6/9)/10 = 15/90 = 1/6.
What is the best fraction with a small denominator?
The fraction closest to the number among all those with a denominator up to your limit. It comes from the continued fraction: the convergents, plus one more candidate between the last two. 0.333 is closest to 1/3 for any limit from 3 up to 999; with no limit, the exact answer is 333/1000.
Why does 0.1 have such a huge fraction as a double?
A computer stores 0.1 in binary, where it cannot be exact, so the double holds the nearest binary fraction: 3,602,879,701,896,397/36,028,797,018,963,968, which is 0.1000000000000000055511…. Python’s Fraction(0.1) shows this same fraction; Fraction(0.1).limit_denominator() gives back 1/10.
How do I get a fraction of an inch?
Tick “powers of 2 only” and set the largest denominator to 16 (or 32 or 64), so the answer is in halves, quarters, eighths or sixteenths. 0.4375 in is exactly 7/16 in; 0.3 in becomes 5/16 in, the closest sixteenth (an error of 0.0125 in). Without the tick, 0.3 is simply 3/10.
How do I use the Decimal to Fraction Converter?
Simply type or paste your value and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Exact fractions
0.4375 = 7/16 and 1.375 = 11/8 = 1 3/8.
Repeating decimals
0.1(6) = 1/6 and 0.(142857) = 1/7.
Approximations
3.14159 with denominators up to 1,000 is 355/113.
Workshop
0.3 in to the nearest sixteenth is 5/16 in.
Last updated: