How it works
How to use this decimal to fraction calculator
- Use Terminating for a finite decimal you typed in full.
- Use Repeating to mark digits that continue forever. Integer part, optional non-repeating digits, and at least one repeating digit.
- Read the reduced fraction. Terminating mode warns that a cutoff of 0.333… is not the same as the infinite expansion.
Formula
The calculation formula
0.d₁…dₙ = digits ÷ 10ⁿFor a terminating decimal, write the digits over a power of 10 and cancel the gcd.
For a repeating decimal, subtract the non-repeating prefix from the combined block and divide by (10^k − 1) × 10^m.
Compare the fraction with a rounded cutoff if you only typed a finite prefix of a repeat.
Worked examples
Example calculations
0.75 is 75/100. gcd(75, 100) = 25, so the fraction is 3/4.
0.3 repeating is 3/9 = 1/3. 0.16 with 6 repeating is (16 − 1) / 90 = 1/6.
When to use it
Common use cases
- Turn 0.75 into 3/4
- Recover 1/3 from 0.3 repeating
- See why 0.333333 is not exactly 1/3
Limits
Assumptions and limits
- Terminating mode is exact for the digits entered, up to 12 places after the point.
- Repeating mode treats the repeating block as infinite, so 0.3̅ is exactly 1/3.
- A typed prefix such as 0.333333 stays a long terminating fraction unless you switch to Repeating.
Questions
Frequently asked questions
Why is 0.333333 not 1/3?
Those six digits are 333333/1000000, which simplifies but is still short of the infinite 0.3 repeating. Use Repeating mode with repeating digit 3 to get 1/3.
How do you convert 0.16 with 6 repeating?
Non-repeating length m = 1 and period k = 1. (16 − 1) ÷ ((10 − 1) × 10) = 15/90 = 1/6.
Sources
Sources and review
- Wikipedia — Repeating decimal
Closed-form conversion of eventually periodic decimals to rationals
Accessed August 25, 2026