Continued Fraction Calculator

[a₀; a₁, a₂, ...]

CalculatorsFreeNo Signup
4.7(420 reviews)
All Tools

Loading tool...

About Continued Fraction Calculator

A continued fraction calculator that converts any real number into its continued fraction representation [a₀; a₁, a₂, ...]. Shows convergents (p/q rational approximations), detects periodic patterns for quadratic irrationals, and finds the best rational approximation for any denominator bound. All calculations are client-side.

Continued Fraction Calculator Features

  • CF expansion
  • Convergents
  • Best approx
  • Periodic detect
  • Custom input
Continued fractions: a₀ + 1/(a₁ + 1/(a₂ + ...)). Every rational number has a finite CF; irrationals have infinite CFs. √2 = [1; 2, 2, 2, ...] (periodic). φ = [1; 1, 1, 1, ...] (simplest irrational). Convergents pₙ/qₙ are the best rational approximations.

How to Use

Enter a number:

  • Input: Decimal or fraction
  • Output: CF coefficients + convergents

Convergents

Each convergent pₙ/qₙ is the closest rational with denominator ≤ qₙ. They alternate above/below the target. π: 3, 22/7, 333/106, 355/113...

Famous CFs

  • φ = [1; 1, 1, 1, ...] — worst approximable
  • √2 = [1; 2, 2, 2, ...]
  • e = [2; 1, 2, 1, 1, 4, 1, 1, 6, ...]
  • π = [3; 7, 15, 1, 292, ...]

Step-by-Step Instructions

  1. 1Enter a decimal number.
  2. 2View CF coefficients.
  3. 3Check convergents.
  4. 4Find best approximation.
  5. 5Explore periodic patterns.

Continued Fraction Calculator — Frequently Asked Questions

Why is 355/113 such a good approximation for π?+

In π's CF [3; 7, 15, 1, 292, ...], the large coefficient 292 means the previous convergent 355/113 is exceptionally close — accurate to 6 decimal places with a tiny denominator.

What makes φ the 'most irrational' number?+

Its CF is [1; 1, 1, 1, ...] — all 1s. Small coefficients mean slow convergence, making φ the hardest number to approximate by rationals. This connects to Fibonacci numbers.

Are periodic continued fractions special?+

Yes! A CF is eventually periodic if and only if the number is a quadratic irrational (root of ax²+bx+c=0 with integer a,b,c). All square roots have periodic CFs.

Share this tool: