CalcFolio

Fraction to Decimal Calculator

Enter a fraction or a mixed number and this fraction to decimal calculator divides it out exactly. You get the decimal rounded to the places you choose, the exact expansion with any repeating block in parentheses, the length of that block, the percent and the fraction in lowest terms. It is handy for homework, converting inch fractions for a spreadsheet, or checking whether 7/12 really repeats.

Updated

Optional; for mixed numbers like 3 3/8

Top number

Bottom number; 1 or more

Advanced options

For the rounded decimal, 0 to 20

How to use the calculator

  1. Whole number (optional): for a mixed number such as 3 3/8, enter 3 here. Leave 0 for a plain fraction.
  2. Numerator and denominator: whole numbers; the denominator must be at least 1. Improper fractions like 22/7 are fine.
  3. Decimal places (advanced options, default 6): how many digits the rounded decimal shows, from 0 to 20.

For a negative mixed number, put the minus sign on the whole number: whole −2, numerator 1, denominator 4 means −2 1/4. For a negative fraction without a whole part, put the minus on the numerator.

The repeating digits line appears only when the decimal repeats, and the period (number of repeating digits) only when it is not zero.

How the calculator converts a fraction

A mixed number is first turned into an improper fraction: whole × denominator + numerator, over the same denominator. Then the calculator does long division with exact integers. After each step it records the remainder. If a remainder becomes 0, the decimal terminates. If a remainder shows up a second time, every digit after that point repeats, and the digits between the two appearances are the repeating block, written in parentheses: 5/6 = 0.8(3).

Which fractions terminate?

Write the fraction in lowest terms and factor the denominator. If its only prime factors are 2 and 5, the decimal terminates; any other prime factor (3, 7, 11…) makes it repeat. The reason: a terminating decimal is a whole number over a power of 10, and 10 = 2 × 5, so only denominators built from 2s and 5s can be scaled up to a power of 10. That is why 3/8, 7/40 and 9/64 terminate while 1/3, 7/12 and 1/13 repeat.

For a denominator n, the repeating block is at most n − 1 digits long, since there are only n − 1 possible nonzero remainders. The calculator checks up to 2,000 decimal digits, which covers any denominator up to 2,001.

The rounded decimal and the percent use standard floating-point arithmetic, which is precise to about 15 significant digits.

Worked examples

FractionExact decimalPeriodRoundedPercent
3/80.37500.37500037.5%
9/640.14062500.14062514.0625%
5/60.8(3)10.83333383.33%
7/120.58(3)10.5833 (4 places)58.33%
5/110.(45)20.45454545.45%
1/70.(142857)60.1429 (4 places)14.29%
1/130.(076923)60.0769237.69%

A mixed number

Enter whole 3, numerator 3, denominator 8 with 3 decimal places. The calculator returns 3.375, which terminates, and the improper fraction 27/8.

A negative mixed number

Whole −2, numerator 1, denominator 4 with 2 places gives −2.25, or −9/4.

A long period

1/97 rounds to 0.010309, but its exact expansion repeats only after 96 digits, the longest possible for a denominator of 97. The calculator prints the full block. And 22/7, a popular stand-in for pi, is 3.(142857): it repeats, so it can't be pi, which never does.

Frequently asked questions

How do you convert a fraction to a decimal?

Divide the numerator by the denominator. 3 ÷ 8 = 0.375. For a mixed number, keep the whole part and add the fraction: 3 3/8 = 3 + 0.375 = 3.375.

What does the number in parentheses mean?

Those digits repeat forever. 0.8(3) means 0.8333…, and 0.(142857) means 0.142857142857…. In textbooks the same thing is often written with a bar (vinculum) over the repeating digits.

What is 1/3 as a decimal?

1/3 = 0.(3), that is 0.333… with the 3 repeating forever. Rounded to six places it is 0.333333, and 2/3 is 0.(6), or 0.6667 to four places.

How can I tell if a fraction will repeat without dividing?

Reduce it to lowest terms and look at the denominator. If it factors into only 2s and 5s (2, 4, 5, 8, 10, 16, 20, 25…), the decimal ends. Otherwise it repeats. Reduce first: 6/8 = 3/4 = 0.75.

How do I convert a fraction to a percent?

Convert to a decimal and multiply by 100. The calculator shows it directly: 3/20 = 0.15 = 15%, and 7/40 = 0.175 = 17.5%.

Why is the rounded decimal different from the exact one?

A repeating decimal can't be written out completely, so the rounded line cuts it at the number of places you chose, rounding the last digit. The exact line keeps the full pattern.

Sources

  1. Wolfram MathWorld — Decimal Expansion
  2. Wolfram MathWorld — Repeating Decimal
  3. Wolfram MathWorld — Mixed Fraction
  4. Wolfram MathWorld — Greatest Common Divisor

This calculator is a learning and checking aid. The exact decimal comes from integer long division; the rounded decimal and percent are rounded for display.