Decimal to Fraction Calculator
Enter a decimal to get it as an exact fraction in lowest terms. Repeating decimals are handled in full, with every step of the working shown.
- Start with
- x = 0.125
- Multiply by 1,000
- 1,000x = 125
- Write as a fraction
- x = 125/1000
- Divide both by 125
- x = 1/8
How to use this calculator
- Type the decimal, such as
0.125. Negatives and numbers above 1 both work. - If digits repeat, put them in brackets:
0.6(25)for 0.6252525…, or0.(3)for a third. - Read the fraction above the supporting figures, then open the working panel for the full derivation, line by line.
The working panel is the point of this tool rather than a footnote. Any calculator can print 1/8; the steps are what let you reproduce the conversion on paper, or check that a repeating decimal has been read the way you meant it.
How to convert a decimal to a fraction
A terminating decimal is already a fraction with a power of ten underneath — the decimal point is just shorthand for it. Reducing that fraction is the only work left.
- Digits — the decimal with the point removed, e.g. 125
- places — how many digits followed the point, e.g. 3
- GCD — the greatest common divisor of top and bottom, e.g. 125
A repeating decimal needs one extra idea, because there is no last digit to put over a power of ten. Shift the number so the repeating block lines up with itself, then subtract:
- p — digits after the point before the repeat starts, e.g. 1 in 0.6(25)
- q — digits in the repeating block, e.g. 2 in 0.6(25)
- x — the number you are converting
For 0.6(25): 1000x = 625.2525… and 10x = 6.2525…. The tails are identical, so subtracting removes them entirely and leaves 990x = 619. Since 619 and 990 share no factor, 619/990 is already in lowest terms.
Worked examples
| Decimal | Before simplifying | In lowest terms |
|---|---|---|
| 0.5 | 5/10 | 1/2 |
| 0.125 | 125/1000 | 1/8 |
| 1.8 | 18/10 | 9/5 |
| 0.(3) | 3/9 | 1/3 |
| 1.8(3) | 165/90 | 11/6 |
| 0.6(25) | 619/990 | 619/990 |
The last row is the one that surprises people: 619/990 cannot be reduced at all, because 619 is prime. A messy-looking fraction is not a sign the conversion went wrong.