Continued Fraction Visualizer

Every real number has a unique continued fraction expansion — rationals terminate, irrationals continue forever

Enter a Number


[3; 7, 15, 1, 292, 1, 1, 1, 2, ...]

Convergents (Best Rational Approximations)

naₙpₙ/qₙError

Stern-Brocot Tree Path

Approximation Quality

Continued Fractions

Every real number x has a unique expansion: x = a₀ + 1/(a₁ + 1/(a₂ + ...)) written [a₀; a₁, a₂, ...]

Rationals terminate. Quadratic irrationals (like φ, √2) are eventually periodic. Transcendentals like π, e have irregular patterns.

Golden ratio φ = [1;1,1,1,...] — all ones, hardest number to approximate rationally (slowest convergents).

π ≈ 355/113 — the convergent [3;7,15,1] is accurate to 7 decimal places. The next partial quotient 292 means this is an especially good approximation.

The Stern-Brocot tree contains every rational exactly once. The path to any rational is encoded in its continued fraction.