🔁 Decimal ⇄ Fraction Converter
0.625 = 5/8, and 0.1666… = 1/6 exactly. This converter handles repeating decimals properly in both directions, showing the repetend in parentheses.
5/8
Exact fraction
62.5%
As a percent
Repeating decimals convert exactly: 0.1(6) means 0.1666… = 1/6, and 0.(3) = 1/3. Every fraction's decimal either terminates or repeats. This tool shows which, with the repetend in parentheses. Exact arithmetic, computed locally.
How the decimal ⇄ fraction converter works
Decimal to fraction: a terminating decimal like 0.625 becomes 625/1000 and reduces to 5/8; a repeating decimal written with parentheses, 0.1(6) for 0.1666…, is converted with the exact algebraic identity (multiply by powers of ten, subtract, solve), so 0.(142857) comes back as precisely 1/7. Fraction to decimal: long division runs with cycle detection on the remainders, so the tool doesn't just print digits. It identifies where the expansion starts repeating and writes the repetend in parentheses. Every fraction's decimal either terminates (when the reduced denominator has only factors 2 and 5) or repeats; this shows which, exactly.
The parenthesis notation is the key to exactness: 0.33 and 0.(3) are different numbers, 33/100 versus 1/3, and a converter that ignores the difference quietly gives the wrong fraction. If you're converting a measured decimal (0.33 from a ruler), the terminating interpretation is what you want; if you're converting a mathematical one (0.333… from dividing by 3), write it as 0.(3).
Frequently asked questions
How do I enter a repeating decimal?
Put the repeating digits in parentheses: 0.(3) for 0.333…, 0.1(6) for 0.1666…, 1.2(45) for 1.2454545…. The conversion is then exact, 0.(3) gives 1/3, not 3333/10000.
How does decimal-to-fraction conversion work?
Terminating: put the digits over the matching power of ten and reduce (0.625 = 625/1000 = 5/8). Repeating: use the classic identity, for x = 0.(3), 10x − x = 3, so x = 3/9 = 1/3. The tool applies the general form of that algebra.
Which fractions give terminating decimals?
Exactly those whose reduced denominator contains no prime factors other than 2 and 5. 3/8 terminates (0.375); 1/6 cannot (0.1(6)) because of the factor 3.
How long can the repeating part be?
Up to one less than the denominator, 1/7 repeats every 6 digits, 1/97 every 96. The tool detects repetends up to 400 digits and says so if yours is longer.
Is anything uploaded?
No, conversion is exact integer arithmetic in your browser, offline-capable.
Related math tools
From the blog
-
0.1 + 0.2 ≠ 0.3: Why Most Calculators Quietly Round, and What Exact Arithmetic Looks Like
Every ordinary calculator uses floating point, which rounds past ~15 digits and turns 1/3 + 2/3 into 0.999…9. How exact arithmetic avoids all of it.
-
Significant Figures: The Rules, the Ambiguous Cases, and How to Round Correctly
The four significant-figures rules explained digit by digit: which zeros count, why 1200 is ambiguous, and how to round to N sig figs (the 9.99 carry case).