GlobalFree to use

Decimal to fraction converter, including repeating decimals

Turn a decimal into an exact fraction in lowest terms and a mixed number. Write repeating digits in brackets, and get the closest simple fraction for long decimals such as 3.14159.

Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.

Input

Tip: press Ctrl + Enter to run

Your result

Your result will appear here.

About this tool

Tape measures, drill bits and recipes speak in fractions, while calculators and spreadsheets give decimals. This converter turns a decimal into the exact fraction it represents, reduces it to lowest terms and shows the mixed number, so 2.375 inches becomes 2 3/8 inches. It also handles repeating decimals written with brackets and, for long decimals, finds the closest fraction with a small denominator.

How to use it

  1. Type the decimal, for example 0.625 or 2.375. A comma works as the decimal mark too.
  2. If digits repeat forever, put only the repeating block in brackets: 0.(3) for one third, 0.1(6) for one sixth.
  3. Leave the largest denominator at 1000, or lower it to 16 or 64 when you need an answer that matches the marks on a ruler.
  4. Run it and read the exact fraction, the mixed number and the percentage. A closest-fraction line appears when the exact denominator is larger than your limit.

How the calculation works

A terminating decimal with k digits after the point is written over 10 to the power k, so 2.375 is 2375/1000, and both parts are divided by their greatest common divisor (125) to get 19/8. For a repeating decimal the tool subtracts the non-repeating part: 0.1(6) gives (16 − 1)/90 = 15/90 = 1/6. Whole-number arithmetic is exact, with no floating-point rounding. The closest fraction uses continued fractions, which give the best approximation for any denominator limit.

0.375 = 375/1000 = 3/8; 0.1(6) = (16 − 1)/90 = 1/6; closest fraction by continued fractions

Worked example

A woodworking plan lists a 2.375 inch dowel and your drill bits are marked in fractions. 2.375 converts to 19/8, which is the mixed number 2 3/8, so you need the 2 3/8 inch bit. If a spreadsheet shows 3.14159 instead, the exact answer is 314159/100000, and the closest fraction with a denominator up to 1000 is 355/113, off by less than three millionths.

Sample input and result

0.375 = 3/8; 2.5 = 5/2 = 2 1/2; 0.(3) = 1/3

Limitations

  • Input is limited to 40 characters, and the bracket notation only works for one repeating block at the end of the number.
  • Irrational numbers such as π or √2 never have an exact fraction; the tool can only approximate the digits you type.
  • Scientific notation such as 1.5e-3 is not accepted; write the decimal out in full.

Last updated:

Frequently asked questions

How do I enter a repeating decimal?

Put the repeating digits in brackets: 0.(3) for 0.333..., 0.1(6) for 0.1666... and 0.(142857) for 1/7.

What is the closest fraction line for?

When the exact fraction has a huge denominator, the tool also shows the best fraction with a denominator up to the limit you set, for example 355/113 for 3.14159.

Why does 0.33 not give 1/3?

0.33 is exactly 33/100. One third is 0.333… without end, which you enter as 0.(3). The tool converts the digits you type, not the number you might have meant.

How do I get a fraction in sixteenths for a tape measure?

Set the largest denominator to 16. The closest-fraction line then shows the nearest sixteenth (or a simpler fraction such as 3/8) along with the size of the error.

Does it work with negative numbers?

Yes. −0.75 gives −3/4, and the mixed number keeps the minus sign on the whole part, as in −1 1/4.

Can I convert a fraction back to a decimal?

Divide the top by the bottom, or use the fraction calculator, which shows fractions in lowest terms.

Troubleshooting

It says the input is invalid.

Use digits, at most one decimal point and, optionally, one pair of brackets at the end, for example 1.2(34). Remove spaces, units and percent signs.

The fraction has a huge denominator.

That is the exact value of a long decimal. Read the closest-fraction line, or lower the largest denominator to get a simpler answer.

I typed 0.(9) and got 1.

That is correct: 0.999… repeating is exactly equal to 1.

Privacy & Free to use

Are my inputs stored?

Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.

Is this tool free?

Yes. No signup or payment is required.

Processed in your browser

Useful next steps