Fibonacci Calculator — Free Fibonacci Number & Sequence Generator 2026 | AllInOneTools
🐚 Free Calculator

Fibonacci Calculator

Find any Fibonacci number up to F(1000), generate sequences, visualize the golden spiral, and explore the golden ratio.

Fibonacci Generator
🔢
INPUT
Position n (0–1000)
INTEGER
n
💡
RESULT
F(n) Value
F(n)
F(n) = F(n−1) + F(n−2), F(0)=0, F(1)=1
Fibonacci Number
--
Fibonacci Sequence (first terms)
Position
--
F(n)
--
Digits
--
φ Ratio
--
Parity
--
Σ F(0..n)
--
Fibonacci Reference Table
F(n)ValueDigits
💡 Fibonacci Insight

Fibonacci Numbers: Complete Guide to the Sequence, Golden Ratio, and Applications in Mathematics and Nature

The Fibonacci sequence is one of the most famous number sequences in all of mathematics. Defined by the simple recurrence F(n) = F(n−1) + F(n−2) with initial values F(0) = 0 and F(1) = 1, it produces the series 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and so on. Despite its elementary definition, the Fibonacci sequence appears in remarkably diverse contexts: from flower petal counts and pinecone spirals to stock market analysis, computer algorithms, and the geometry of galaxies.

The Recurrence Relation

Each Fibonacci number is the sum of its two predecessors: F(n) = F(n−1) + F(n−2). Starting from F(0) = 0 and F(1) = 1, the sequence unfolds mechanically. There is also Binet's closed-form formula: F(n) = (φⁿ − ψⁿ) / √5, where φ = (1+√5)/2 ≈ 1.618 is the golden ratio and ψ = (1−√5)/2 ≈ −0.618 is its conjugate. Since |ψ| < 1, the ψⁿ term vanishes for large n, making F(n) ≈ φⁿ/√5. This means Fibonacci numbers grow approximately exponentially at the rate of the golden ratio.

Recurrence: F(n) = F(n−1) + F(n−2)
Base cases: F(0) = 0, F(1) = 1

Binet's Formula: F(n) = (φⁿ − ψⁿ) / √5
φ = (1+√5)/2 ≈ 1.6180339887...
ψ = (1−√5)/2 ≈ −0.6180339887...

Growth: F(n) ≈ φⁿ / √5 for large n
Digits of F(n) ≈ n × log₁₀(φ) ≈ n × 0.209

The Golden Ratio (φ)

The golden ratio φ = (1+√5)/2 = 1.6180339887... is intimately connected to Fibonacci numbers. The ratio of consecutive Fibonacci numbers F(n)/F(n−1) converges to φ as n increases. By F(10)/F(9) = 55/34 = 1.6176..., the approximation is already excellent. The golden ratio appears throughout mathematics, art, and architecture. A golden rectangle has sides in the ratio 1:φ, and when you remove a square from it, the remaining rectangle is also golden — this self-similar property generates the golden spiral that appears in nautilus shells, hurricanes, and spiral galaxies.

Fibonacci in Nature

Fibonacci numbers appear with remarkable frequency in biological settings. The number of petals on many flowers follows the sequence: lilies have 3, buttercups 5, delphiniums 8, marigolds 13, daisies often 21, 34, or 55. Sunflower seed heads display 34 clockwise and 55 counterclockwise spirals (consecutive Fibonacci numbers). Pinecones show 8 and 13 spirals. Pineapple scales arrange in 8, 13, and 21 spirals. Leaf arrangements (phyllotaxis) follow Fibonacci patterns to maximize sunlight exposure. This phenomenon arises because growth governed by the golden angle (approximately 137.5°) naturally produces Fibonacci-numbered spirals.

Applications in Computer Science

Fibonacci numbers play important roles in algorithms and data structures. Fibonacci heaps achieve optimal amortized time complexity for priority queue operations. The Euclidean algorithm for GCD has its worst case when inputs are consecutive Fibonacci numbers. Fibonacci search is a comparison-based technique related to binary search. Fibonacci coding is a universal code used in data compression. The Zeckendorf representation shows every positive integer can be uniquely represented as a sum of non-consecutive Fibonacci numbers. Dynamic programming textbooks often use Fibonacci computation as a canonical example of memoization and bottom-up computation.

