Continued Fraction Convergents Calculator
Enter the continued-fraction terms to list its convergents.
Result
How it is calculated
Enter the terms a0, a1, a2, … separated by commas, spaces or semicolons, where [a0; a1, a2, …] means a0 + 1/(a1 + 1/(a2 + …)). Each term is rounded to a whole number; a0 may be any integer, but every later term must be 1 or more. The convergent after each term comes from the recurrence
hn = an·hn−1 + hn−2kn = an·kn−1 + kn−2
started with h−1 = 1, h−2 = 0 and k−1 = 0, k−2 = 1. The convergent is hn/kn. The tool lists every convergent with its decimal value (six decimals) and finishes with the last one to eight decimals. A text that is not a number, a later term below 1, or a numerator or denominator that would pass 64 bits (19 digits) makes the entry invalid and the tool returns no result. The fractions are not reduced beyond this recurrence.
Worked example
Terms 3, 7, 15, 1 (the start of the expansion of π). Step 0: h = 3, k = 1, so 3/1. Step 1: h = 7×3 + 1 = 22, k = 7×1 + 0 = 7, so 22/7. Step 2: h = 15×22 + 3 = 333, k = 15×7 + 1 = 106, so 333/106. Step 3: h = 1×333 + 22 = 355, k = 1×106 + 7 = 113, giving 355/113. Its decimal value is 3.14159292, close to π (3.14159265) to about seven digits.
Common mistakes
- Typing a decimal number such as 3.14159 instead of its terms. This tool does not expand a decimal into terms; you must supply the integers yourself, for example 3, 7, 15, 1.
- Entering a fractional term, like 1.5. It is rounded to 2, so the convergents belong to a different continued fraction than you meant.
- Entering a zero or negative term after the first. Every term after
a0must be a whole number of 1 or more, so 0, 0 or -3, 2, -5 returns no result. - Copying the textbook notation with brackets, like [3; 7, 15]. The brackets are not numbers, so the entry is rejected; type just 3, 7, 15.
- Reading the last convergent as exact. It is only the approximation from the terms you gave; a longer list gives a closer fraction.
About this calculator
A continued fraction [a₀; a₁, a₂, a₃, …] represents a number as a nested sequence of integer terms, and its convergents are the successive fractions obtained by truncating that sequence at each step — each one the best possible rational approximation of the target value for its denominator size. Convergents are computed with the recurrence h_n = a_n·h_{n−1} + h_{n−2} and k_n = a_n·k_{n−1} + k_{n−2}, giving the convergent as h_n/k_n.
Mathematicians and number theorists use continued fraction convergents to find compact rational approximations of irrational constants like π or √2, and the same technique shows up in practical engineering problems such as choosing gear-tooth counts or musical tuning ratios that closely approximate an irrational target with small whole numbers.
Was this helpful?
You can pick up to 3 reactions.
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
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The tool takes the terms of a continued fraction, not a decimal, so to approximate a number you first need its expansion. A very large term is a useful clue: the convergent just before it is an unusually good fit, which is why 355/113 is so close to pi, right before the 292. Keep the list to a modest length, because once a numerator or denominator passes 19 digits the tool returns no result. What number are you approximating?