Maths & numbers

Rational continued fraction calculator

Expand a rational number into a finite simple continued fraction and inspect every convergent.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your numbers and select Calculate.

Behind the numbers

How this calculation works

Each Euclidean quotient becomes a coefficient. Truncating after any coefficient creates a convergent with a numerator and denominator built by a two-term recurrence. The last convergent is the exact reduced input.

THE FORMULAa₀=floor(n/d); repeat the Euclidean algorithm on successive remainders

A worked example

415/93 has the finite expansion [4; 2, 6, 7]. Its convergents are 4/1, 9/2, 58/13 and 415/93.

Good to know

The input is a rational number with nonzero positive denominator and bounded whole numerator. This finite expansion does not compute the infinite continued fraction of an irrational constant.

Euclidean quotients become coefficients

For 415/93, divide 415 by 93 to get quotient 4 and remainder 43. Divide 93 by 43 to get 2 and remainder 7, then 43 by 7 to get 6 and remainder 1, and finally 7 by 1 to get 7. These quotients form [4; 2, 6, 7].

The successive convergents are 4/1, 9/2, 58/13 and 415/93. Each row is a rational approximation formed from the coefficients seen so far. The final row is exact because the Euclidean algorithm terminates for rational input.

The repeating decimal to fraction calculator first recovers a rational from its stated digit pattern; this page then expands a known rational.

Read approximation and exactness separately

A fraction calculator can simplify ordinary numerator-denominator arithmetic. This page exposes a sequence of approximants and the division process that produces them. That is useful when you want a simpler early fraction as well as the exact final one.

A repeating decimal to fraction calculator begins with decimal digits and recovers one rational value. Continued fractions start with an already specified rational and organize its nested division structure.

Signs and conventions need care

For negative rational inputs, the first coefficient uses the mathematical floor, not truncation toward zero. This keeps later coefficients positive and the convergents consistent. The denominator must be positive to make that convention straightforward.

A rational input has a finite expansion. This page does not claim to enumerate the infinite continued fraction of π or another irrational number, nor does a decimal approximation prove a number is irrational.

A few questions, answered

Why does the last convergent equal my input?

The Euclidean remainder eventually reaches zero, so the finite expansion reconstructs the exact reduced rational.

Can two fractions represent the same result?

Yes. Inputs such as 10/4 and 5/2 reduce to the same rational and expansion.

Does every intermediate convergent equal the input?

No. Earlier rows are simpler approximations; only the last is guaranteed exact for this finite input.

Find your calculator

Start typing to explore the library.