Fibonacci in Finance

Financial traders use Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) to identify potential support and resistance levels in price charts. The key ratio 61.8% is the inverse of the golden ratio (1/φ = 0.618...), and 38.2% is 1 − 0.618. Fibonacci extensions project potential price targets beyond the current range. While the mathematical basis for these tools in market prediction is debated among economists, they remain widely used in technical analysis because self-fulfilling prophecy effects occur when many traders act on the same levels.

Properties and Identities

Fibonacci numbers have numerous elegant properties. The sum of the first n Fibonacci numbers equals F(n+2) − 1. Every third Fibonacci number is even (divisible by 2), every fourth by 3, every fifth by 5 — in general, F(k) divides F(nk) for all positive integers k and n. The GCD of F(m) and F(n) equals F(GCD(m,n)). The Cassini identity states F(n−1)·F(n+1) − F(n)² = (−1)ⁿ. The digit count of F(n) is approximately n × 0.209, so F(100) has 21 digits, F(1000) has 209 digits, and F(10000) would have about 2090 digits.

Fibonacci Generalizations

The Fibonacci concept extends in many directions. The Lucas numbers use the same recurrence but start with L(0)=2, L(1)=1, producing 2, 1, 3, 4, 7, 11, 18, 29, 47... The Tribonacci numbers sum three predecessors instead of two. The negative Fibonacci numbers extend the sequence to negative indices using F(−n) = (−1)ⁿ⁺¹ F(n). Fibonacci primes are Fibonacci numbers that are also prime: F(3)=2, F(4)=3, F(5)=5, F(7)=13, F(11)=89, F(13)=233, and so on — it is unknown whether infinitely many exist. The Pisano period π(m) is the period of Fibonacci numbers modulo m, which has applications in cryptography and number theory. These generalizations demonstrate how the simple Fibonacci recurrence connects to deep mathematical structures.

Historical Background

The sequence is named after Leonardo of Pisa (c. 1170–1250), known as Fibonacci, who introduced it to Western mathematics in his 1202 book Liber Abaci through the famous rabbit population problem. However, the sequence was described centuries earlier by Indian mathematicians Virahanka (c. 700 CE) and Hemachandra (c. 1150 CE) in the context of Sanskrit prosody and poetic meter patterns. Fibonacci himself was instrumental in popularizing the Hindu-Arabic numeral system in Europe, which is arguably an even greater contribution than the sequence bearing his name.

How to Use This Calculator

Enter a position n (0 to 1000). The calculator computes F(n) using BigInt arithmetic for exact results even for very large numbers. The golden spiral canvas visualizes the Fibonacci square tiling with a logarithmic spiral overlay. The sequence section shows the first 20 terms (or up to n). Properties display the value, digit count, parity, golden ratio approximation, previous and next Fibonacci numbers. The step-by-step section shows the recurrence computation. The reference table lists common Fibonacci numbers with your input highlighted.

Math Tip
Fibonacci numbers grow exponentially: F(n) ≈ φⁿ/√5. F(100) already has 21 digits, F(500) has 105 digits, and F(1000) has 209 digits. Our calculator uses JavaScript BigInt for exact computation up to F(1000). For Binet's formula with floating-point arithmetic, precision is lost for large n — the iterative method used here is exact.

Frequently Asked Questions

What is the Fibonacci sequence?
0, 1, 1, 2, 3, 5, 8, 13, 21, 34... Each number is the sum of the two before it.
What is the 10th Fibonacci number?
F(10) = 55. The sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55.
What is the golden ratio?
φ = (1+√5)/2 ≈ 1.618. Consecutive Fibonacci ratios converge to φ.
How many digits does F(100) have?
F(100) has 21 digits: 354224848179261915075.
Is 0 a Fibonacci number?
Yes. F(0) = 0 is the first term of the sequence.