Skip to content

Guides

How do you convert a fraction to a decimal — and when does it terminate?

By FractionLab · Published June 10, 2026 · Updated June 10, 2026

Divide the numerator by the denominator to get the decimal, and check the reduced denominator's prime factors to know whether it ends: if they are only 2s and 5s the decimal terminates (3/8 = 0.375 exactly), and any other prime factor forces it to repeat forever (1/3 = 0.333…).

Conversion is just division

A fraction bar is a division sign that hasn't been carried out yet: 3/8 means 3 ÷ 8, and performing the division gives 0.375. This site's converter confirms 3/8 = 0.375 and labels it terminating — the division comes out exact after three decimal places. The same goes for 9/20: the engine returns 0.45, terminating, and for 3/4 it returns 0.75. Improper fractions convert the same way, just with a whole part: 7/4 = 1.75, exactly.

By hand, the mechanism is long division with appended zeros. For 3/8: 30 ÷ 8 = 3 remainder 6, then 60 ÷ 8 = 7 remainder 4, then 40 ÷ 8 = 5 remainder 0 — digits 3, 7, 5, and a remainder of zero, so the decimal stops at 0.375. The remainder hitting zero is what "terminating" means. The interesting question is when that zero remainder can ever arrive, and the answer turns out to be readable straight off the denominator, before doing any division at all.

The termination rule: only 2s and 5s in the reduced denominator

A decimal that stops after n places is secretly a fraction whose denominator is a power of ten: 0.375 is 375/1000. Powers of ten factor as 2ⁿ × 5ⁿ and nothing else, so a fraction can be rewritten with a power-of-ten denominator exactly when its reduced denominator contains no prime factors besides 2 and 5. That is the entire rule. 9/16 terminates because 16 = 2⁴ — the engine returns 0.5625 exactly. 7/50 terminates because 50 = 2 × 5² — the engine returns 0.14 exactly.

Any other prime spoils it. 1/3 repeats because of the 3; the engine displays 0.333333 (rounded to six places) and labels it repeating. 7/12 repeats because 12 = 2² × 3 carries a factor of 3 alongside its 2s — one stray prime is enough, no matter how many 2s and 5s sit next to it. The same test marks 1/6, 5/12, 11/24, and 2/3 as repeating: every one of those denominators contains a 3. The converter runs exactly this check — strip the 2s and 5s from the reduced denominator and see whether anything is left — which is why it can classify a fraction without computing a single decimal digit.

Reduce first, or the rule will lie to you

The rule reads the reduced denominator, and skipping that step gives wrong predictions. Take 21/35. Its denominator factors as 5 × 7, and the 7 seems to promise a repeating decimal — but 21/35 is not in lowest terms. Dividing the numerator and denominator by their greatest common divisor of 7 leaves 3/5, whose denominator is a bare 5, and the decimal terminates: the engine returns exactly 0.6 and labels 21/35 terminating.

What happened is that the numerator's factor of 7 cancelled the denominator's. Only the primes that survive reduction decide the decimal's fate, which is why the engine simplifies every input with Euclid's greatest-common-divisor algorithm before applying the 2s-and-5s test. The practical takeaway for hand work is the same: always reduce the fraction first, then factor what remains of the denominator.

What a repeating decimal actually looks like

When the reduced denominator has a prime other than 2 or 5, the long division can never reach remainder zero, so the remainders must eventually revisit a value they have seen before — and from that point the digits cycle forever. The cycle can be short or long: 1/3 repeats a single digit (0.333…), while 1/7 cycles through six digits, 0.142857 142857…, the famous repetend taught alongside long division. The engine displays 1/7 as 0.142857 — six rounded places happen to show exactly one full cycle — and labels it repeating.

Repeating does not mean random: the block of digits is fixed and the notation writes a bar over it (0.3̄ for 1/3). It also does not mean irrational — every repeating decimal is still a ratio of integers. That is the dividing line worth remembering: fractions of integers produce decimals that either terminate or repeat, and nothing else. A number whose digits never settle into a cycle, like π, cannot be written as a fraction at all — 22/7 is only an approximation of π, and the engine reports it as the repeating decimal ≈3.142857.

Rounding, display, and exactness

A six-decimal display cannot distinguish a number that stops from a number that goes on forever, which is why the converter pairs every decimal with an explicit terminating-or-repeating label. 2/3 shows as 0.666667 — the final 7 is rounding, not a real digit of the expansion — while 9/16 shows as 0.5625 with nothing hidden. The label, not the digit string, tells you whether what you see is the whole number or a rounded window onto an infinite one.

This matters whenever a decimal gets copied forward into more arithmetic. Re-entering 0.666667 as a stand-in for 2/3 plants an error of a third of a millionth that compounds through later steps, while keeping the value as the fraction 2/3 stays exact. The practical rule: convert to decimal at the end, for display or comparison, and do the arithmetic itself in fraction form — which is exactly how this calculator works internally, computing in integer numerators and denominators and rounding only the final display line.

Questions

How can I tell if a fraction terminates without dividing?
Reduce the fraction to lowest terms, then factor the denominator. If the only prime factors are 2 and 5, the decimal terminates; any other prime means it repeats. 9/16 terminates because 16 = 2⁴; 7/12 repeats because 12 contains a 3. The numerator is irrelevant once the fraction is reduced.
Why does 21/35 terminate when 35 contains a factor of 7?
Because 21/35 is not in lowest terms. Reducing by the greatest common divisor of 7 gives 3/5, and the surviving denominator is a bare 5, so the decimal is exactly 0.6. The termination test only works on the reduced denominator — primes that cancel against the numerator never affect the decimal.
Is a repeating decimal an irrational number?
No — the opposite. Every fraction of integers produces a decimal that either terminates or repeats, and every terminating or repeating decimal can be written as a fraction. Irrational numbers like π are precisely the ones whose decimals never settle into a repeating cycle and cannot be written as integer fractions; 22/7 is a rational approximation of π, not π itself.
Why does the calculator show 2/3 as 0.666667?
The display rounds to six decimal places, and the true expansion 0.666… rounds up to 0.666667 at the sixth place. The trailing 7 is rounding, not a digit of the real expansion — which is why the converter labels 2/3 as repeating, so you know the digit string is a rounded window, not the exact value.

Sources

  1. Khan Academy — Rewriting fractions as decimals (Converting fractions to decimals, accessed 2026-06-10)
  2. Wolfram MathWorld — Repeating Decimal (terminating and periodic decimal expansions)

Related calculators