Convert a decimal into a simplified fraction, with a maximum denominator you choose for exact values or close approximations.
Example
0.75 becomes 3/4 and −2.5 becomes −5/2, both in lowest terms. With a limit of 1,000, 0.3333333333 returns 1/3, while 3.14159 gives 22/7 at a limit of 100 and 355/113 at a limit of 1,000.
Calculation method
A continued-fraction algorithm builds the closest fraction whose denominator stays within the limit you set, then reduces the result and places the sign on the numerator. The default maximum denominator is 1,000,000, which is exact for everyday decimals: 0.125 is returned as 1/8 rather than 125/1000.
Important notes
The tool matches the digits you actually type. With a large limit, 0.333 becomes 333/1000, because that is exactly what was entered; if you meant one third, type more digits or lower the limit. Choose a limit that suits the job, such as 16 for inch measurements or 100 for percentages.
Exact conversion for terminating decimals
Enter a decimal and keep the default maximum denominator of 1,000,000 for everyday values. 0.75 becomes 3/4 and −2.5 becomes −5/2, with the sign placed on the numerator. The calculator returns the fraction in lowest terms, so 0.125 appears as 1/8 rather than 125/1000. This is useful when a drawing, recipe or measuring tape uses fractions but your calculation produced a decimal.
Rounded decimals and repeating values
The tool treats the digits you type as the value to match. With a large limit, 0.333 becomes 333/1000, because that is exactly what was entered. If you meant one third, either type more digits or lower the maximum denominator: 0.3333333333 with a limit of 1,000 returns 1/3. The limit is the largest denominator the tool may use, so choose one that suits the job, such as 16 for inch measurements or 100 for percentages.
Best approximations of irrational numbers
For numbers that no fraction represents exactly, the calculator uses continued fractions to find the closest fraction whose denominator stays within the limit. π entered as 3.14159 becomes 22/7 with a limit of 100 and 355/113 with a limit of 1,000; 355/113 agrees with π to six decimal places. The golden ratio entered as 1.6180339887 with a limit of 100 gives 144/89. Check the decimal shown under the result to see how close the approximation is before relying on it.
Worked examples| Input | Result |
|---|
0.75 · max 1,000,000 | 3/4 |
-2.5 · max 1,000,000 | -5/2 |
0.333 · max 1,000,000 | 333/1000 |
0.3333333333 · max 1,000 | 1/3 |
3.14159 · max 100 | 22/7 |
3.14159 · max 1,000 | 355/113 |
1.6180339887 · max 100 | 144/89 |