Decimal to Fraction Converter – Online Calculator

Decimal to Fraction Converter 0.625 = 5/8

Convert decimal numbers to fractions with a step-by-step explanation. Supports repeating decimals, negative numbers and mixed numbers.

The calculator above turns any decimal, including negative numbers and repeating decimals, into a fraction in lowest terms and a mixed number, with a step-by-step solution like a worked classroom answer. Press Example several times to walk through the examples in this article: 1.625, 0.(6), 0.1(6), −1.25 and 0.(142857).

Two strips of equal length: the top one is split into 8 parts with 5 shaded, the bottom one into 10 parts shaded up to 0.625; both shaded parts have the same length.Split into 8 equal parts, shade 5: 5/8Split into 10 parts (1000 small parts), shade 0.625: 625/10000.625 = 625/1000 = 5/8
The shaded parts of both strips have the same length, so 0.625 and 5/8 are the same number.

🔢 What is decimal to fraction conversion?

Converting a decimal to a fraction means writing the decimal as a quotient of two integers a/b with b ≠ 0. Both are ways of writing the same value: decimals are handy for measuring and comparing sizes, while fractions are exact and easy to simplify in calculations. It is a core skill in middle school math (rational numbers, terminating and repeating decimals).

A few familiar examples:

  • 0.5 = 1/2
  • 0.75 = 3/4
  • 1.625 = 13/8 = 1 5/8
  • 0.333… = 0.(3) = 1/3 (a repeating decimal)

📚 Two kinds of decimals

Terminating decimals

The decimal part stops after a finite number of digits, for example 0.5, 2.75 or 0.0125. These can always be written as a fraction whose denominator is a power of 10.

Repeating decimals

The decimal part goes on forever, but a group of digits called the repeating block (or period) repeats endlessly. It is written with a bar over the block or in brackets: 0.666… = 0.(6).

  • Pure repeating: the block starts right after the decimal point, for example 0.(3) or 0.(142857).
  • Mixed repeating: some digits come before the block, for example 0.1(6) = 0.1666…

How to tell them apart: a fraction in lowest terms with a positive denominator whose only prime factors are 2 and 5 equals a terminating decimal (3/8 = 0.375 because 8 = 2³). If the denominator has any other prime factor, the fraction equals a repeating decimal (1/6 = 0.1(6) because 6 = 2 · 3).

Non-repeating infinite decimals such as π = 3.14159… or √2 = 1.41421… are irrational, so no fraction is exactly equal to them.

📐 Conversion formulas

1. Terminating decimals

If the number has n digits after the point, remove the point to get the integer N and put it over 10^n:

Decimal = N / 10^n

Steps:

  1. Count the digits after the decimal point; call this n.
  2. Write the decimal as a fraction with denominator 1.
  3. Multiply the numerator and the denominator by 10^n so the numerator becomes a whole number.
  4. Simplify by dividing both by their greatest common divisor (GCD).
  5. If the numerator is larger than the denominator and you want a mixed number, divide: the quotient is the whole part and the remainder is the new numerator.

2. Repeating decimals

Let m be the number of non-repeating digits after the point and k the length of the repeating block. Then:

x = (a − b) / (10^m · (10^k − 1))

Where:

  • a: the integer formed by the whole part, the non-repeating digits and one copy of the block, written together.
  • b: the integer formed by the whole part and the non-repeating digits.
  • The denominator 10^m(10^k − 1) is simply k nines followed by m zeros.

For 1.2(34): a = 1234, b = 12, k = 2 and m = 1, so the denominator is 990:

1.2(34) = (1234 − 12)/990 = 1222/990 = 611/495

For a pure repeating decimal (m = 0) the formula reduces to x = (a − b)/(10^k − 1). It comes from the equation method: multiply x by powers of 10 so that two numbers share the same repeating tail, then subtract, as in Examples 3 and 4 below.

💡 Worked examples

Example 1: Convert 0.625 to a fraction

Step 1: Count the decimal places. 0.625 has 3 digits after the point, so n = 3.

Step 2: Write it over 10³ = 1000:

0.625 = 625/1000

Step 3: Find GCD(625, 1000) with the Euclidean algorithm:

1000 = 1 × 625 + 375; 625 = 1 × 375 + 250; 375 = 1 × 250 + 125; 250 = 2 × 125

The last non-zero remainder is 125, so GCD(625, 1000) = 125.

Step 4: Simplify:

625/1000 = 5/8

Answer: 0.625 = 5/8.

Example 2: Convert 1.625 to a mixed number

As in Example 1: 1.625 = 1625/1000. GCD(1625, 1000) = 125, so 1625/1000 = 13/8.

The numerator 13 is larger than the denominator 8. Dividing 13 by 8 gives quotient 1 and remainder 5:

13 = 1 × 8 + 5, so 13/8 = 1 5/8

These are the values loaded by the first press of the Example button, with both Simplify and Mixed number ticked.

Example 3: Convert 0.(6) = 0.666… to a fraction

Step 1: Let x = 0.666…

Step 2: The block has 1 digit, so multiply both sides by 10: 10x = 6.666…

Step 3: Subtract the original equation; the tail 0.666… cancels:

10x − x = 6.666… − 0.666…, so 9x = 6

Step 4: Solve: x = 6/9 = 2/3.

Answer: 0.(6) = 2/3. In the calculator you can enter 0.6 with repeating = 1, or type 0.(6) directly.

Example 4: Mixed repeating decimal 0.1(6) = 0.1666…

The digit 1 does not repeat, the digit 6 does. Use two multiplications: by 10 to move the point past the non-repeating digit, and by 100 to move it one more full block.

