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.

Your decimal

For repeating digits, put them in brackets: 0.6(25) means 0.6252525…
Decimal
0.125
Type
Terminating decimal
0.125 as a fraction
1/8
Before simplifying
125/1000
As a mixed number
N/A (Proper fraction)
As a percentage
12.5%
Decimal type
Terminating decimal
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

  1. Type the decimal, such as 0.125. Negatives and numbers above 1 both work.
  2. If digits repeat, put them in brackets: 0.6(25) for 0.6252525…, or0.(3) for a third.
  3. 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.

Fraction = Digits / 10places, then divide by the GCD
  • 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:

(10p+q − 10p) × x = a whole number
  • 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

Decimals converted, before and after simplifying
DecimalBefore simplifyingIn lowest terms
0.55/101/2
0.125125/10001/8
1.818/109/5
0.(3)3/91/3
1.8(3)165/9011/6
0.6(25)619/990619/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.

Frequently asked questions

How do I convert a decimal to a fraction?

Write the digits over the matching power of ten, then reduce. 0.125 has three decimal places, so it is 125/1000, and dividing both by their greatest common divisor of 125 gives 1/8. The calculator shows each of those steps.

How do I type a repeating decimal?

Put the repeating digits in brackets. 0.(3) means 0.3333…, 1.8(3) means 1.8333…, and 0.6(25) means 0.6252525…. Handwritten maths uses a line over the digits, which cannot be typed, so brackets stand in for it.

How does a repeating decimal become an exact fraction?

By subtracting the number from a shifted copy of itself, which cancels the infinite tail. If x = 0.6252525…, then 1000x = 625.2525… and 10x = 6.2525…; subtracting leaves 990x = 619, so x = 619/990 exactly. No rounding is involved anywhere.

Why do 1.8(3) and 1.8(33) give the same answer?

Because they are the same number written two ways: one marks a single repeating 3, the other a repeating pair of 3s, and both spell out 1.8333…. The algebra handles either notation and lands on 11/6 both times.

Can every decimal be written as a fraction?

Every terminating or repeating decimal can, which is what makes it a rational number. Decimals that never terminate and never repeat — pi, the square root of 2 — are irrational and have no exact fraction, only approximations such as 22/7.

What does the figure before simplifying mean?

It is the fraction straight from the digits, before the greatest common divisor is cancelled: 125/1000 for 0.125. It is worth seeing because it shows where the answer came from, and because the size of that divisor is the whole difference between 125/1000 and 1/8.