Decimal To Fraction Calculator

Form

Results

Fraction Decimal

0/0

1

What is Decimal To Fraction?

This calculator rewrites a decimal as a reduced fraction. The fraction and decimal represent the same point on the number line, but the fraction can make a ratio easier to recognize. For example, 0.75 becomes 3/4 and −1.5 becomes −3/2.

The converter accepts positive numbers, negative numbers, zero and whole numbers. It uses a bounded continued-fraction approximation, which is helpful when a decimal was rounded or cannot be represented exactly by a short fraction.

2

How to Use This Calculator

  1. Enter one decimal number. A leading zero, as in 0.0625, makes small values easier to read.
  2. Select Calculate. The calculator searches for a numerator and denominator whose quotient matches the entered value within a small tolerance.
  3. Read the answer as numerator over denominator. A negative sign is placed on the numerator.
  4. Divide the numerator by the denominator to check the decimal value.

Zero is returned as 0/1, and an exact integer such as 8 is returned as 8/1. The denominator is limited to 1,000,000 and the search is capped, so an input with many digits may produce a close practical approximation rather than the exact rational value implied by every typed digit.

3

Formula Used

For a finite decimal with k digits after the decimal point, an exact construction is:

fraction = integer formed by removing the decimal point ÷ 10ᵏ

Then divide numerator and denominator by their greatest common divisor. Thus 0.375 = 375/1000 = 3/8.

This page uses continued fractions. At each step it takes the whole-number part, then repeats with the reciprocal of the remaining fractional part. The successive convergents provide increasingly accurate fractions. The process stops when the approximation is close enough, the denominator limit is reached or 100 iterations have run.

4

Variables Explained

Parts of a decimal-to-fraction conversion
TermMeaningExample
Decimal xThe entered real number to represent0.375
Numerator nThe top integer in the result3
Denominator dThe positive bottom integer; it cannot be zero8
Fraction n/dA rational approximation to x3/8 = 0.375
ToleranceThe allowed difference between x and n/dUsed to stop the search
5

Worked Example

Convert 1.375. Because it has three decimal places, first write 1375/1000. Both numbers are divisible by 125:

1375 ÷ 125 = 11
1000 ÷ 125 = 8

The reduced result is 11/8. Checking by division gives 11 ÷ 8 = 1.375. It can also be written as the mixed number 1 3/8, although the calculator displays the improper fraction.

For a negative example, −0.125 becomes −125/1000. Reducing by 125 gives −1/8. For an approximate example, entering 0.333333 may return 1/3 because 1 ÷ 3 is within the converter’s tolerance of the entered decimal.

6

Why Use This Calculator?

The result is a numerator and denominator in lowest practical terms from the continued-fraction search. An improper fraction, whose numerator is larger than its denominator, is valid. Divide it into a whole part if a mixed-number format is needed.

Remember that a typed decimal may already be rounded. The fraction 1/3 has a recurring decimal, while 0.33 is exactly 33/100 if those two decimal places are treated as exact. An approximation tool may choose a familiar nearby fraction depending on tolerance. For measurements, do not claim more precision than the original measurement supports.

Fractions are unitless representations until context supplies a unit. Converting 0.25 metre to 1/4 does not erase the metre; it means 1/4 metre.

To compare two possible answers, convert both back to decimals or cross-multiply them. A larger denominator is not evidence of greater accuracy by itself. The correct choice depends on whether the entered decimal is exact and what precision the original information supports.

7

Common Mistakes

    • Do not assume every displayed decimal is exact; it may be rounded from a recurring value.
    • Keep the negative sign with the whole fraction, not with both numerator and denominator.
    • A denominator of 1 is normal for an integer: 7/1 equals 7.
    • Do not read 0.05 as five tenths; it is five hundredths, or 1/20.
    • When converting by hand, use one zero in the denominator for each decimal place before reducing.
    • Do not use the fraction’s slash as a mixed-number separator. Eleven eighths is 11/8, while 1 3/8 is its mixed form.
8

Frequently Asked Questions

Why did 0 become 0/1?

A fraction needs a nonzero denominator. Zero divided by one is exactly zero, so 0/1 is the standard valid fraction form.

Can it convert a negative decimal?

Yes. The magnitude is converted and the sign is applied to the numerator. For example, −2.25 becomes −9/4.

Why can 0.333333 become 1/3?

The converter searches for a close fraction within a small tolerance. One third is extremely close to that rounded decimal, though the exact six-place decimal is 333333/1000000.

Does the calculator show mixed numbers?

No. It returns an improper fraction. Divide the numerator by the denominator for the whole part, then keep the remainder over the same denominator.

Is the returned fraction always exact?

It is exact for many ordinary finite inputs. For long or rounded decimals, the denominator and tolerance limits can produce a close approximation. Divide the result to check it against the precision you need.

9

Sources & References