Code tool

Continued Fraction Calculator

Enter a finite decimal, then choose the maximum terms and denominator used for the approximation.

In-browser processingNo account requiredPrivacy details ↗

Values stay in your browser; nothing is uploaded.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter a finite decimal value.
  2. Set maximum terms and denominator limits.
  3. Review the continued fraction and rational approximation.

Finite continued fractions

Expansion takes the integer part and reciprocal remainder. It stops when the remainder magnitude is below1e−14, the denominator bound is exceeded, or the smaller of64 and the floored term limit is reached. The approximation is the accepted convergent with the smallest absolute error encountered. The term list can include the term whose convergent first exceeds the denominator bound. Calculations use browser floating-point numbers, not exact symbolic arithmetic.

GOOD TO KNOW

Common questions

What does the denominator limit do?

It stops convergents whose denominator would exceed the selected bound.

Is the input sent anywhere?

No. Parsing and calculation happen locally in your browser.