Continued Fractions & Stern-Brocot Tree

Every real number has a unique continued fraction expansion. The Stern-Brocot tree encodes all rational approximations — navigate left/right to find the best approximation to any target.

Find Rational Approximation

Enter a number and click Compute
naₙpₙ/qₙerror