Decimal to Fraction Calculator

Convert any terminating or repeating decimal into an exact fraction in lowest terms, see it as a mixed number and a percentage, and follow every step of the arithmetic.

Enter your number

Conversion mode

Signs, integers, leading zeros and up to 60 digits after the point are supported.

Try
Advanced options Nearest fraction, output format, shareable link

Whole number from 1 to 10000. Leave empty to skip the nearest-fraction card. Ties go to the smallest denominator.

The default shows the fraction, the mixed number, the decimal and the percentage.

Shareable result

The link stores the value and the mode in the URL. Nothing is sent to a server.

How to Convert a Decimal to a Fraction

A terminating decimal has a finite number of digits after the point, so it can always be written as a whole number divided by a power of ten. The power of ten is decided by how many digits follow the decimal point.

  1. Count the digits after the decimal point. That count is the exponent of ten.
  2. Move the decimal point to the right to get the numerator, and use the power of ten as the denominator.
  3. Find the greatest common divisor (GCD) of the numerator and the denominator.
  4. Divide both parts by the GCD to reach lowest terms.
  5. If the numerator is larger than the denominator, rewrite the result as a mixed number.

Worked example: 0.625

0.625 has three digits after the point, so the denominator is 10³ = 1000:

0.625 = 625/1000

The GCD of 625 and 1000 is 125, so both parts are divided by 125:

625/1000 = (625 ÷ 125)/(1000 ÷ 125) = 5/8

The answer is 5/8. Because 5 and 8 share no common factor other than 1, the fraction is in lowest terms and the conversion is exact.

Mixed numbers and negative signs

When the numerator is larger than the denominator, divide to split off the whole part. 2.625 = 2625/1000 = 21/8, and 21 ÷ 8 = 2 remainder 5, so the mixed number is 2 5/8.

For negative values the sign belongs to the whole mixed number: -1.375 = -11/8 = -1 3/8, which means -(1 + 3/8) — not -1 + 3/8.

Trailing zeros

0.1200 has four digits after the point, so it becomes 1200/10000. Dividing by the GCD of 400 gives 3/25, the same value as 0.12. Keeping the trailing zeros changes the intermediate fraction, never the final answer.

How to Convert a Repeating Decimal to a Fraction

A repeating decimal never ends, so the power-of-ten trick alone is not enough. Instead, the repeating tail is eliminated by subtraction: multiplying a number by a power of ten only moves the decimal point, so two such multiples share the same tail and cancel when subtracted.

  1. Call the number x and mark which digits repeat.
  2. Multiply by 10^p, where p is the number of digits before the repeating block.
  3. Multiply by 10^(p + q) as well, where q is the length of the repeating block.
  4. Subtract the smaller equation from the larger one; the repeating tails cancel.
  5. Divide by the remaining coefficient and reduce with the GCD.

Worked example: 0.1666…

Here p = 1 and q = 1:

x = 0.1666…
10x = 1.6666…
100x = 16.6666…

Subtracting the first multiple from the second removes the repeating part:

100x − 10x = 16.6666… − 1.6666… = 15
90x = 15
x = 15/90 = 1/6

0.1666… = 1/6 exactly. No approximation is involved.

Pure repeating decimals

When the block starts immediately after the point, p = 0 and only two multiples are needed. For 0.3636… the block is two digits long: 100x = 36.3636… and x = 0.3636…, so 99x = 36 and x = 36/99 = 4/11.

Why 0.999… equals 1

The same algebra gives 10x = 9.999… and x = 0.999…, so 9x = 9 and x = 1. Both notations describe the same number; there is no rounding.

Examples

Fractions are shown reduced; mixed numbers are shown where the value is at least one.

Common decimal to fraction conversions
DecimalFractionMixed numberWhy
0.753/4—75/100 reduces by 25
0.6255/8—625/1000 reduces by 125
2.62521/82 5/82625/1000 reduces by 125
-1.375-11/8-1 3/81375/1000 reduces by 125
0.1251/8—125/1000 reduces by 125
0.12003/25—1200/10000 reduces by 400
0.333…1/3—9x = 3
0.1666…1/6—90x = 15
0.363636…4/11—99x = 36
1.8333…11/61 5/690x = 165
0.999…1—9x = 9

Frequently Asked Questions

What is 0.625 as a fraction?

0.625 has three digits after the decimal point, so it equals 625/1000. The greatest common divisor of 625 and 1000 is 125, and dividing both parts by 125 gives 5/8. Since 5 ÷ 8 = 0.625 exactly, the conversion is exact.

Does the calculator round the answer?

No. Fractions are built from the digits you type using whole-number (BigInt) arithmetic, so large numerators and denominators stay exact. The decimal shown next to the answer is written with an overline when it repeats, and any rounded percentage is marked with the ≈ symbol.

Why does 0.999… equal 1?

Let x = 0.999…. Then 10x = 9.999…, and subtracting gives 10x − x = 9x = 9, so x = 1. The two decimals are two ways of writing the same number — no rounding is involved.

How can I tell whether a decimal terminates?

Reduce the fraction first. If the denominator has no prime factors other than 2 and 5, the decimal terminates: 5/8 = 0.625 does. If any other prime factor remains, the decimal repeats forever: 1/6 = 0.1666… and 4/11 = 0.3636… do.

What is the difference between the two conversion modes?

Terminating mode reads the digits you type and puts them over the matching power of ten. Repeating mode asks separately for the fixed part and the digits that repeat, then uses the subtraction method. The calculator never guesses which digits repeat, so the result always matches what you meant.

How does the nearest fraction search work?

For every denominator from 1 up to the limit you set (maximum 10000) the tool tests the closest numerator and keeps whichever fraction is nearest to your exact value. Comparisons use exact integer cross-multiplication, ties go to the smallest denominator, and the card is labelled as an approximation when the fraction found is not equal to your input.

ⓘ About this page

Turn terminating or repeating decimals into exact fractions, mixed numbers and percentages, with clear step-by-step working and a nearest-fraction search.

Related tools

Open
Link copied