Decimal To Fraction Calculator

Last Updated: June 17, 2026

Calculate a fraction from a decimal, whether the decimal terminates, repeats, or only needs a close simple approximation.

Decimal to Fraction Calculator

Required: a terminating decimal. Scientific notation is accepted.
Required: whole-number part and repeating digits. Non-repeating digits are optional.
For 0.8333…, enter whole part 0, non-repeating digits 8, and repeating digits 3.
Required: a decimal value to approximate.
Uses continued fractions to find a close fraction within the selected denominator limit.

Decimal to Fraction Formula

The calculator uses a different formula for each of its three modes.

For a terminating decimal with d digits after the decimal point, write the digits over the matching power of 10 and then divide the top and bottom by their greatest common divisor (GCD):

fraction = (decimal * 10^d) / 10^d, reduced by GCD

For a repeating decimal, let k be the number of non-repeating digits after the point and n be the number of digits in the repeating block. Let A be the integer formed by the non-repeating digits followed by one repeating block, and let B be the integer formed by the non-repeating digits alone:

fraction = (A - B) / ((10^n - 1) * 10^k), reduced by GCD

For an approximation, the calculator finds the fraction p/q whose value is closest to the decimal while keeping q at or below the maximum denominator you set:

p/q approximately equals decimal, with q <= max denominator
  • d: number of digits after the decimal point in a terminating decimal
  • k: number of non-repeating digits after the decimal point
  • n: number of digits in the repeating block
  • A: integer made of the non-repeating digits plus one repeating block
  • B: integer made of the non-repeating digits only
  • p, q: numerator and denominator of the approximating fraction
  • GCD: greatest common divisor of the numerator and denominator, used to reduce the fraction

The terminating mode handles decimals that stop, such as 0.75. The repeating mode handles decimals with a block that repeats forever, such as 0.8333..., where you enter the whole-number part, any non-repeating digits, and the repeating digits separately. The approximation mode takes any decimal and returns the simplest nearby fraction within the denominator limit you choose, which is useful when an exact fraction would have an awkward denominator.

Common Decimal and Fraction Equivalents

These values cover the conversions you will meet most often.

DecimalFractionType
0.51/2Terminating
0.251/4Terminating
0.21/5Terminating
0.1251/8Terminating
0.333...1/3Repeating
0.666...2/3Repeating
0.142857...1/7Repeating

The next table shows how single repeating digits map to ninths, which is the pattern behind the repeating-decimal formula.

Repeating decimalFraction
0.111...1/9
0.222...2/9
0.555...5/9
0.999...1

Example Problems

Example 1: Convert the terminating decimal 0.75 to a fraction. There are two digits after the point, so d = 2 and you write 75 over 100. The GCD of 75 and 100 is 25, so 75/100 reduces to 3/4.

Example 2: Convert the repeating decimal 0.8333... to a fraction. The whole-number part is 0, there is one non-repeating digit (k = 1) and one repeating digit (n = 1). Here A = 83 and B = 8, so the numerator is 83 - 8 = 75 and the denominator is (10^1 - 1) * 10^1 = 90. That gives 75/90, which reduces by a GCD of 15 to 5/6.

Frequently Asked Questions

How do I know whether to use the repeating mode? Use the repeating mode when the decimal has one or more digits that continue forever in a fixed pattern, such as 0.1666... or 0.272727.... If the decimal stops at a final digit, use the terminating mode instead. In the repeating mode you enter the whole-number part, the non-repeating digits, and the repeating digits in separate fields so the calculator can apply the formula correctly.

When should I use the approximation mode? Use it when you have a long or messy decimal and want a simple fraction that is close enough for practical use. You set a maximum denominator, and the calculator returns the closest fraction at or below that limit, so a smaller maximum gives a simpler but less precise result.

Why does my fraction get reduced to smaller numbers? The calculator divides the numerator and denominator by their greatest common divisor so the answer is in lowest terms. For example 50/100 and 1/2 represent the same value, but 1/2 is the reduced form. Reducing makes the fraction easier to read and matches how fractions are normally written.

Decimal To Fraction Calculator