About this tool
What Is the Fibonacci Sequence?
The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting from 0 and 1: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377... This pattern was described by Leonardo of Pisa (Fibonacci) in 1202 in his book Liber Abaci.
Formula: F(n) = F(n-1) + F(n-2) where F(0) = 0 and F(1) = 1.
Fibonacci Numbers & the Golden Ratio
| N | F(N) | F(N)/F(N-1) | Converges to φ |
|---|---|---|---|
| 2 | 1 | 1.000000 | — |
| 5 | 5 | 1.666667 | — |
| 10 | 55 | 1.618182 | Close |
| 15 | 610 | 1.618033 | Very close |
| 20 | 6765 | 1.618034 | ≈ φ |
| 30 | 832040 | 1.618034 | = φ (8 decimals) |
The golden ratio (φ = 1.6180339887...) appears throughout nature, art, and architecture.
Fibonacci in Nature and Finance
- Nature: Sunflower seed spirals, pinecone scales, flower petals (lilies have 3, buttercups 5, daisies 34 or 55)
- : The Parthenon, Pyramids of Giza, and many Renaissance buildings use golden ratio proportions
- Finance: Fibonacci retracement levels (23.6%, 38.2%, 61.8%) are used in technical analysis for stock trading
- Computer Science: Fibonacci heaps, algorithm analysis, and memoization teaching examples
- Music: Fibonacci proportions appear in compositions by Bartók, Debussy, and in the layout of piano keys (13 per octave, 8 white, 5 black)
Practical Usage Examples
10th Fibonacci
F(10) = 55
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 Step-by-Step Instructions
Step 1: Enter Position (N). Input which Fibonacci number you want (e.g., N=10 gives F(10) = 55). Maximum N is 1476.
Step 2: Set Sequence Length. Choose how many numbers to display in the sequence preview (1-50).
Step 3: View Results. See the Fibonacci number F(N), sequence preview, golden ratio estimate (F(N)/F(N-1)), and the formula used.
Step 4: Explore. Try large values (100, 500, 1000) to see how quickly Fibonacci numbers grow.
Core Benefits
Any Position Up to F(1476): Calculates Fibonacci numbers up to the maximum JavaScript Number precision. Beyond F(1476), values exceed the representable range.
Sequence Preview: Shows the full sequence for small N or the last numbers for large N, giving context to each result.
Golden Ratio Estimation: Computes F(N)/F(N-1) which converges to φ ≈ 1.6180339887 as N increases. Already accurate to 8 decimal places by N=20.
Iterative Algorithm: Uses efficient O(n) iterative computation instead of recursive (which is O(2^n)). Handles large N instantly.
Frequently Asked Questions
The Fibonacci sequence starts with 0 and 1, and each subsequent number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377. It was described by Leonardo of Pisa (Fibonacci) in 1202.
The golden ratio (phi, φ) is approximately 1.6180339887. It is the limit that the ratio of consecutive Fibonacci numbers F(n+1)/F(n) approaches as n increases. It appears naturally in geometry, art, architecture, and biology.
This calculator handles up to F(1476). Beyond that, JavaScript standard Number type reaches Infinity. F(1476) has over 300 digits. For even larger values, you would need BigInt or arbitrary-precision libraries.
Traders use Fibonacci retracement levels — 23.6%, 38.2%, 50%, 61.8%, and 78.6% — to identify potential support and resistance levels. These percentages are derived from ratios between Fibonacci numbers. They are drawn between price highs and lows on charts.
Fibonacci numbers appear in sunflower seed spirals (usually 34 and 55), pinecone scales, flower petal counts (lilies: 3, buttercups: 5, daisies: 34 or 55), nautilus shell chambers, and branching patterns in trees and blood vessels.
The recursive formula is F(n) = F(n-1) + F(n-2). The closed-form formula (Binet) is F(n) = (φ^n - ψ^n) // √5, where φ = (1+√5)/2 and ψ = (1-√5)/2. However, floating-point precision limits make the iterative approach more reliable for exact computation.
Recursive Fibonacci calls itself twice per number (exponential time O(2^n)). Iterative Fibonacci uses a simple loop (linear time O(n)). For F(40), recursive takes millions of operations while iterative takes 40. This calculator uses the iterative approach.
Fibonacci numbers grow exponentially at a rate of approximately φ ≈ 1.618 per step. F(10) = 55, F(20) = 6,765, F(50) = 12,586,269,025, F(100) = 354,224,848,179,261,915,075. Each number is roughly 1.618 times the previous.
A Fibonacci spiral is created by drawing quarter-circle arcs in squares whose side lengths follow the Fibonacci sequence. It approximates the golden spiral (logarithmic spiral with growth factor φ) and appears in nautilus shells, hurricanes, and galaxies.
No. All calculations run in your browser using JavaScript. No data is transmitted to any server.