Skip to main content

Continued Fraction Calculator – Decimal to Fraction

Quick answer

Expand decimals as continued fractions: 5/8 = [0;1,1,1,2] and √2 = [1;2,2,2,…].

  • Convergents 0, 1/2, 2/3, 5/8 approach the value.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How the Continued Fraction Calculator Works

x = a₀ + 1/(a₁ + 1/(a₂ + …)) = [a₀; a₁, a₂, …]

A continued fraction peels off the integer part, inverts the remainder, and repeats. For 5/8 = 0.625: integer part 0, invert 8/5 = 1.6 → a₁ = 1, remainder 3/5 → invert 5/3 → a₂ = 1, remainder 2/3 → invert 3/2 → a₃ = 1, remainder 1/2 → a₄ = 2. So 5/8 = [0; 1, 1, 1, 2]. Truncating the expansion gives convergents — best-possible rational approximations at each size: [0;1] = 1, [0;1,1] = 1/2, [0;1,1,1] = 2/3, and the full value 5/8. Irrationals yield infinite patterns: √2 = [1; 2, 2, 2, …] with convergents 1, 3/2, 7/5, 17/12 (17/12 ≈ 1.41667), and the golden ratio is [1; 1, 1, …] forever — worst-case for rational approximation. The calculator computes coefficients from any decimal or fraction and tabulates convergents with their errors.

  1. 1

    Enter a decimal or fraction

    e.g. 0.625 or 5/8

  2. 2

    Peel and invert

    Integer parts a₀, a₁, … are extracted step by step

  3. 3

    Build the convergents

    Each truncation [a₀;…aₖ] becomes a fraction

  4. 4

    Watch errors shrink

    Convergent errors drop faster than any comparable denominator

Use Cases

Rational Reconstruction

0.625 → exactly 5/8 via [0;1,1,1,2]

Calendar Design

Leap-year approximations 97/400 come from π-like convergent tuning

Number Theory

Explore √2 = [1;2,2,…] and φ = [1;1,1,…] patterns

Tips

  • 1

    Convergents are the best rational approximations by denominator size

  • 2

    Terminating decimals give terminating expansions; irrationals never do

  • 3

    The golden ratio converges slowest of all — all coefficients are 1

Common Mistakes

  • Forgetting the leading integer part a₀ in the bracket notation

  • Stopping the peel before the remainder hits exactly zero for rationals

  • Reading convergents as exact values; 2/3 ≈ 0.6667 ≠ 0.625

  • Confusing simple with generalized (non-unit numerators) continued fractions

FAQs

What is the continued fraction of 5/8?

[0; 1, 1, 1, 2] — convergents 0, 1, 1/2, 2/3, then 5/8 exactly.

What is √2 as a continued fraction?

[1; 2, 2, 2, …] repeating forever; convergents 1, 3/2, 7/5, 17/12 approach 1.41421.

What are convergents?

The fractions obtained by truncating the expansion — each is the closest rational with a denominator that small.

Which number is hardest to approximate?

The golden ratio [1;1,1,1,…] — its convergents converge slowest.

Why use continued fractions for decimals?

0.625 immediately reveals itself as 5/8 — exact recovery without guesswork.