Fraction to Decimal Calculator
Convert any fraction n/d to its decimal form, including detection of repeating decimals.
Result
How to use this calculator
- Enter the numerator and denominator.
- Read the decimal — terminating or repeating.
- Hover the steps for the long-division process.
About this calculator
Every fraction has a decimal form that either terminates or repeats. The denominator (in lowest terms) determines which: if its only prime factors are 2 and 5, the decimal terminates; otherwise it repeats. This calculator does long division and tracks remainders to detect the repeat cycle, then displays it with parentheses.
How it works — the formula
decimal = numerator ÷ denominator
Terminating when the simplified denominator has only 2 and 5 as prime factors
Otherwise periodic with period dividing φ(denominator) (Euler's totient)Long division gives the decimal expansion of any rational number. The expansion terminates exactly when the reduced denominator has no prime factors other than 2 and 5 (because 10 = 2 × 5). For all other rationals the expansion is eventually periodic, with the period length dividing φ(d), the totient of the reduced denominator. Irrational numbers have non-repeating, non-terminating decimal expansions.
Worked examples
- Inputs:
- 3/8
- Output:
- 3 ÷ 8 = 0.375 (denominator 8 = 2³ → terminates)
- Inputs:
- 1/7
- Output:
- 0.̅142857̅ — period of 6 digits (φ(7) = 6)
- Inputs:
- 7/4
- Output:
- 1.75 (terminates; denominator 4 = 2²)
Limitations
- Floating-point representation can introduce small artifacts at the 15th–16th significant digit (IEEE 754 double precision); shown decimals here use the exact rational value.
- Periodic expansions are written with an over-bar over the repeating block; an unmarked decimal of finite display length is an approximation, not a proof of termination.
- Improper fractions can be presented as either a single decimal or a "whole + fractional" mixed form; both are mathematically equivalent.
- A denominator of zero is undefined.
Conversion is exact arithmetic for rational inputs; display rounding is cosmetic and does not change downstream computation.
Frequently asked
Why do some fractions repeat?+
How is the repeating block notation read?+
How long can the repeating block be?+
Does the calculator handle negative fractions?+
Can I round the answer?+
Related calculators
More tools you might like
Hand-picked tools that pair well with this one — same audience, same intent.
Convert a terminating decimal to its simplified fraction form.
Simplify a ratio like 12:18 to its lowest terms (2:3) and compare to a target ratio.
Given a/b = c/x (or any of three knowns), solve for the fourth.
Compute the arithmetic mean of a list of numbers.
Euclidean algorithm: gcd(a,b) = gcd(b, a mod b). Supports 2-6 integers.
Convert any PDF (including scanned ones) into an editable Word document. Pick "Preserve formatting" for layout + tables or "Plain text" for the fastest possible cleanup.