Decimal to fraction converter
Convert any decimal to an exact fraction, including repeating decimals written as 0.(3). Get simplified, mixed and unreduced forms with steps.
- Runs in your browser
- Nothing you enter is sent
- Free, no account
Also accepts 0.333... and overlined text pasted from a document.
Exact fraction
Simplified
1/3
Mixed number
1/3
Before simplifying
3/9
divided through by 3
Check: back to decimal
0.(3)
Percentage
33.(3)%
Reciprocal
3/1
Step-by-step working
Name the number and identify the repeating block.
x = 0.(3) (the block "3" repeats forever)Shift by a further 1 place so the repeating tails line up.
10^1 · x = 10x = 03.(3)Subtract the smaller shift from the larger — the infinite tails cancel exactly.
(10 − 1)·|x| = 3 − 0That leaves 9·|x| = 3, with no repeating part on either side.
Divide to isolate x.
x = 3/9Simplify by the greatest common divisor.
GCD(3, 9) = 3 → 1/3
How to convert a decimal to a fraction
- Type the decimal. For a repeating decimal, wrap the repeating block in brackets:
0.(3)is 0.333…, and1.8(3)is 1.8333…. - Read the exact fraction, the mixed number and the unreduced form.
- Check the algebra in the step list — for repeating decimals it shows the subtraction that makes the infinite tail cancel.
The converter also understands 0.333... with a trailing ellipsis and text with combining
overlines pasted from a document or PDF. Use the second tab to go the other way and expand a fraction
into its exact decimal, cycle detection included.
Terminating decimals: count the places
A decimal that stops is already a fraction with a power of ten on the bottom. 0.75 has two decimal places, so it is 75/100; dividing top and bottom by 25 gives 3/4. That is the whole method:
- Count the digits after the point — call it k.
- Write the digits as a whole number over 10k.
- Divide both parts by their greatest common divisor.
Repeating decimals: make the tail cancel
For a repeating decimal the trick is to multiply by a power of ten so the repeating parts line up, then subtract. Take x = 0.(3):
- 10x = 3.(3)
- 10x − x = 3.(3) − 0.(3) = 3
- 9x = 3, so x = 3/9 = 1/3
When there are non-repeating digits before the cycle, shift twice. For x = 1.8(3): 10x = 18.(3) and 100x = 183.(3), so 90x = 165 and x = 165/90 = 11/6. The tool performs exactly these two shifts and shows both.
The general result: a decimal with m fixed digits and a k-digit repeating block equals (all digits − fixed digits) ÷ (10k − 1)·10m. That is why 0.(142857) is 142857/999999 = 1/7.
Which fractions terminate?
A fraction in lowest terms has a terminating decimal exactly when its denominator’s only prime factors are 2 and 5 — the primes that divide ten. 3/8 terminates because 8 = 2³. 1/6 does not, because 6 = 2 × 3 and that 3 never divides a power of ten. The length of the repeating cycle for 1/n is the multiplicative order of 10 modulo n, which is always less than n.
Reference table
| Decimal | Exact fraction | Notes |
|---|---|---|
| 0.5 | 1/2 | terminates |
| 0.125 | 1/8 | terminates (8 = 2³) |
| 0.(3) | 1/3 | 1-digit cycle |
| 0.(6) | 2/3 | 1-digit cycle |
| 0.1(6) | 1/6 | one fixed digit, then a cycle |
| 0.(142857) | 1/7 | 6-digit cycle, the longest possible for 7 |
| 0.(09) | 1/11 | 2-digit cycle |
| 0.8(3) | 5/6 | one fixed digit, then a cycle |
| 0.(9) | 1 | exactly 1, not an approximation |
| 2.375 | 19/8 = 2 3/8 | improper and mixed forms |
Why 0.999… equals 1
Run the same algebra: if x = 0.(9) then 10x = 9.(9), so 9x = 9 and x = 1. There is no rounding involved and no “infinitely small gap” — 0.999… and 1 are two decimal names for the same real number, in the same way that 0.5 and 0.50 name the same number. The converter reports 1/1 for that input, which is correct rather than a bug.
Precision and privacy
Every conversion uses arbitrary-precision integer arithmetic, so a 20-digit repeating block is handled exactly rather than being rounded through a floating-point double. The reverse direction runs real long division and stops as soon as a remainder repeats, which is what lets it report 5/7 as 0.(714285) rather than a truncated decimal. All of it happens inside your browser — nothing is uploaded.
Questions
How do I type a repeating decimal?
Wrap the repeating block in brackets: 0.(3) for 0.333…, or 1.8(3) for 1.8333…. Trailing ellipsis form such as 0.333... and overline text pasted from a document are also understood.
How is a repeating decimal turned into a fraction?
Multiply the number by ten to the power of the repeating block length, subtract the original, and the repeating tails cancel. The tool shows that subtraction explicitly for your number.
Why does 0.999… equal exactly 1?
Because the algebra gives 9x = 9, so x = 1. It is not an approximation — the two notations name the same real number, and the converter reports 1/1.
Can it convert a fraction back to a decimal?
Yes. The reverse tab runs exact long division and detects the repeating cycle, so 5/7 comes back as 0.(714285) rather than a truncated 0.714286.