Decimal Calculator — Fraction ↔ Decimal Converter
Convert any fraction to its decimal form — terminating or repeating — or convert a decimal back to a simplified fraction, with step-by-step working shown for each conversion.
Conversion mode
Non-terminating repeating — repeating block: (3)
Kako deluje ta kalkulator?
To convert fraction p/q to decimal: divide by long division; it terminates iff q's only prime factors are 2 and 5. To convert a terminating decimal to a fraction: write as integer / 10^(decimal places), then divide by GCD. Step-by-step working is shown for both directions.
Formula
How this is calculated
A fraction p/q converts to a decimal by performing long division of p by q. Whether the result terminates or repeats depends entirely on the denominator (after simplification): if q's only prime factors are 2 and 5, the decimal terminates (e.g. 1/4 = 0.25); otherwise, remainders must eventually repeat, producing a repeating decimal (e.g. 1/3 = 0.333…). This calculator tracks each remainder during long division — when a remainder is seen a second time, the repeating block has been found. The period (length of the repeating part) divides φ(q), Euler's totient of the denominator.
Converting a terminating decimal to a fraction is straightforward: a decimal with d places equals the integer part divided by 10^d. For example, 0.625 = 625/1000. The fraction is then simplified using the greatest common divisor (GCD) of numerator and denominator, found with the Euclidean algorithm, giving 5/8.
Repeating decimals require a different approach to convert back: multiply the decimal by 10^(period) to shift one full cycle, then subtract the original to eliminate the repeating tail and solve for the fraction. This calculator handles the terminating case directly; for repeating-to-fraction conversion, enter the rounded decimal or work out the algebraic form by hand.
Pogosta vprašanja
After simplifying the fraction, look at the denominator. If its only prime factors are 2 and 5 (e.g. 4, 5, 8, 10, 20, 25), the decimal terminates. Any other prime factor (3, 7, 11, 13, …) causes the decimal to repeat.
The period is the number of digits in the repeating cycle. For example 1/7 = 0.142857142857… has a period of 6. The period is always less than the denominator and divides its Euler's totient.
The Decimal → Fraction mode works only for terminating decimals. To convert a repeating decimal like 0.3̄ = 1/3, set x = 0.333…, then 10x = 3.333…, subtract to get 9x = 3, so x = 1/3. Alternatively, enter the fraction (numerator/denominator) directly and the calculator will confirm the repeating form.
Znano tudi kot
TG we-Calculate Editorial Team. (2026). Decimal Calculator — Fraction ↔ Decimal Converter [Online calculator]. TG we-Calculate. https://we-calculate.com/sl/calculator/decimal-calculator
TG we-Calculate Editorial Team. "Decimal Calculator — Fraction ↔ Decimal Converter." TG we-Calculate. 2026. https://we-calculate.com/sl/calculator/decimal-calculator.
TG we-Calculate Editorial Team, "Decimal Calculator — Fraction ↔ Decimal Converter," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/sl/calculator/decimal-calculator
@misc{wecalculate_decimal_calculator, title = {Decimal Calculator — Fraction ↔ Decimal Converter}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/sl/calculator/decimal-calculator}}, year = {2026}, note = {TG we-Calculate} }
Vam je ta kalkulator pomagal?