100x = 16.666…; 10x = 1.666…; 90x = 15

So x = 15/90 = 1/6. Multiplying only by 10 and subtracting as in Example 3 gives 9x = 1.5, which still contains a decimal. This is a common mistake with mixed repeating decimals.

Example 5: A negative number, −1.25

Keep the minus sign on the numerator and work as usual: −1.25 = −125/100 = −5/4 = −1 1/4, with GCD(125, 100) = 25. The negative mixed number −1 1/4 means −(1 + 1/4).

Example 6: A long block, 0.(142857)

The block has 6 digits, so the denominator is 999999: 0.(142857) = 142857/999999. Since 999999 = 7 × 142857, the GCD is 142857 itself and the fraction reduces to 1/7.

⌨️ How to enter numbers in the calculator

  • Ordinary decimals: type 1.625 (a decimal comma 1,625 also works); add a minus sign for negatives, e.g. −0.75.
  • Repeating, option 1: put the block in brackets, e.g. 0.(3) or 2.1(45).
  • Repeating, option 2: type the number and fill in Repeating digits. This box says how many final digits repeat: 0.16 with repeating = 1 means 0.1666…
  • Repeating, option 3: write the block at least twice and end with three dots, e.g. 0.1212… The calculator finds the shortest block by itself.

The calculator rewrites the number in its shortest form, for example 0.66(6) becomes 0.(6), and checks the answer by dividing the numerator by the denominator again.

📊 Quick conversion table

DecimalFraction in lowest termsNote
0.11/10One tenth
0.1251/8Denominator 8 = 2³
0.21/5One fifth
0.251/4One quarter
0.(3)1/3Pure repeating
0.3753/8Three eighths
0.51/2One half
0.6255/8Example 1
0.(6)2/3Example 3
0.753/4Three quarters
0.8(3)5/6Mixed repeating
0.8757/8Seven eighths
0.1(6)1/6Example 4
0.(1)1/9Each 9 in the denominator matches one digit of the block
0.(09)1/11Two-digit block
0.(142857)1/7Example 6

🎯 Real-world applications

1. Measurement and machining

Inch rulers, drill bits and wrenches are sized in fractions. A drawing that says 0.375 inch calls for a 3/8 inch drill bit.

2. Cooking

Recipes use 1/2 cup or 3/4 teaspoon. When you double or scale down a recipe, a decimal result like 0.75 has to be turned back into 3/4 to measure it.

3. Probability and statistics

The probability of three tails in three coin tosses is 0.125, that is 1/8: the fraction shows at once that 1 outcome out of 8 is favorable.

4. Finance

A 0.25 ownership share means owning 1/4 of a company; interest rates, discounts and profit splits are often easier to picture as fractions.

5. Programming

Computers store real numbers in binary, so 0.1 is not stored exactly. When exact results matter, programmers use fraction types (such as fractions.Fraction in Python), which means converting decimals to fractions before calculating.

⚠️ Common mistakes

  1. Miscounting decimal places. 0.05 has 2 decimal places, so it equals 5/100 = 1/20, not 5/10.
  2. Forgetting to simplify. 75/100 is not the final answer; divide by 25 to get 3/4.
  3. Confusing terminating and repeating decimals. 0.333 (stopping after 3 digits) equals 333/1000; only 0.(3) equals 1/3.
  4. Multiplying only by 10^k for a mixed repeating decimal. For 0.1(6) you need both 100x and 10x, as in Example 4.
  5. Misreading negative mixed numbers. −1 1/4 equals −1.25, not −1 + 1/4 = −0.75.

A fun fact: 0.(9) = 1. Let x = 0.999…; then 10x = 9.999…, and subtracting gives 9x = 9, so x = 1. The calculator on this page gives exactly this result.

🧮 Interactive quiz

Pick an answer. The explanation appears right below the question.

Question 1. The decimal 0.75 equals which fraction:

Question 2. The repeating decimal 0.(3) = 0.333… equals which fraction:

Question 3. Write 2.4 as a mixed number:

Question 4. The mixed repeating decimal 0.1(6) = 0.1666… equals which fraction:

Question 5. The decimal 0.0125 equals which fraction in lowest terms:

❓ Frequently asked questions (FAQ)

How do I convert a decimal to a fraction in Excel?

Select the cell, press Ctrl + 1 to open Format Cells, choose Number → Fraction and pick "Up to three digits". Or use the formula =TEXT(A1,"# ???/???"). Excel only finds an approximate fraction with at most 3 digits in the denominator, so for repeating decimals with long blocks use the calculator at the top of this page to get the exact fraction.

What is a repeating decimal?

A decimal with a group of digits (the repeating block) that repeats forever, such as 0.333… = 0.(3) or 0.142857142857… = 0.(142857). If the block starts right after the decimal point it is a pure repeating decimal; if some digits come first, as in 0.1(6), it is a mixed repeating decimal.

Why simplify fractions?

A fraction in lowest terms is the shortest way to write the same value, so it is easier to read, compare and use in further calculations. For example 50/100 simplifies to 1/2. Tests usually expect answers in lowest terms.

What is the difference between a fraction and a mixed number?

The same value can be written as the fraction 13/8 or the mixed number 1 5/8, made of the whole part 1 and the fractional part 5/8. Mixed numbers are only used for values greater than 1 and make the size easier to picture; for calculations the fraction form is usually more convenient.

Can all decimals be converted to fractions?

Every terminating decimal and every repeating decimal can be written as a fraction, because they are rational numbers. Non-repeating infinite decimals such as π = 3.14159… or √2 = 1.41421… are irrational: no fraction equals them exactly, only approximations such as 22/7 ≈ π.