Continued Fraction Expansion Calculator
Enter a number and term count to see its continued fraction expansion.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
A continued fraction represents a real number as a nested sequence a₀ + 1/(a₁ + 1/(a₂ + 1/(a₃ + ...))), written compactly as [a₀; a₁, a₂, a₃, ...]. It's computed by repeatedly taking the integer part of the number, then continuing the expansion on the reciprocal of the remaining fractional part — a process closely related to the Euclidean algorithm for finding a greatest common divisor.
Continued fractions are prized in number theory, cryptography, and numerical analysis because truncating the expansion early produces the best possible rational approximation of a number for a given denominator size — this is how ancient and modern mathematicians derived accurate fractions for π (like 355/113) and how continued fractions play a role in Diophantine equation solving and certain integer-factorization and lattice-based cryptographic attacks.
This calculator expands a real number you enter into its continued fraction terms up to a chosen count, and also shows the resulting rational convergent — useful for math students, number theory enthusiasts, and programmers implementing rational approximation algorithms.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)