FRACTION
HARBOR

Guide

How to Convert Decimals to Fractions

A finite decimal is a fraction whose denominator is a power of ten. 0.375 is three hundred seventy-five thousandths, which is 375/1000, which simplifies to 3/8. The conversion is exact if you read the digits as written. It fails if you first turn the decimal into a binary floating-point Number and then guess a fraction. The decimal to fraction calculator parses the string.

Finite decimal numbers

Finite means the expansion stops after finitely many digits: 0.5, 0.125, 2.75, −0.25. Repeating decimals such as 1/3 = 0.333… do not stop. Typing 0.333 is a truncated approximation, not the exact repeating value, and this site will not pretend otherwise.

Decimal place value

The first digit after the point is tenths (1/10). The second is hundredths (1/100). The third is thousandths (1/1000). 0.375 has a 3 in tenths, 7 in hundredths, and 5 in thousandths. Altogether that is 375 thousandths.

Powers of ten

If there are k digits after the decimal point, the unsimplified denominator is 10^k. One digit: 10. Two digits: 100. Three digits: 1000. 0.5 is 5/10. 0.75 is 75/100. 0.375 is 375/1000. Whole numbers have k = 0 and denominator 1.

Converting decimals into ratios

Strip the sign. Remove the decimal point to form an integer numerator. The denominator is 1 followed by as many zeros as fractional digits. Then restore the sign and simplify. Leading zeros in 0.075 still count as fractional digits: three places, so 75/1000 = 3/40.

Simplifying fractions

375/1000 has GCD 125. 375 ÷ 125 = 3. 1000 ÷ 125 = 8. Result 3/8. 5/10 simplifies to 1/2. 75/100 simplifies to 3/4. Use the same GCD process as simplifying fractions.

Worked examples

0.5 → 5/10 → 1/2. 0.125 → 125/1000 → 1/8. 0.375 → 375/1000 → 3/8. 0.75 → 75/100 → 3/4. −0.25 → −25/100 → −1/4. Each of these is exact. Run them on the converter.

Negative decimals

The minus sign applies to the whole value. −0.25 is −1/4, not 0 − 1/4 as a mixed expression that might be misread. Parse the sign first, then the magnitude as a positive decimal string.

Fractions to decimals

Divide the numerator by the denominator using long division with remainders. If a remainder repeats, the decimal repeats. 1/8 = 0.125 exactly. 1/2 = 0.5 exactly. 1/3 = 0.(3) repeating. Showing 0.333333 without a repeating mark is an approximation. The converter labels that distinction.

Terminating decimals

A reduced fraction terminates in base 10 only if its denominator’s prime factors are among 2 and 5. 1/8 = 1/2^3 terminates. 1/4 = 1/2^2 terminates. 3/8 terminates. 1/3 has a factor 3 in the denominator, so it repeats. 1/6 = 1/(2×3) also repeats.

Repeating decimals

Repeating decimals cannot generally be represented exactly by a finite number of decimal digits. 0.333333 is close to 1/3 and is not 1/3. A dedicated repeating syntax such as 0.(3) would be required to recover 1/3 from decimal text. This site does not silently treat a typed 0.333 as 1/3. When converting 1/3 to decimal, it can show a repeating-bar form 0.(3) plus a rounded expansion that is labeled as approximation.

Exact versus approximate results

Exact means the displayed decimal equals the fraction with a finite expansion, or the fraction equals the parsed decimal string. Approximate means rounding occurred. Do not present a rounded decimal as the exact fraction. Related: fraction calculator decimal pane, and compare fractions if you are tempted to order two rationals by looking at three decimal places.

FAQ

Is 0.375 exactly 3/8?

Yes. 375/1000 simplifies by 125 to 3/8.

Is 0.333 equal to 1/3?

No. It is a truncation. 1/3 is the repeating decimal 0.(3).

Why not use JavaScript Number for 0.1?

Binary floating-point cannot represent 0.1 exactly. Reading the characters 0.1 as 1/10 does.