Guide
Converting fractions to decimals and decimals to exact fractions, including repeating decimals
Fractions and decimals are two ways of writing the same number, and moving between them is a daily task in cooking, carpentry and school maths. Going from decimal to fraction is a matter of place value, but repeating decimals such as 0.666… need a small bit of algebra. This page does both directions exactly and shows the repeating block.
From a decimal to a fraction
A decimal that ends is the number without its decimal point over a power of ten: 0.375 is 375 over 1,000. The fraction is then divided by the greatest common divisor, which is 125 here, to give 3/8. For a repeating decimal, type the repeating part in brackets. 0.1(6) means 0.1666… and is converted with the standard method of subtracting a shifted copy: ten times the number minus the number gives the exact value, here 1/6. The mixed number form is shown when the fraction is larger than 1.
From a fraction to a decimal
Enter a numerator and a denominator. The page divides with exact long division and records every remainder. When a remainder appears a second time, the digits between the two occurrences are the repeating block. The result is written with the repeat in brackets, for example 0.(142857) for 1/7, and the block and its length are shown separately. It also prints the fraction in lowest terms, the percent form, and how much it was reduced by.
Reading the result
The lines include the fraction in lowest terms, the decimal, the repeating block with its length, the percent, the mixed number when the value is above 1, and the factor the fraction was reduced by. A fraction that ends in a decimal shows that the decimal ends. The percent line carries the repeat too, so 1/7 is 14.(285714)%. A percent such as that is exact, whereas a calculator would show 14.2857142857 and hide that it goes on.
Edge cases
The denominator cannot be zero. A negative sign is carried through. Typing a rounded decimal, such as 0.333, is read as exactly 333/1000 and not as one third, so use the bracket form for a repeat. Whole numbers such as 5 convert to 5/1. The length of a repeating block can be as long as the denominator minus one, so a fraction like 1/97 has a 96-digit block, which the page displays in full.
A worked example
0.375 becomes 375/1000 and reduces to 3/8, with a decimal that ends and a percent of 37.5%. 0.1(6) converts to 1/6, which is 16.(6)%. In the other direction, 1/7 is 0.(142857), a repeat of 6 digits, and as a percent 14.(285714)%. 22/7 is 3.(142857), the mixed number 3 1/7 and 314.(285714)%. None of these needs rounding, because the page stores exact fractions rather than floating-point values.
Limits
Irrational numbers such as π and the square root of 2 do not have a fractional form and are not accepted. A decimal that has been rounded cannot be turned back into the fraction it came from, because the information is gone, which is why the page reads exactly the digits typed. Very long repeating blocks are shown fully, which can make the result wide on a narrow screen, but it scrolls rather than being cut.
Related tools
- Fraction Calculator adds, subtracts and multiplies fractions before you convert them.
- Percentage Calculator takes a decimal or fraction and answers percent questions.
- Ratio Calculator treats a fraction as a ratio and shares an amount by it.
- Number to Words Converter spells out a decimal result for a cheque or a form.
Checked against the current version of the Fraction to Decimal Converter on .

