Home / Math / Fibonacci Calculator
Fibonacci Calculator
Get the exact nth Fibonacci number even when it has hundreds of digits, list the first terms with their ratios, or test whether a number belongs to the sequence.
Definition and first terms
The Fibonacci sequence starts with 0 and 1, and every later term is the sum of the previous two: F(n) = F(n − 1) + F(n − 2). The first terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. This page counts from F(0) = 0, so F(10) = 55. Some books start at F(1) = 1 and F(2) = 1 and skip zero, which shifts positions only for the leading term; both conventions give the same values from F(1) onward.
Exact values come from adding big integers one step at a time, so there is no rounding. F(30) is 832,040 and F(50) is 12,586,269,025.
Golden ratio connection
The ratio of consecutive terms approaches the golden ratio, φ = (1 + √5) ÷ 2 ≈ 1.6180339887. The ratios 1, 2, 1.5, 1.667, 1.6, 1.625 oscillate around φ and close in quickly. The ratio table in list mode shows this convergence.
Binet's formula links the two exactly: F(n) = (φn − ψn) ÷ √5 with ψ = (1 − √5) ÷ 2. Because |ψ| is below 1, F(n) is the nearest integer to φn ÷ √5. Floating-point evaluation of this closed form loses exactness for large n, which is why the calculator adds integers instead.
Testing whether a number is Fibonacci
A non-negative integer x is a Fibonacci number exactly when 5x2 + 4 or 5x2 − 4 is a perfect square. This page reaches the same answer by generating terms until it meets or passes your number, then reports the position, or the two neighbouring Fibonacci numbers when there is no match.
The number 1 appears twice, as F(1) and F(2); the smaller position is reported. The number 0 is F(0). Fibonacci numbers grow exponentially, so they thin out fast: only about 30 of them lie below a million.
Useful properties and limits
- Sum rule. F(0) + F(1) + … + F(n) = F(n + 2) − 1. The calculator shows the sum so you can check this.
- Divisibility. Every third Fibonacci number is even, and F(m) divides F(n) whenever m divides n.
- Size. F(n) has roughly 0.209 × n digits, so F(2000) has more than 400 digits.
- Range. Positions up to 2000 are supported, and list mode shows at most 100 rows.
The sequence appears in counting problems such as tilings with dominoes and in some algorithm analysis. Claims about it appearing everywhere in nature are often overstated, so treat those with care.
Worked example
Find the 100th Fibonacci number. It has 21 digits, far beyond what ordinary calculators display, so the tool uses exact big-integer arithmetic.
Inputs
| What do you want? | The nth Fibonacci number |
|---|---|
| Position n (F0 = 0, F1 = 1) | 100 |
Result
Each term is the sum of the two before it, starting 0, 1, 1, 2, 3, 5.
| F100 (exact) | 354,224,848,179,261,915,075 |
|---|---|
| Number of digits | 21 |
| Sum F0 to F100 | 927,372,692,193,078,999,175 |
| F100 ÷ F99 (tends to 1.6180339887) | 1.6180339887 |
Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.
Frequently asked questions
What are the first 10 Fibonacci numbers?
Starting from zero they are 0, 1, 1, 2, 3, 5, 8, 13, 21 and 34. Each number after the first two is the sum of the previous two.
Does the sequence start at 0 or 1?
Both conventions exist. This calculator uses F(0) = 0 and F(1) = 1, which makes F(10) equal 55. After the first term the sequences agree.
How can the calculator handle such large numbers?
It adds arbitrary-precision integers, so every digit is exact. Ordinary floating-point numbers lose digits beyond about 15 or 16 significant figures.
What is the link between Fibonacci numbers and the golden ratio?
Dividing each term by the one before it gets closer and closer to 1.6180339887, the golden ratio. The error shrinks rapidly with every step.
Is zero a Fibonacci number?
Yes, zero is F(0) in the usual modern convention. Some older tables start at 1 and so omit it.
Related calculators
References and sources
- Knuth, D. E. The Art of Computer Programming, Volume 1, section 1.2.8 on Fibonacci numbers.
- Graham, R., Knuth, D. and Patashnik, O. Concrete Mathematics, chapter 6.