Write the decimal as a fraction using its place value:
5 → 5/10
25 → 25/100
375 → 1375/1000
If the decimal has a finite number of digits, use a denominator of 10, 100, 1000, etc. based on the number of decimal places.
Simplify the fraction by dividing numerator and denominator by their greatest common divisor.
For repeating decimals:
Let x be the repeating decimal.
Subtract x from the shifted version to eliminate the repeating part.
Solve for x and simplify the resulting fraction.
Check the result by converting the fraction back to a decimal (optional).
