Decimal to Fraction Calculator

Convert terminating and repeating decimals to simplified fractions with step-by-step solutions.

Select Decimal Type

Examples: 0.5, 0.75, 0.125, 3.25

Result

Simplified Fraction
--
fraction
Original decimal --
Unsimplified fraction --
GCD used --
Mixed number --
Percentage --

Step-by-Step Solution

0.625 = 625/1000 = 5/8

How to Convert Decimals to Fractions

Converting a decimal number to a fraction is a fundamental math skill. The method depends on whether the decimal terminates (ends) or repeats infinitely. Both types can always be expressed as a ratio of two integers (a fraction).

Method for Terminating Decimals

A terminating decimal is one that has a finite number of digits after the decimal point. The conversion process is straightforward:

  1. Count the number of decimal places (digits after the decimal point).
  2. Write the decimal digits as the numerator.
  3. Write the corresponding power of 10 as the denominator (10 for 1 decimal place, 100 for 2, etc.).
  4. Simplify by dividing both numerator and denominator by their Greatest Common Divisor (GCD).

Method for Repeating Decimals

A repeating decimal has a block of digits that repeats indefinitely. The algebraic method works as follows:

  1. Let x equal the repeating decimal.
  2. Multiply x by 10^n where n is the length of the repeating block to shift the repeating part.
  3. Subtract the original equation from the multiplied one to eliminate the repeating part.
  4. Solve for x to get the fraction.

Common Decimal-to-Fraction Conversions

0.5 = 1/2

One half. The most common fraction in everyday use.

0.5 = 5/10 = 1/2

0.25 = 1/4

One quarter. Common in measurements and money.

0.25 = 25/100 = 1/4

0.333... = 1/3

One third. A repeating decimal that never terminates.

0.333... = 1/3

0.125 = 1/8

One eighth. Common in cooking and construction.

0.125 = 125/1000 = 1/8

0.1666... = 1/6

One sixth. The 6 repeats infinitely after the 1.

0.1666... = 1/6

0.142857... = 1/7

One seventh. Has a 6-digit repeating cycle.

0.142857142857... = 1/7

Understanding the GCD Method

The Greatest Common Divisor (GCD), also known as the Greatest Common Factor (GCF) or Highest Common Factor (HCF), is the largest positive integer that divides both the numerator and the denominator without leaving a remainder. To simplify a fraction, divide both the numerator and denominator by their GCD.

Finding the GCD: Euclidean Algorithm

The most efficient method for finding the GCD is the Euclidean algorithm:

  1. Divide the larger number by the smaller number and find the remainder.
  2. Replace the larger number with the smaller number, and the smaller number with the remainder.
  3. Repeat until the remainder is 0. The last non-zero remainder is the GCD.

For example, to find GCD(625, 1000): 1000 = 1 x 625 + 375, then 625 = 1 x 375 + 250, then 375 = 1 x 250 + 125, then 250 = 2 x 125 + 0. So GCD = 125.

Why Some Decimals Terminate and Others Repeat

A fraction a/b in lowest terms produces a terminating decimal if and only if the denominator b has no prime factors other than 2 and 5 (the factors of 10). If b has any other prime factors, the decimal representation will repeat. For example:

  • 1/8 terminates because 8 = 23 (only factor is 2).
  • 1/3 repeats because 3 is a prime factor other than 2 or 5.
  • 1/6 repeats because 6 = 2 x 3, and 3 is not 2 or 5.
  • 1/20 terminates because 20 = 22 x 5 (only factors are 2 and 5).