Arithmetic & Number Theory
Fibonacci Number
The nth Fibonacci number (F₀=0, F₁=1).
Formula
Formula
Fn = Fn−1 + Fn−2
Variables
| Symbol | Definition | Type & range | Units | Role |
|---|---|---|---|---|
| n | index | integer (ℤ) | — | input |
| Fₙ | n-th Fibonacci number | computed result | — | result |
Try it yourself
Interactive calculator
Worked examples
Example 1
Givenn = 20
Result6765
Example 2
Givenn = 30
Result832040