Continued Fraction Converter — Decimals & Fractions to [a₀; a₁, a₂, …] with Convergents

Turn any decimal or fraction a/b into its continued fraction [a₀; a₁, a₂, …] and list the convergents — the successive best rational approximations p/q, each with its decimal value and error. Live in your browser, exact for fractions, with copy.

Converter Number Systems Updated Jun 21, 2026
How to Use
  1. Type a decimal (e.g. 3.14159265) or a fraction in the form a/b (e.g. 415/93).
  2. Set the maximum number of terms to control how far the expansion runs.
  3. Read the bracket notation [a₀; a₁, a₂, …] and the term list straight away.
  4. Use the convergents table to pick a best rational approximation, then copy any value.
Continued fraction

What a continued fraction tells you

A continued fraction rewrites a number as a whole part plus a fraction whose denominator is itself a whole part plus a fraction, nested as far as you like: a₀ + 1/(a₁ + 1/(a₂ + …)). The whole-number parts are listed in bracket notation [a₀; a₁, a₂, …] — a semicolon after the integer part, commas after that. This is the natural “DNA” of a number: it terminates exactly when the number is rational (a fraction), and famous irrationals fall into clean patterns — the golden ratio is [1; 1, 1, 1, …] and √2 = [1; 2, 2, 2, …]. Everything here runs in your browser; nothing is uploaded.

How it is computed — and what convergents are

The expansion uses the Euclidean method: take the floor a₀ = ⌊x⌋, subtract it, invert the remainder (x ← 1/(x − a₀)) and repeat, stopping when a term is a whole number or the term limit is hit. For an exact fraction a/b this is just the integer Euclidean algorithm, so it terminates precisely — 415/93 = [4; 2, 6, 7]. Truncating the list early gives a convergent p/q, built up with the recurrence pₙ = aₙ·pₙ₋₁ + pₙ₋₂ and qₙ = aₙ·qₙ₋₁ + qₙ₋₂. Convergents are the best rational approximations for their denominator size: the convergents of π are 3, 22/7, 333/106, 355/113 — each closer than any simpler fraction. The table shows every convergent with its decimal value and the signed error against your input.

Quick reference

Bracket notation
[a₀; a₁, a₂, …] = a₀ + 1/(a₁ + 1/(a₂ + …))
Next term
aᵢ = ⌊x⌋, then x ← 1/(x − aᵢ)
Convergent p
pₙ = aₙ·pₙ₋₁ + pₙ₋₂
Convergent q
qₙ = aₙ·qₙ₋₁ + qₙ₋₂
415/93
= [4; 2, 6, 7] · convergents 4/1, 9/2, 58/13, 415/93
π ≈ 3.14159265
= [3; 7, 15, 1, …] · 22/7, 333/106, 355/113
√2 ≈ 1.41421356
= [1; 2, 2, 2, …]
Golden ratio φ
= [1; 1, 1, 1, …]

About the Continued Fraction Converter — Decimals & Fractions to [a₀; a₁, a₂, …] with Convergents

The Continued Fraction Converter — Decimals & Fractions to [a₀; a₁, a₂, …] with Convergents gives you a fast, free answer for everyday tasks without sending anything off your device. Turn any decimal or fraction a/b into its continued fraction [a₀; a₁, a₂, …] and list the convergents — the successive best rational approximations p/q, each with its decimal value and error. Live in your browser, exact for fractions, with copy.

How it works

Type a value, then pick what you want to change it into. The answer appears straight away. It all happens on your own device, so it is fast and nothing you type is sent away. Just check that you picked the right “from” and “to” so you get the answer you wanted.

Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.

Frequently Asked Questions

What is a continued fraction?

A continued fraction writes a number as a₀ + 1/(a₁ + 1/(a₂ + 1/(a₃ + …))). The whole-number parts a₀, a₁, a₂, … are written compactly as [a₀; a₁, a₂, …], with a semicolon after the integer part and commas between the rest. Every real number has such an expansion; it terminates exactly when the number is rational.

What are convergents and why are they useful?

A convergent is the fraction p/q you get by stopping the continued fraction after a few terms. Convergents are the best rational approximations of a number for their size of denominator — no fraction with a smaller or equal denominator gets closer. That is why 22/7 and 355/113 (convergents of π) are the famous easy-to-remember approximations.

Is the result exact for a fraction like 415/93?

Yes. When you enter an exact fraction a/b the expansion uses the integer Euclidean algorithm, so it terminates exactly: 415/93 = [4; 2, 6, 7] and the final convergent is 415/93 itself. For a decimal the expansion uses floating-point and stops once a term is (nearly) an integer or the term limit is reached.

Why does my decimal not match the “true” continued fraction?

A decimal like 3.14159265 is only an approximation of π, so after a few correct terms the expansion drifts. The early terms ([3; 7, 15, 1, …] for π) are reliable; later terms reflect rounding in the digits you typed. Enter more digits, or an exact fraction, for a longer correct expansion.

Is anything uploaded?

No. The whole calculation runs in your browser with JavaScript — nothing is sent to a server.

How do I use the Continued Fraction Converter — Decimals & Fractions to [a₀; a₁, a₂, …] with Convergents?

Just type or paste your value. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Does it cost anything or need an account?

No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.

Is anything I type uploaded?

No. The tool works entirely on your device, so the values you enter never leave your browser.

Common Use Cases

Best rational approximations

Find the simplest fraction p/q close to a decimal — gear ratios, calendar cycles, π ≈ 355/113 — with the exact error shown.

Number theory & teaching

See the Euclidean algorithm in action and explore why golden ratio = [1; 1, 1, …] and √2 = [1; 2, 2, 2, …].

Engineering & timing

Approximate an awkward frequency or pixel ratio by a small whole-number fraction your hardware can actually produce.

Simplifying & checking fractions

Expand an exact a/b to confirm its lowest-terms form and the chain of convergents leading up to it.

Last updated: