No ads, no sign-upChecked 2026-08-03

Decimal to Fraction Converter

Result

3/8

Result: 3/8

0.375 is 3/8. A continued-fraction expansion looks for the simplest fraction that matches, so 0.3333 comes back as 1/3 instead of 3333/10000. Lower the denominator cap to force a rounder answer: cap it at 16 and 0.313 becomes 5/16.

Worked examples

How it's calculated

x = a₀ + 1 ÷ (a₁ + 1 ÷ (a₂ + …))

  1. StepSplit off the whole part of the number and keep the remainder.
  2. StepInvert the remainder and split off its whole part, over and over.
  3. ResultStop when the next denominator would break the cap; the last fraction is the answer.

What this number means

A terminating decimal is easy to convert by hand: put the digits over the matching power of ten and reduce. 0.375 is 375/1000, and cancelling 125 leaves 3/8. A repeating decimal is the interesting case. 0.3333 over ten thousand is technically correct and useless — what you want is 1/3. Getting there uses a continued-fraction expansion: split off the whole part of the number, invert what is left, and repeat. Each step yields a convergent, a fraction that approximates the decimal better than any simpler fraction can. The expansion stops when the next denominator would exceed the cap you set, and the convergents are coprime by construction, so the answer is already in lowest terms. Two things decide what you get back. The digits you type are the specification: 0.33 and 0.3333 are different numbers and honestly deserve different fractions. And the denominator cap is a tool rather than a safety rail. Lowering it forces a simpler, rounder answer — exactly what measurements want. Cap at 16 and 0.313 becomes 5/16, the nearest sixteenth of an inch; cap at 200 and 3.141593 becomes the classic 355/113. Irrational numbers have no exact fraction. π, √2 and e can only ever be approximated, however high you raise the cap.

The cap is the interesting control

Leave it high for an exact conversion, lower it to force a rounder fraction. Sixteen gives sixteenths of an inch, eight gives eighths, twelve gives twelfths.

Simplest, not nearest

The expansion looks for the simplest fraction that matches, not the closest one over a fixed denominator. That is why 0.3333 gives 1/3 rather than 3333/10000.

The digits you type are the question

0.33 finds 33/100 and 0.3333 finds 1/3. Both are correct for what was entered, so type enough digits of a repeating decimal for it to be recognised.

Irrational numbers never come out exact

π, √2 and e have no fractional form at all. What you get is a very good approximation, never the number itself.

Commonly misread

0.3333 should convert to 3333/10000.

That is arithmetically true but not what was meant. The converter looks for the simplest matching fraction and returns 1/3.

The answer still needs reducing afterwards.

Consecutive convergents of a continued fraction are always coprime, so the fraction comes out in lowest terms already.

A higher denominator cap always gives a better answer.

It gives a more exact one. For a measurement you usually want the opposite: a low cap and a fraction you can read off a ruler.

Reference table

DecimalCapFraction
0.510001/2
0.62510005/8
0.37510003/8
0.062510001/16
0.33100033/100
0.33331001/3
0.6671002/3
0.14291001/7
0.313165/16
1.583333100019/12
3.141593200355/113
−0.61000−3/5

Questions

How do I turn a decimal into a fraction?

For a terminating decimal, write the digits over the matching power of ten and reduce: 0.375 is 375/1000, which cancels to 3/8. For a repeating decimal the converter uses a continued-fraction expansion instead.

Why does 0.3333 come back as 1/3 and not 3333/10000?

Because the expansion searches for the simplest fraction that matches the digits, and 1/3 is far simpler. If you want the literal fraction, type fewer digits or raise the denominator cap.

What does the denominator cap do?

It limits how complicated the answer may get. Cap at 16 and 0.313 becomes 5/16, the nearest sixteenth of an inch; cap at 200 and 3.141593 becomes 355/113.

Is the result already reduced?

Yes. Consecutive convergents of a continued fraction satisfy hk' − h'k = ±1, which means numerator and denominator share no factor. No further reduction is possible.

Can π be written as a fraction?

No. π is irrational, so no fraction equals it exactly. 355/113 matches it to six decimal places and is the best approximation with a denominator under 16000, but it is still an approximation.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.