Online Tool Store Online Tool Store

Fraction to Decimal Converter

Converts a fraction to its exact decimal using integer long division rather than floating point, so repeating decimals are marked with an overline instead of truncated. Explains why it terminates or repeats, and shows the division steps.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

/
Try:

Exact decimal

Reduced

Mixed number

Percentage

Show the long division

Computed by long division on integers in this page, not by floating-point division — so a repeating decimal is reported as repeating rather than as a truncated string of digits. Nothing is uploaded.

How to use it

  1. Type a numerator and a denominator, or press one of the examples.
  2. Read the exact decimal — an overline marks the part that repeats forever.
  3. Use the slider if you need a rounded figure for practical work.
  4. Open the long division to see why the digits do what they do.

Why dividing is not good enough

Almost every fraction-to-decimal converter divides two numbers in floating point and prints the result. That produces answers which are wrong in a specific and misleading way:

1/3 by floating point   0.3333333333333333   16 threes, then it stops
1/3 by long division    0.3 with the 3 recurring  exact
5/6 by floating point   0.8333333333333334   note the final 4
5/6 by long division    0.83 with the 3 recurring  exact

That stray 4 at the end of 5/6 is not a rounding convention, it is the accumulated error of representing the value in binary. A tool that shows it is telling you something false about the number. Long division on integers has no such problem: it either terminates or it detects its own cycle.

How the repetition is detected

This is the mechanism, and it is worth understanding because it is a proof rather than a guess. At each step of long division you have a remainder. Multiply by ten, divide by the denominator, note the digit, keep the new remainder. Since every remainder is smaller than the denominator, there are only finitely many possible remainders — so eventually one must recur.

The moment it does, the sequence is locked: the same remainder always yields the same digit and the same next remainder, so everything from that point onwards repeats exactly. The tool records where each remainder first appeared, which is how it knows not just that the decimal repeats but precisely where the block starts and how long it is. Open the long division panel and the recurring remainder is shaded.

Which fractions terminate, and why

There is a clean test. Reduce the fraction, then strip every factor of 2 and every factor of 5 from the denominator. If nothing is left but 1, the decimal terminates. If anything remains, it repeats.

3/8    8 = 2·2·2          → terminates  0.375
7/20   20 = 2·2·5         → terminates  0.35
1/6    6 = 2·3   3 remains  → repeats     0.1(6)
1/7    7       7 remains  → repeats     0.(142857)

The reason is that a terminating decimal is just a fraction over a power of ten, and ten factors into 2 and 5 only. So a denominator can divide a power of ten if and only if it is built from those two primes. The tool states which case you are in and names the offending factor when the decimal repeats.

Repeating blocks get long

This is the practical argument against rounding by default. The repeating block for a denominator can be as long as the denominator minus one, and some primes reach that limit:

1/3    1 digit      1/13   6 digits
1/7    6 digits     1/17  16 digits
1/11   2 digits     1/97  96 digits
1/81   9 digits — 0.(012345679), missing the 8

Every one of those lengths was verified against long division before this page was written. A calculator showing fifteen decimal places of 1/97 is showing you roughly a sixth of the pattern with no indication that there is more — which is precisely the failure this tool exists to avoid. Rounding is still available, because for measuring a shelf you want 0.375 and not a lecture; it is just not the default.

FAQ

Why not just divide the two numbers?

Because floating-point division cannot represent most fractions, and it hides that fact. Ask a browser for 1 divided by 3 and it returns 0.3333333333333333 — sixteen threes and then nothing. That is not the value of a third, and it implies a precision that does not exist. This tool does long division on integers instead, so it can tell you the answer is 0.3 with the 3 recurring, which is exact.

How does it know the decimal repeats?

By watching the remainders. Long division produces a remainder at every step, and once a remainder appears for the second time the whole sequence of digits after it must repeat, because the same remainder always produces the same next digit. That is not an approximation or a pattern-match on the digits — it is a proof, and it also tells you exactly where the repeating block starts and how long it is.

Which fractions terminate?

A reduced fraction terminates exactly when its denominator has no prime factors other than 2 and 5 — because those are the prime factors of ten, so such a denominator divides a power of ten. Everything else repeats. We checked that rule against actual long division across 2,400 numerator and denominator pairs and it held every time, which is why the tool can tell you the reason rather than just the result.

Why does 1/81 skip the 8?

It genuinely does: 1/81 is 0.012345679 repeating, running through the digits in order and omitting 8 entirely. It is a real curiosity of base ten rather than a bug, and it is included as one of the examples because it looks so much like an error. The nine-digit repeating block is exactly what long division produces.

What is the longest a repeating block can get?

For a denominator d, at most d minus 1 digits, and some primes hit that maximum. 1/97 repeats with a block of 96 digits — verified here — which means a converter showing fifteen decimal places is displaying about a sixth of the pattern. 1/17 has a 16-digit block. This is why rounding to a few places is often the wrong output to give someone.

Is my calculation sent anywhere?

No. The long division runs in the page. Nothing is uploaded and nothing is stored.

How we compare

Feature Online Tool Store A pocket calculator Other online converters
Marks the repeating block exactly Sometimes
No floating-point error
Says why it terminates or repeats
Shows the long division steps
Reduced fraction, mixed number, percentage Some do
Arbitrarily huge numerators and denominators Within limits
Algebra, calculus, symbolic work Graphing ones

Use this when you want the true decimal rather than a plausible-looking approximation, or when you are teaching why some fractions repeat and others do not. For a quick measurement, round it and get on with the job — the slider is there for exactly that.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.