Decimal to Fraction Calculator
Exact fractions, recovered by continued fractions.
Exact fractions, recovered by continued fractions.
Lower this to find a simpler near-equivalent.
As a fraction
3/4
This uses the continued fraction expansion rather than the schoolbook method of multiplying by a power of ten. The difference matters for recurring decimals: 0.333333 becomes 1/3 rather than 333333/1000000, and 3.142857 recovers 22/7. A fraction's decimal terminates exactly when its reduced denominator has no prime factors besides 2 and 5 — the primes that divide ten.
How the Decimal to Fraction Calculator works
This uses the continued fraction expansion rather than multiplying by a power of ten, and the difference matters for recurring decimals: 0.333333 becomes 1/3 rather than 333333/1000000, and 3.142857 recovers 22/7.
Also known as: convert decimal to fraction · decimal as a fraction · repeating decimal to fraction · fraction converter
Why not just use a power of ten
The schoolbook method puts the digits over a power of ten and reduces: 0.75 becomes 75/100, then 3/4. That works perfectly for decimals that terminate.
It fails on recurring ones. 0.333333 becomes 333333/1000000, which is close to a third but is not it, and no amount of reducing will get there.
Continued fractions
This page uses the continued fraction expansion instead, which finds the simplest fraction within a tolerance rather than the most literal one.
It recovers 1/3 from 0.333333 and 1/7 from 0.142857. Lowering the maximum denominator finds deliberately simpler approximations — which is how 3.14159 yields 22/7, the classic approximation of π.
A fraction's decimal terminates exactly when its reduced denominator has no prime factors besides 2 and 5, the primes that divide ten. Halves, quarters, fifths and eighths terminate; thirds, sevenths and ninths do not.
Where to go next
The Decimal to Fraction question rarely arrives on its own. These are the ones that usually come with it:
- Fraction to Decimal Calculator — Decimal, percentage, and whether it terminates.
- Mixed Number Calculator — Mixed numbers to improper fractions and back.
- Ratio Calculator — Simplify a ratio, and see it as shares of the whole.
- Percentage Calculator — Every common percentage question in one place.
Frequently asked questions
How do I convert a decimal to a fraction?
The schoolbook method puts the digits over a power of ten and reduces. That fails on recurring decimals, so this uses continued fractions, which recover 1/3 from 0.333333.
Why does 0.333333 become 1/3 and not 333333/1000000?
Because the continued fraction expansion finds the simplest fraction within a tolerance, and 1/3 is far simpler while being closer to the intended value.
Which decimals terminate?
Those whose reduced denominator has no prime factors besides 2 and 5 — the primes that divide ten. A third recurs; a quarter does not.
What is the largest denominator setting for?
Capping how complex the fraction may get. Lowering it finds a simpler near-equivalent, which is how 3.14159 yields 22/7.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/decimal-to-fraction-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Decimal to Fraction Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/decimal-to-fraction-calculator" style="color:#64748b">Decimal to Fraction Calculator</a> from The Calc Library</p>The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.
Related calculators
Fraction to Decimal Calculator
Decimal, percentage, and whether it terminates.
OpenMixed Number Calculator
Mixed numbers to improper fractions and back.
OpenRatio Calculator
Simplify a ratio, and see it as shares of the whole.
OpenPercentage Calculator
Every common percentage question in one place.
Open