Skip to content

Decimal to Fraction Calculator

Exact fraction from a decimal, repeating ones included.

Inputs

Example: Fraction in lowest terms
3/8

Use this calculator on your own site

Free embed

  • Two lines of HTML, unlimited views
  • Shows a small CalculateEveryday bar, with a credit link under the calculator

What each Decimal to Fraction input means

Decimal
The decimal as written, or, for a repeating decimal, only the part before the repeating starts: 0.1 for 0.1666…, or 0. for 0.333…. A whole-number part and a minus sign are fine, as in −2.75.
Digits that repeat forever (optional)
Only the block of digits that repeats forever, typed once: 6 for 0.1666…, 142857 for 0.142857142857…, 34 for 1.23434…. Leave it empty for a decimal that ends.

Decimal to Fraction formula

Write the digits over the place value of the last one (0.375 = 375/1000), then divide top and bottom by their greatest common factor

A terminating decimal is its digits over a power of ten: three decimal places means a denominator of 1000. Dividing numerator and denominator by their greatest common factor gives lowest terms. For digits that repeat forever, a block of m repeating digits equals that block over m nines — 0.333… is 3/9 — shifted right by however many non-repeating places come first.

Formula last checked against OpenStax Prealgebra 2e, §5.1 'Decimals' (convert a decimal to a fraction by the place value of its final digit, then simplify) on 2 October 2026. Built and maintained by Suman Kumar · How we check

Decimal to Fraction worked example

0.375 ends in the thousandths place, so it is 375/1000. The greatest common factor of 375 and 1000 is 125, and dividing both gives 3/8 — which is 37.5%.

More Decimal to Fraction examples

0.1666…: the 1 appears once and the 6 repeats, so type 0.1 and 6. The page works out 0.1 + 6 ÷ 90 = 9/90 + 6/90 = 15/90, which simplifies to 1/6 — about 16.6667%.

2.45 ends in the hundredths place, so it is 245/100. Both numbers divide by 5, giving 49/20 in lowest terms, or 2 9/20 as a mixed number.

1.23434…, where 34 repeats after a 2 that doesn't. A two-digit repeating block goes over 99, shifted one place: 1.2 + 34 ÷ 990 = 1188/990 + 34/990 = 1222/990, which reduces by 2 to 611/495.

Where the Decimal to Fraction calculator can give the wrong answer

  • Only digits you mark as repeating are treated as repeating. 0.333 typed on its own is exactly 333/1000, not 1/3; put 3 in the repeating box to get 1/3.
  • 0.999… repeating is exactly 1, not slightly less. The calculator returns 1, because 9/9 is 1.
  • The arithmetic is done in whole numbers, so it is exact. A calculator working in floating point would see 0.1 + 0.2 as 0.30000000000000004 and return a fraction with a seventeen-digit denominator.
  • A rounded measurement is not a fraction in disguise: 0.67 is 67/100. If you meant two-thirds, enter 0. with 6 repeating.

Spotted a mistake? Tell us

Decimal to Fraction reference table

Repeating and common decimals as fractions, and what to type
DecimalType in the boxesFraction
0.333…0. and 31/3
0.666…0. and 62/3
0.111…0. and 11/9
0.1666…0.1 and 61/6
0.8333…0.8 and 35/6
0.0833…0.08 and 31/12
0.0909…0. and 091/11
0.142857…0. and 1428571/7
0.999…0. and 91
0.1250.1251/8
0.3750.3753/8
0.06250.06251/16
Source: Worked out with this page's method: a repeating block of m digits is that block over m nines, shifted by the places before it

Decimal to Fraction FAQ

Type 0.1 in the first box and 6 in the repeating box. The non-repeating part stays in the first box; only the block that goes on forever goes in the second. The answer is 1/6.