Fibonacci Sequence Generator
NewGenerate the Fibonacci sequence up to any number of terms with exact BigInt precision, plus the golden-ratio approximation of the last two terms.
The Fibonacci sequence starts with 0 and 1 (or just 1 and 1, depending on convention), and each subsequent term is the sum of the two before it. This generator uses JavaScript's BigInt internally, so terms stay exact even for sequences long enough to exceed Number.MAX_SAFE_INTEGER — regular floating-point math would silently lose precision well before the 80th term.
Frequently Asked Questions
Why does the tool use BigInt instead of regular numbers?
Fibonacci numbers grow exponentially, and regular JavaScript numbers lose exact integer precision above Number.MAX_SAFE_INTEGER (2^53 - 1) — which the sequence exceeds by around the 79th term. Using BigInt keeps every term in the sequence exact even at the maximum 1,000-term limit.
What's the difference between the F(0)=0 and F(1)=1 starting options?
F(0)=0 starts the sequence as 0, 1, 1, 2, 3, 5... (the standard mathematical convention), while F(1)=1 skips the leading zero and starts as 1, 1, 2, 3, 5... — both are common conventions depending on the textbook or context.
What does the golden ratio approximation show?
It divides the last generated term by the second-to-last term — as the sequence grows longer, this ratio converges toward the golden ratio φ ≈ 1.6180339887, a well-known mathematical property of the Fibonacci sequence.
Is there a maximum number of terms I can generate?
Yes, the tool caps generation at 1,000 terms to keep the output readable and the computation instant — that's already far more terms than almost any practical use case needs.
Can I use this to look up a specific Fibonacci number by index?
Yes — set the number of terms to the index you want (remembering whether you started counting from F(0) or F(1)) and read the last value in the generated sequence.
Related Tools
Math Expression Evaluator
NewEvaluate mathematical expressions safely — supports arithmetic, trig, logs, sqrt, and more.
Prime Number Tools
NewCheck if a number is prime, find primes up to N, prime factorization, and nearest prime finder.
Percentage Calculator
NewCalculate percentages, percent change, and percent increase/decrease instantly.