Calculators / Fractions

Decimal to fraction calculator

Type a decimal such as 0.625 and this decimal to fraction calculator writes it over a power of ten, 625/1000, then divides both parts by their greatest common divisor, 125, to give 5/8. It shows the mixed number, the decimal and each step, and it runs in your browser.

Calculate fractions

Enter an integer (3), fraction (-3/4), mixed number (-1 1/2) or decimal (0.125). Use a space between the whole and fractional parts. No commas.

A whole number, 0 or more. Only the decimal display changes; the fraction stays exact.

Loading the calculator…

Result

Enter your numbers, choose an operation, then select Calculate.

How to use the decimal to fraction calculator

The page opens with Simplify selected under Operation and 0.625 in First number, so Second number stays hidden. Select Calculate to see 5/8 as the Simplified result, with the Mixed number, the Decimal line and the numbered Calculation steps.

To convert your own value, replace 0.625 in First number with a decimal such as 0.375, -2.5 or .75, then select Calculate or press Enter. The leading zero is optional, and a minus sign goes in front. Commas, the percent sign and exponents such as 6.25e-1 are not read; each shows an error beside First number.

Copy result copies the fraction only. Download text saves fraction-calculation.txt with the entered value, the fraction, the mixed number, the decimal and every step. Reset puts 0.625 and Simplify back. To add, subtract, multiply or divide by another number, pick that operation and Second number appears.

How the conversion works

Each digit after the decimal point adds one zero to the denominator. 0.625 has three digits after the point, so the calculator writes it as 625/1000, while 0.05 has two and becomes 5/100. The first line of Calculation steps shows this: 0.625 = 625/1000 = 5/8 (divide both parts by 125).

Next it divides the top and the bottom by their greatest common divisor, the largest whole number that divides both. For 625 and 1000 that number is 125, which leaves 5/8 in lowest terms. When the divisor is 1, as with 0.7 = 7/10, nothing is divided. A minus sign stays in front: -0.75 becomes -75/100, then -3/4.

A decimal above 1 follows the same steps. 2.5 becomes 25/10, then 5/2, shown as the mixed number 2 1/2. Trailing zeros do not change the answer: 2.50 becomes 250/100 and divides by 50 to the same 5/2.

Common decimals as fractions

This chart was made by the calculator's own engine when the page was built, with Simplify run on each decimal. Tenths, fifths, quarters and eighths cover most decimals found on price tags, report cards and rulers. To convert a decimal that is not in the chart, type it in First number above and select Calculate.

DecimalFraction
0.051/20
0.11/10
0.1251/8
0.21/5
0.251/4
0.33/10
0.3753/8
0.42/5
0.51/2
0.63/5
0.6255/8
0.77/10
0.753/4
0.84/5
0.8757/8
0.99/10

Three patterns help you check a result. A decimal with one digit after the point, other than 0, reduces to tenths, fifths or halves. One with exactly two digits after the point that end in 25 or 75 reduces to quarters. One with exactly three digits that end in 125, 375, 625 or 875 reduces to eighths.

Limits

The calculator converts only decimals that end. Repeating-decimal notation such as 0.(3), 0.333... or a bar over a digit is not accepted: First number shows an error, and nothing is approximated. Typing the digits you see gives the exact value of those digits, so 0.333 becomes 333/1000 and 0.3333 becomes 3333/10000, not 1/3.

If you know the repeating value as a fraction, type the fraction instead. 1/3 is read exactly, and its Decimal line shows 0.3333333333, rounded at the default 10 decimal places.

The calculator does not look for a nearby fraction either, such as the nearest 1/16 inch, so 0.63 gives 63/100. There is no digit cap. 0.1234567890123456789 becomes 1234567890123456789/10000000000000000000 with every digit kept, because the arithmetic uses whole numbers, not floating point. Only the Decimal line is rounded: at the default 10 decimal places it shows 0.1234567890.

Questions

How do I convert a decimal to a fraction?

Count the digits after the decimal point and write the digits over 1 followed by that many zeros: 0.75 has two digits, so it is 75/100. Then divide the top and the bottom by their greatest common divisor, here 25, to get 3/4. Type 0.75 in First number and select Calculate to see the same steps.

What is 0.375 as a fraction?

0.375 is 3/8. It has three digits after the point, so it starts as 375/1000. The greatest common divisor of 375 and 1000 is 125, and dividing both parts by 125 gives 3/8. The Decimal line then shows 0.375 and marks it as exact, which confirms that 3/8 has no rounding.

What is 1.75 as a fraction?

1.75 is 7/4, or 1 3/4 as a mixed number. The calculator writes 1.75 as 175/100, divides both parts by 25 to get 7/4 and shows 1 3/4 in the Mixed number field. The same steps turn 2.5 into 25/10, then 5/2, which is 2 1/2 as a mixed number.

What is 15% as a fraction?

15% means 15 hundredths, which is 0.15 as a decimal and 3/20 in lowest terms. The calculator does not read the percent sign, so typing 15% shows an error. Type 0.15 instead: it becomes 15/100, and dividing both parts by their greatest common divisor, 5, gives 3/20.

What is 4.666 as a fraction?

Exactly as typed, 4.666 is 4666/1000, which reduces to 2333/500, or 4 333/500. If you mean 4.666… with the 6 repeating forever, the value is 4 2/3, or 14/3. The calculator cannot read repeating notation, so type 4 2/3 to get 14/3 and a rounded Decimal line of 4.6666666667.

How would I convert a fraction into a decimal?

Type the fraction, such as 5/8, in First number, keep Simplify and select Calculate. The Decimal line shows 0.625 and says the decimal is exact. For a fraction whose decimal never ends, such as 2/3, the line rounds to the Decimal places you set, 10 by default, and says it is rounded.