About Decimal to Fraction
Decimal to Fraction turns a decimal number into a fraction and reduces it to lowest terms. Enter 0.75 and it answers 3/4; enter 0.5 and it answers 1/2. Beside the fraction it also prints the value to four decimal places, so you can see at a glance that the two forms agree with each other.
The method is simple and worth knowing, because it explains the results you get. The number is read as text, the digits after the decimal point are counted, and the denominator is set to ten raised to that count. The numerator is the value scaled by the same power of ten and rounded, and then both terms are divided by their greatest common divisor.
That gives an exact fraction of the digits you actually typed, which is not always the fraction you had in mind. A short value such as 0.375 becomes 3/8 cleanly, while a long one such as 0.3333333333 becomes a fraction over ten billion rather than one third, because nothing tries to guess a repeating pattern. Very small values have their own edge: the page reads numbers in their plain string form, and a value small enough to be written with a negative exponent has no decimal point to count, so it comes back as 0/1.
How to use Decimal to Fraction
- 1 Type a decimal into the input box, which opens with 0.75 filled in.
- 2 Press the button to see the fraction in its lowest terms.
- 3 Read the figure after the equals sign as the value of that fraction to four places.
- 4 Keep the input short if you want a tidy fraction, since long decimals produce long ones.
Frequently asked questions
Why did 0.33 come out as a fraction over a hundred rather than one third?
Because the denominator is built from the digits you typed. Two decimal places produce a denominator of one hundred, so 0.33 becomes 33/100. The tool does not recognise repeating decimals or round towards a familiar fraction.
What does the number after the fraction mean?
It is the value of the fraction written as a decimal, rounded to four places. The fraction itself is exact for the digits supplied, while the figure beside it is only an approximation.
Why did a very small number give me 0/1?
Values small enough to be written with a negative exponent, below roughly one hundred-millionth, have no decimal point in their plain text form. The denominator is therefore set to one and the rounded numerator to zero, so the answer reads 0/1 = 0.
Does a whole number work?
Yes. An integer keeps a denominator of one, and that is also printed as a plain number, so entering 3 returns 3/1 = 3. No separate rounding step is applied to the integer case.
Free, online, and private
Free to use
Decimal to Fraction is completely free. There is no account to create, no login, and no hidden charge or usage limit.
Runs online in your browser
It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.
Your data stays private
All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.
How Decimal to Fraction behaves in detail
These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.
| Parameter | Value |
|---|---|
| Input | one decimal number, defaulting to 0.75 and stepped by 0.01 in the field |
| Denominator | ten raised to the power of the number of digits after the decimal point |
| Reduction | numerator and denominator are both divided by their greatest common divisor |
| Output shape | the reduced pair, followed by an approximate decimal to four places whenever the denominator is not 1 |
| Whole values | a denominator that reduces to 1 is also printed as a plain integer, for example 3/1 = 3 |
Compiled from the implementation of this tool and checked against it by itoolnet.
What Decimal to Fraction does not do
Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.
- The denominator is built from the digits you type, not from the mathematical value. 0.3333333333 has ten decimal places, so it becomes a fraction over ten billion and is then reduced, rather than being recognised as one third - the tool simplifies a fraction, it does not approximate a repeating decimal to the nearest familiar one.
- Very small numbers collapse to zero. The implementation reads the number in its JavaScript string form, and below roughly one hundred-millionth that form switches to exponential notation such as 1e-7, which contains no decimal point - the denominator is then read as one, the rounded numerator is zero, and the page answers 0/1 = 0.
- The decimal printed beside the fraction is rounded to four places. The fraction itself is exact for the digits supplied, but the approximation next to it is not, so a value entered with more than four decimals will not round-trip and the two halves of the answer will appear to disagree slightly.
Tested and documented by itoolnet, the team that builds and maintains this site.