A repeating decimal is a decimal representation of a number whose digits are periodic (repeating at regular intervals). Converting these into fractions is a fundamental algebraic skill that helps in simplifying complex mathematical expressions.
The Step-by-Step Conversion Formula
To convert a repeating decimal (like 0.1666…) manually, follow these steps:
Let x equal the decimal: $x = 0.1666…$
Identify the repeating part: Here, "6" repeats. It has a length of 1 digit.
Multiply to move the repeating part: Multiply $x$ by $10^1$ (since one digit repeats) to get $10x = 1.666…$
Subtract the original equation: $(10x = 1.666…) – (x = 0.1666…)$ gives $9x = 1.5$.
Solve for x: $x = 1.5 / 9 = 15 / 90$.
Simplify: $15 / 90$ simplifies to $1/6$.
Common Repeating Decimal Examples
Decimal
Fraction
Simplified
0.333…
3/9
1/3
0.666…
6/9
2/3
0.1212…
12/99
4/33
0.142857…
142857/999999
1/7
Frequently Asked Questions
What if only part of the decimal repeats?
This is called a mixed repeating decimal (e.g., 0.12333…). You multiply by powers of 10 to shift the non-repeating part to the left of the decimal, then solve as shown in our formula above.
Does every repeating decimal represent a rational number?
Yes. By definition, a rational number is any number that can be expressed as a ratio of two integers. Since all repeating decimals can be converted into fractions, they are all rational numbers.
function getGCD(a, b) {
a = Math.abs(a);
b = Math.abs(b);
while (b) {
var t = b;
b = a % b;
a = t;
}
return a;
}
function calculateFraction() {
var intPartStr = document.getElementById('intPart').value;
var nonRepStr = document.getElementById('nonRepPart').value.trim();
var repStr = document.getElementById('repPart').value.trim();
if (repStr === "" || isNaN(repStr)) {
alert("Please enter at least one repeating digit.");
return;
}
var intPart = parseInt(intPartStr) || 0;
var nLength = nonRepStr.length;
var rLength = repStr.length;
// Logic:
// x = Integer.NonRep(Rep)
// 10^n * x = IntegerNonRep.Rep
// 10^(n+r) * x = IntegerNonRepRep.Rep
// Denominator = 10^(n+r) – 10^n
// Numerator = (Combined digits of Int + NonRep + Rep) – (Combined digits of Int + NonRep)
var fullDigitsStr = intPart.toString() + nonRepStr + repStr;
var partialDigitsStr = intPart.toString() + nonRepStr;
var fullVal = parseInt(fullDigitsStr);
var partialVal = parseInt(partialDigitsStr);
var numerator = fullVal – partialVal;
var denominator = Math.pow(10, nLength + rLength) – Math.pow(10, nLength);
var commonDivisor = getGCD(numerator, denominator);
var finalNum = numerator / commonDivisor;
var finalDen = denominator / commonDivisor;
var resultDiv = document.getElementById('calcResult');
var fractionOutput = document.getElementById('fractionOutput');
var mixedOutput = document.getElementById('mixedFractionOutput');
resultDiv.style.display = "block";
fractionOutput.innerHTML = finalNum + " / " + finalDen;
if (finalNum > finalDen) {
var whole = Math.floor(finalNum / finalDen);
var rem = finalNum % finalDen;
if (rem !== 0) {
mixedOutput.innerHTML = "Mixed Number: " + whole + " & " + rem + "/" + finalDen;
} else {
mixedOutput.innerHTML = "Equivalent to the whole number: " + whole;
}
} else if (finalNum === finalDen) {
mixedOutput.innerHTML = "Equivalent to 1";
} else {
mixedOutput.innerHTML = "Proper Fraction";
}
}