Math

Decimal to Fraction Calculator

Convert a decimal into a fraction in simplest form, with the mixed number form shown too.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

About this calculator

This converter approximates a decimal with a reduced fraction using continued fractions. The denominator is capped at 10,000,000 and a numeric tolerance is used, so some results are approximations rather than exact identities.

Worked example

calculated with the default values below

Decimal 0.375 Fraction 3/8 · Numerator 3 · Denominator 8 · Whole part 0 · Remainder numerator 3

General background references

Disclaimer

These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.

Maintained by: CalcDelta

Implementation source

This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.

View algorithm, constants and default inputs (JSON)

Formula and variables

a_j = ⌊b_j⌋; b_{j+1} = 1 ÷ (b_j − a_j); h_j = a_j h_{j−1} + h_{j−2}

x
Input decimal (b₀)
b_j
Value at step j (b₀ = x)
a_j
Continued-fraction term
h_j
Numerator convergent
k_j
Denominator convergent

Start b₀ = x with h₋₁=1, h₀=0, k₋₁=0, k₀=1 (same recurrence for k). Stop when k_j > 10⁷, remainder < 10⁻¹², or after 60 terms. Fraction = h_j/k_j; mixed form splits whole and remainder.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

Why does the decimal-to-fraction converter use continued fractions?

The continued-fraction method finds a reduced fraction within a numeric tolerance, with a denominator cap of 10,000,000. Values such as 0.375 resolve exactly to 3/8, but a finite decimal input cannot reveal an intended repeating pattern; other results may be approximations.