Continued Fraction
Expand a number and its best rational approximations
About this calculator
The Continued Fraction Calculator expands any decimal number into its simple continued fraction [a₀; a₁, a₂, …] using the exact Euclidean algorithm on BigInt fractions — no floating-point drift. It lists every convergent p_k/q_k, the best rational approximations of the input with that denominator size, along with each convergent's decimal value and error. Finite decimals terminate exactly; longer expansions are flagged as truncated at the chosen term limit (up to 40).
How to use the Continued Fraction calculator
- Enter the values for your problem into the input fields.
- Read the result — it updates instantly as you type.
- Check the formula and the visual explanation to follow how the answer was found.
- Copy the page URL to share the exact calculation.
Common examples
- 3.14159 → [3; 7, 15, 1, 25, …], with the classic π approximations 22/7 and 355/113 as convergents
- 2.75 → [2; 1, 3], terminating exactly at the reduced fraction 11/4
- 1.41421356 (≈√2) → [1; 2, 2, 2, …], convergents 3/2, 7/5, 17/12, 41/29, 99/70
- 0.618 → [0; 1, 1, 1, …], with Fibonacci-ratio convergents 2/3, 3/5, 5/8, 8/13, 13/21
Frequently asked questions
How does the Continued Fraction calculator work?
Enter your values and the calculator applies the exact mathematical method for this problem, showing the result together with the formula it used. Everything is computed with high-precision arithmetic, so the answer you see is not limited by ordinary floating-point rounding.
When would I use the Continued Fraction calculator?
It is useful for homework and exam preparation, for checking work done by hand, and whenever a step in a larger problem needs this calculation done quickly and reliably.
How accurate are the results?
Calculations run at 30 significant digits of precision internally. Displayed values are rounded for readability, but the underlying result is far more precise than a typical hand or pocket-calculator computation.
Can I share a specific calculation with someone else?
Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same calculation for whoever clicks it.