Fraction to Decimal Calculator

Your values

Examples: 1/7, 3/8, -5/12, 2 3/4

Rounding precision, from 0 to 50

Result

Rounded to 10 places

17=0.142857‾\frac{1}{7}=0.\overline{142857}
Decimal type
Repeating, period of 6
Written out
0.142857142857…
Simplified fraction
1/7

Long division

StepDivisionDigitRemainder
1 · repeats from here10 ÷ 713
230 ÷ 742
320 ÷ 726
460 ÷ 784
540 ÷ 755
650 ÷ 771

Step by step

  1. Divide the numerator by the denominator to get the whole-number part and the first remainder.
    1=7×0+11=7\times0+1
  2. This remainder comes back later, so the digits repeat from this step.
    r=1r=1
  3. The exact decimal; the bar marks the repeating block.
    17=0.142857‾\frac{1}{7}=0.\overline{142857}

About this tool

A fraction becomes a decimal when you divide its numerator by its denominator. Some fractions, such as 3/8, give a decimal that ends; others, such as 1/3 or 1/7, give digits that repeat forever. This calculator finds the exact decimal, marks the repeating block with a bar, shows the long division that produces it and rounds the value to the number of places you choose.

How it works

Enter a fraction like 5/8 or a mixed number like 1 3/4 (whole number, space, fraction), and choose how many decimal places to round to.

The calculator divides the numerator by the denominator with long division. Each step multiplies the remainder by 10 and divides again. If the remainder reaches zero, the decimal terminates. If a remainder comes back, every digit from that point repeats, and the repeating block is marked with a bar, as in 17=0.142857‾\frac{1}{7} = 0.\overline{142857}. The exact decimal and the rounded value are shown together.

ab=a÷b,rk+1=10rk−b⌊10rkb⌋\frac{a}{b}=a\div b,\qquad r_{k+1}=10r_k-b\left\lfloor\frac{10r_k}{b}\right\rfloor

Example

For 17\frac{1}{7}, long division gives the remainders 3, 2, 6, 4, 5 and then 1 again. Because the remainder 1 has appeared before, the digits 142857 repeat: 17=0.142857‾\frac{1}{7} = 0.\overline{142857}, which rounds to 0.1428571429 at ten places.

For 512\frac{5}{12} the digits 4 and 1 come first and then the 6 repeats: 512=0.416‾\frac{5}{12} = 0.41\overline{6}. The fraction 38\frac{3}{8} terminates, because its denominator has no prime factors other than 2 and 5: 38=0.375\frac{3}{8} = 0.375.

Assumptions and limits

Numerators and denominators can have up to 30 digits. Repeating blocks are found for periods of up to 2,000 digits; a longer period is reported, and only the rounded value is shown. Rounding uses half away from zero on the exact value, so it never suffers from floating-point error. The long-division table shows the first 12 steps.

Frequently asked questions

How do you turn a fraction into a decimal?

Divide the numerator by the denominator. For 34\frac{3}{4}, 3÷4=0.753 \div 4 = 0.75. For a mixed number, convert the fraction part and add the whole number: 238=2+0.375=2.3752\frac{3}{8} = 2 + 0.375 = 2.375.

Which fractions give repeating decimals?

In lowest terms, a fraction terminates only when its denominator has no prime factors other than 2 and 5, such as 2, 4, 5, 8, 10, 16, 20 or 25. Any other prime factor, such as 3, 7 or 11, makes the decimal repeat.

What does the bar over the digits mean?

The bar, called a vinculum, marks the block that repeats forever. 0.16‾0.1\overline{6} means 0.1666… and 0.142857‾0.\overline{142857} means 0.142857142857…

How long can the repeating part be?

For a denominator d, the period is at most d − 1 digits. 1/7 repeats every 6 digits, 1/17 every 16 and 1/97 every 96. The calculator shows the full block for periods up to 2,000 digits.

What is 1/3 as a decimal?

13=0.3‾\frac{1}{3} = 0.\overline{3}, that is 0.333… with the 3 repeating forever. Rounded to two places it is 0.33, and to four places 0.3333.

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
fractionFractionfraction or decimal: 3/4, 1 1/2 or 0.75required
decimal_placesDecimal placeswhole number; allowed 0–50default 10

Examples

  • ?fraction=5/12&decimal_places=6
  • ?fraction=1%201/3

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

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