Decimal to Fraction Calculator

Turning a decimal into a fraction is a common school and kitchen task: 0.375 of a cup is 3/8, and 2.75 inches is 2 3/4. This calculator converts any decimal to a fraction in lowest terms, shows the mixed number and the percentage, and tells you whether the fraction is exact or an approximation. You can set the largest denominator allowed.

Fraction3/8
Mixed number
3/8
Match
Exact
As a percentage
37.5%

How to use the Decimal to Fraction Calculator

  1. Type the decimal number.
  2. Choose the largest denominator you will accept.
  3. Read the fraction in lowest terms and the mixed number.
  4. Check the match row to see whether it is exact or approximate.

Formula used

A terminating decimal with k digits equals the digits ÷ 10ᵏ, reduced by the greatest common divisor. Otherwise the closest fraction below the chosen denominator limit is found with continued fractions.

Worked example

Here is the Decimal to Fraction Calculator worked through with the example values shown above, so you can check each step by hand.

Inputs
Decimal0.375
Largest denominator allowed1,000
Result
Fraction3/8
Mixed number3/8
MatchExact
As a percentage37.5%

By hand

Write the decimal digits over a power of ten, then simplify. 0.375 is 375/1000. Dividing top and bottom by their greatest common divisor, 125, gives 3/8. The calculator does this automatically and reports it as exact.

A number greater than 1 also has a mixed form: 2.75 is 11/4 as an improper fraction and 2 3/4 as a mixed number. Negative numbers keep their sign, so -0.125 is -1/8.

Repeating and long decimals

Some decimals have no finite fraction in a few digits. 0.333333 is very close to 1/3, and with a denominator limit of 1,000 the calculator returns 1/3 and marks it as approximate. If you allow denominators up to 1,000,000, it finds the exact fraction for the digits you typed, 333332/999997.

Irrational numbers such as π never have an exact fraction. With a limit of 100, 3.14159 becomes 22/7, the familiar 22/7 approximation, which differs from 3.14159 by about 0.0013.

How the closest fraction is found

The calculator uses continued fractions, which give the best rational approximations to a number: no fraction with a smaller denominator is closer. It stops when the next denominator would exceed your limit, or when the match is exact to about twelve digits.

A smaller limit gives simpler fractions such as 1/3 or 3/8, and a larger limit gives closer but more complicated ones.

Where it helps

Cooking and woodwork use fractions of cups and inches, while calculators and spreadsheets give decimals. To go the other way, divide the top by the bottom.

The fraction calculator on this site adds, subtracts, multiplies and divides fractions, and the percentage calculator handles percentages.

Common decimals and their fractions

Some conversions are worth knowing by heart: 0.125 is 1/8, 0.2 is 1/5, 0.25 is 1/4, 0.375 is 3/8, 0.4 is 2/5, 0.5 is 1/2, 0.6 is 3/5, 0.625 is 5/8, 0.75 is 3/4 and 0.875 is 7/8. Tape measures and drill bit sets use eighths and sixteenths of an inch, so these come up often in workshops.

Repeating decimals have neat fractions too: 0.1111… is 1/9, 0.6666… is 2/3 and 0.142857142857… is 1/7. To enter one, type enough digits for the pattern to show, and keep the denominator limit small so the simple fraction wins over a long exact one.

Frequently asked questions

How do I convert 0.5 to a fraction?

0.5 is 5/10, which simplifies to 1/2.

What is 0.75 as a fraction?

3/4.

Why does it say approximate?

The decimal cannot be written exactly with a denominator within your limit, so the closest fraction is shown.

How do I convert a repeating decimal?

Enter enough digits, such as 0.3333, and use a small limit. The calculator returns the simplest close fraction, 1/3.

What is the mixed number?

A whole number plus a proper fraction, like 2 3/4 for 2.75.

Can it handle negative decimals?

Yes. The sign is kept in front of the fraction.

This calculator gives estimates for information only. Actual figures from a bank, employer, tax authority or doctor may differ. It is not financial, tax, legal or medical advice.