Fibonacci Calculator
Generate the Fibonacci sequence up to any number of terms instantly.
Use a whole number from 0 to 500. This calculator uses F(0) = 0 and F(1) = 1.
nth Fibonacci number
F(15) = 610
Exact Fibonacci value for the selected position.
Position
15
The n in F(n).
Digits
3
Length of the exact value.
Previous value
F(14) = 377
Previous term in the sequence.
Next value
F(16) = 987
Next term in the sequence.
Golden ratio approximation
φ ≈ 1.618037135
F(n) ÷ F(n − 1).
Formula used
F(n) = F(n−1) + F(n−2)
With F(0)=0 and F(1)=1.
Sequence preview
Fibonacci Formula
Recurrence relation
F(n) = F(n−1) + F(n−2)
Starting value
F(0) = 0
Second value
F(1) = 1
Golden ratio approximation
φ ≈ F(n) ÷ F(n−1)
Next term
Next = previous + current
Example
F(6) = F(5) + F(4) = 5 + 3 = 8
Variable Explanations
n
The position or index in the Fibonacci sequence.
F(n)
The Fibonacci number at position n.
F(n−1)
The previous Fibonacci number.
F(n−2)
The Fibonacci number two positions before n.
φ
The golden ratio, approximately 1.618.
BigInt
A JavaScript integer type used for exact large whole numbers.
How the Fibonacci Sequence Works
Worked Examples
Find F(5)
Formula: F(n) = F(n − 1) + F(n − 2)
Substitution: F(5) = F(4) + F(3) = 3 + 2
Answer: 5
The 5th Fibonacci number is 5 when using F(0) = 0.
Find F(10)
Formula: Add the two previous terms
Substitution: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55
Answer: 55
F(10) is the value at index 10.
Find the next term after 21 and 34
Formula: Next = previous + current
Substitution: 21 + 34
Answer: 55
Each new term depends on the previous two.
Golden ratio approximation
Formula: φ ≈ F(n) ÷ F(n − 1)
Substitution: F(20) ÷ F(19) = 6765 ÷ 4181
Answer: ≈ 1.618034
The approximation improves as n increases.
Recursive definition
Formula: F(0) = 0, F(1) = 1
Substitution: F(2) = 1 + 0
Answer: 1
The base values start the sequence.
Counting steps
Formula: Ways(n) = Ways(n − 1) + Ways(n − 2)
Substitution: Ways(5) = 5 + 3
Answer: 8
Fibonacci-style patterns appear in step-counting problems.
Golden Ratio and Fibonacci Numbers
Golden ratio
φ is approximately 1.618.
Ratio pattern
F(n) ÷ F(n−1) approaches φ as n grows.
Not exact early
Small Fibonacci ratios can be far from φ.
Nature examples
Some natural spirals and growth patterns resemble Fibonacci patterns.
Design use
The golden ratio is sometimes used in design and layout discussions.
Careful claim
Not every spiral or natural pattern is exactly Fibonacci.
Common Fibonacci Mistakes
Understanding Your Result
F(n)
The Fibonacci value at your selected position.
Previous value
The term immediately before F(n).
Next value
The term immediately after F(n).
Digit count
How many digits the exact Fibonacci number has.
Sequence preview
A readable list of terms near or up to your selected position.
Golden ratio
A ratio comparison between neighboring Fibonacci values.
Frequently Asked Questions
Related tools