Fibonacci Calculator
Generate Fibonacci sequence terms and find the nth Fibonacci number.
Results
What Is the Fibonacci Sequence?
The Fibonacci sequence is a series where each number is the sum of the two preceding numbers, starting from 0 and 1 (or 1 and 1): 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144... Named after the Italian mathematician Leonardo of Pisa (known as Fibonacci), who introduced it to Western mathematics in 1202.
The Fibonacci Recurrence
F(0) = 0, F(1) = 1, F(n) = F(n−1) + F(n−2) for n ≥ 2. Alternatively starting from 1,1: F(1)=1, F(2)=1, F(n)=F(n−1)+F(n−2).
The Golden Ratio
As the Fibonacci sequence progresses, the ratio of consecutive terms converges to φ (phi) = (1+√5)/2 ≈ 1.61803398... the golden ratio. F(n+1)/F(n) → φ as n → ∞. The golden ratio appears in architecture, art, and nature.
Binet's Formula
The nth Fibonacci number can be calculated directly: F(n) = (φⁿ − ψⁿ)/√5, where φ = (1+√5)/2 and ψ = (1−√5)/2. This closed-form formula bypasses the need for iteration.
Fibonacci in Nature
The number of petals on flowers, spiral arrangements of seeds in sunflowers, branching in trees, and the arrangement of scales on pineapples and pinecones all follow Fibonacci numbers. The spirals in nautilus shells reflect the golden ratio.
Fibonacci Numbers and the Golden Ratio
| n | F(n) | F(n)/F(n−1) |
|---|---|---|
| 5 | 5 | 5/3 = 1.6667 |
| 8 | 21 | 21/13 = 1.6154 |
| 10 | 55 | 55/34 = 1.6176 |
| 15 | 610 | 610/377 = 1.6181 |
| 20 | 6765 | 6765/4181 ≈ 1.61803 |
The ratio converges to φ = 1.61803398... remarkably quickly. By the 20th term the ratio is accurate to 5 decimal places. This convergence is why Fibonacci numbers appear wherever nature optimizes growth patterns through self-similar structures.
Fibonacci Identities
Several elegant mathematical properties hold. Cassini's identity: F(n−1)×F(n+1) − F(n)² = (−1)ⁿ. This means adjacent Fibonacci products always differ by exactly 1. The sum of the first n Fibonacci numbers equals F(n+2) − 1. For example, 1+1+2+3+5+8+13 = 33 = F(9) − 1 = 34 − 1.
Frequently Asked Questions
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89... Each term is the sum of the two before it. F(n) = F(n-1) + F(n-2).
F(10) = 55 (starting from F(1)=1, F(2)=1): 1,1,2,3,5,8,13,21,34,55.
φ ≈ 1.61803. The ratio of consecutive Fibonacci numbers converges to φ. It appears throughout nature, art, and architecture.
The sequence was known in India by mathematicians Pingala and Virahanka centuries before Fibonacci. Fibonacci introduced it to Western Europe in his 1202 book Liber Abaci.
Fibonacci spirals emerge from efficient packing — seeds, leaves, and scales arrange themselves to maximize exposure to sun/space, which naturally follows Fibonacci growth patterns.
Fibonacci numbers appear in algorithm analysis (time complexity of naive recursive Fibonacci is O(φⁿ)), Fibonacci heaps (a data structure used in Dijkstra's algorithm), and Fibonacci search — a variant of binary search using Fibonacci numbers to split the search range. Fibonacci hashing is also used in some hash table implementations.
Fibonacci retracements are a popular technical analysis tool. Traders draw horizontal lines at key Fibonacci ratios — 23.6%, 38.2%, 50%, 61.8%, 78.6% — between a significant high and low to identify potential support and resistance levels. These ratios derive from the golden ratio and its reciprocals. While widely used, their predictive value is debated among analysts.