Decimal to Fraction Calculator - Repeating Decimals & Fractions to Decimals
Decimal to Fraction Calculator
Exact conversion in both directions, including repeating decimals
Exact, Always Reduced
Uses arbitrary-size integers, so long decimals convert without rounding, and every fraction is reduced to lowest terms.
Repeating Decimals
Type 0.(3) for 0.333… and get 1/3. Going the other way, 1/7 is shown as 0.(142857) with the length of the cycle.
Closest Simple Fraction
Set a largest denominator to approximate a long decimal, such as 3.14159 with denominators up to 1000 giving 355/113.
Full Privacy
Everything is calculated in your browser.
How the Conversion Works
A terminating decimal is a fraction over a power of ten: 0.125 is 125/1000, which reduces to 1/8. A repeating decimal is converted with algebra: if x = 0.(3), then 10x − x = 3, so 9x = 3 and x = 1/3. In general the repeating digits go over as many nines as there are repeating digits.
A fraction in lowest terms has a terminating decimal exactly when its denominator has no prime factors other than 2 and 5. Otherwise the decimal repeats forever, and the cycle can never be longer than the denominator minus one.
Key Takeaways
- Any length: Long decimals are converted exactly, with no floating-point error.
- Both ways: Switch direction to turn a fraction into a decimal with its repeating cycle.
- Localised: Spanish and French pages accept a decimal comma.