Decimal to Fraction Calculator

Your values

Examples: 0.75, 0.(3), 0.1(6), 0.333…

How many of the last digits repeat, such as 1 to read 0.16 as 0.1666…

Result

Simplified fraction

0.16‾=160.1\overline{6}=\frac{1}{6}
Decimal
0.1666666…
Before simplifying
15/90
Greatest common divisor
15

Step by step

  1. Call the repeating decimal x.
    x=0.16‾x=0.1\overline{6}
  2. Multiply by a power of ten that moves one full repeating block to the left of the decimal point.
    100x=16.6‾100x=16.\overline{6}
  3. Multiply by a power of ten that leaves only the repeating part after the decimal point.
    10x=1.6‾10x=1.\overline{6}
  4. Subtract the two equations; the repeating parts cancel.
    (100−10)x=16−1  ⇒  90x=15(100-10)x=16-1\;\Rightarrow\;90x=15
  5. Solve for x.
    x=1590x=\frac{15}{90}
  6. Divide the numerator and denominator by their greatest common divisor.
    15÷1590÷15=16\frac{15\div15}{90\div15}=\frac{1}{6}

About this tool

Converting a decimal to a fraction means writing the same number as a ratio of two whole numbers. Every terminating decimal, such as 0.75, and every repeating decimal, such as 0.333…, is a rational number with an exact fraction. This calculator finds that fraction in lowest terms, shows it as a mixed number when it is larger than 1 and walks through the algebra, so you can check homework, convert measurements or turn a calculator display back into a fraction.

How it works

Type a decimal such as 0.75 or 2.125. For a repeating decimal, put the repeating block in parentheses: 0.(3) means 0.333… and 0.1(6) means 0.1666… You can also type the digits followed by an ellipsis, or enter a plain decimal and say how many of its last digits repeat.

A terminating decimal becomes a fraction over a power of ten, such as 0.75=751000.75 = \frac{75}{100}, which is then divided by the greatest common divisor. For a repeating decimal, the calculator multiplies xx by powers of ten so that the repeating parts line up, subtracts to cancel them and solves for xx. All arithmetic is exact, so long decimals still give the precise fraction.

0.d1d2…dk=d1d2…dk10k,0.r1…rn‾=r1…rn10n−10.d_1d_2\ldots d_k=\frac{d_1d_2\ldots d_k}{10^k},\qquad 0.\overline{r_1\ldots r_n}=\frac{r_1\ldots r_n}{10^n-1}

Example

Take 0.1(6), that is 0.1666… Let x=0.16‾x = 0.1\overline{6}. Multiplying by 100 gives 100x=16.6‾100x = 16.\overline{6}, and multiplying by 10 gives 10x=1.6‾10x = 1.\overline{6}. Subtracting cancels the repeating sixes: 90x=1590x = 15, so x=1590x = \frac{15}{90}. Dividing both numbers by their greatest common divisor, 15, leaves 16\frac{1}{6}.

A terminating decimal is quicker: 2.125=21251000=178=2182.125 = \frac{2125}{1000} = \frac{17}{8} = 2\frac{1}{8}.

Assumptions and limits

The calculator accepts up to 30 digits. A decimal you type is treated as exact: 0.33 is 33100\frac{33}{100}, not one third, unless you mark the 3 as repeating. When a number ends with an ellipsis, the shortest block that appears at least twice at the end is taken as the repeating part, so type 0.1666… rather than 0.16… Irrational numbers such as π or √2 never repeat and have no exact fraction; entering their first digits gives the fraction of that rounded value only.

Frequently asked questions

How do you convert a repeating decimal to a fraction?

Set xx equal to the decimal, multiply by 10 raised to the length of the repeating block, and subtract the original. For x=0.36‾x = 0.\overline{36} this gives 100x−x=36100x - x = 36, so x=3699=411x = \frac{36}{99} = \frac{4}{11}. A purely repeating block of n digits always starts out over n nines before simplifying.

What is 0.333… as a fraction?

Exactly one third: 0.3‾=39=130.\overline{3} = \frac{3}{9} = \frac{1}{3}. In the same way, 0.666… is two thirds and 0.111… is one ninth.

Is 0.999… equal to 1?

Yes. With x=0.9‾x = 0.\overline{9}, subtracting gives 10x−x=910x - x = 9, so 9x=99x = 9 and x=1x = 1. The calculator returns 1 for 0.(9) and 2 for 1.(9).

How do I enter 0.1666… where only the 6 repeats?

Type 0.1(6), or type 0.16 and set the repeating digits to 1. Writing 0.(16) would mean 0.161616… instead, which is 1699\frac{16}{99}.

How do you convert a decimal to a mixed number?

Keep the whole-number part and convert only the digits after the decimal point. For 3.75, the decimal part 0.75 is 34\frac{3}{4}, so 3.75=3343.75 = 3\frac{3}{4}. The calculator shows the mixed number automatically whenever the value is larger than 1.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
decimalDecimaltext in the tool's notation, see the examplesrequired
repeating_digitsRepeating digits (optional)whole number; allowed ≥ 0optional

Examples

  • ?decimal=0.375
  • ?decimal=2.1(36)
  • ?decimal=0.583&repeating_digits=1

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="decimal_to_fraction_calculator"]