Fibonacci Number Generator
Generate the first N Fibonacci numbers or find the exact nth Fibonacci number. Uses BigInt for perfect precision up to very large n.
Max 78 terms for exact integer values (F(78) = 8,944,394,323,791,464)
0
1
1
2
3
5
8
13
21
34
55
89
144
233
377
610
It Started With Rabbits — and Got Stranger From There
In 1202, Leonardo of Pisa posed a puzzle in his book Liber Abaci: if a pair of rabbits produces a new pair every month starting from their second month of life, and every new pair does the same, how many pairs will there be after a year? The answer traces out the sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 — and the pattern has not stopped surprising mathematicians since. What began as a rabbit-breeding thought experiment turned out to describe spiral growth in sunflower heads, the branching of trees, the arrangement of leaves on a stem, and the shape of nautilus shells. The same arithmetic shows up in places that have nothing to do with each other, which is what makes it genuinely strange.
This free Fibonacci generator computes any term up to F(1000) using JavaScript BigInt — exact arithmetic with no floating-point rounding — and generates the full sequence up to 78 terms as interactive chips. Use it to verify textbook problems, explore the golden ratio convergence, or simply see how fast these numbers grow.
The Ratio That Explains the Spirals
Divide any Fibonacci number by the one before it: 8/5 = 1.6, 13/8 = 1.625, 21/13 ≈ 1.6154, 89/55 ≈ 1.6182. The ratios are converging on something — the Golden Ratio φ ≈ 1.61803398… By F(15), the ratio is accurate to six decimal places. Binet's formula gives a closed form: F(n) = (φⁿ − ψⁿ) / √5, where ψ = (1−√5)/2 ≈ −0.618. But for large n, this formula loses precision because φⁿ involves irrational arithmetic. That is why this generator uses the iterative approach instead — summing exact BigInt values gives perfect results even at F(1000), which has 209 digits.
The golden ratio is the reason Fibonacci spirals appear in nature. A sunflower packs seeds most efficiently when each new seed is placed at a golden-angle rotation (≈ 137.5°) from the last. The resulting spiral count in opposite directions lands on consecutive Fibonacci numbers — typically 34 and 55, or 55 and 89 in large sunflowers. Use our Scientific Calculator to compute φⁿ directly and compare it to this generator's exact BigInt results.
Divisibility Patterns Most Textbooks Skip
The Fibonacci sequence has hidden divisibility structure that most school curricula never mention. Every 3rd term is divisible by 2 (F(3)=2, F(6)=8, F(9)=34). Every 4th term is divisible by 3 (F(4)=3, F(8)=21, F(12)=144). Every 5th term is divisible by 5 (F(5)=5, F(10)=55, F(15)=610). The general rule is called the Pisano period: if p is prime, every p-th Fibonacci number is divisible by p.
There is also a GCD identity: GCD(F(m), F(n)) = F(GCD(m, n)). So GCD(F(12), F(8)) = F(GCD(12,8)) = F(4) = 3 — you can verify this directly using the LCM & GCD Calculator. And Zeckendorf's Theorem guarantees that every positive integer can be uniquely written as a sum of non-consecutive Fibonacci numbers — 100 = 89 + 8 + 3, for instance, with no two consecutive terms.
Which Fibonacci Numbers Are Also Prime?
Among the first 20 Fibonacci numbers, only F(3)=2, F(4)=3, F(5)=5, F(7)=13, F(11)=89, F(13)=233 are prime — and these are called Fibonacci primes. It is an open question whether there are infinitely many. One necessary condition: if F(n) is prime and n > 4, then n itself must be prime (though the converse is not always true). Use the Prime Number Checker alongside this generator to test which terms in your sequence are prime. All calculations here run in your browser — nothing is sent to any server.
✓Verified by ToollyX Team · Last updated June 2026