Find any Fibonacci number instantly — enter n and get F(n) exactly with big-number arithmetic, plus the digit count, the sequence, and the golden-ratio convergence. Free, fast, and mobile-friendly.
Home » Math Calculators » Fibonacci Calculator
The Fibonacci sequence starts 0, 1, 1, 2, 3, 5, 8, 13, …, where every term is the sum of the two before it. It is the most famous sequence in mathematics — simple enough for a child to continue, yet deep enough to connect with the golden ratio, plant growth, and efficient algorithms. Our free Fibonacci Calculator finds F(n) exactly for any n up to 5000 using big-number arithmetic, and shows the digit count, the opening of the sequence, and how the ratio of consecutive terms homes in on φ.
The sequence was introduced to Europe by Leonardo of Pisa (Fibonacci) in 1202 through a thought experiment about breeding rabbits: starting with one pair, each mature pair produces a new pair every month, and the population month by month runs 1, 1, 2, 3, 5, 8, …. Eight centuries later the same numbers turn up in sunflower spirals, pinecones, stock-market retracements, and the analysis of the Euclidean algorithm.
Naive recursive computation of F(n) takes exponentially long — F(50) would need trillions of calls — but the simple iterative loop this calculator uses needs only n additions. With arbitrary-precision integers there is no overflow: F(5000) comes out as all 1045 digits, exact. Whether you are exploring patterns, checking homework, or feeding exact values into another computation, you get the true integer every time.
The sequence is defined by F(0) = 0, F(1) = 1, and F(n) = F(n−1) + F(n−2) for n ≥ 2. The first terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …. That is the entire definition — two starting values and one rule — yet it generates behavior mathematicians are still studying, including unsolved questions about which Fibonacci numbers are prime.
The most celebrated property is the link to the golden ratio φ = (1 + √5)/2 ≈ 1.6180339887. The ratio of consecutive Fibonacci numbers, F(n+1)/F(n), converges to φ as n grows: 8/5 = 1.6, 13/8 = 1.625, 21/13 ≈ 1.6154, 89/55 ≈ 1.61818. By F(20) the ratio already matches φ to six decimal places. The calculator displays this ratio so you can watch the convergence yourself.
Binet’s formula gives a closed form with no recurrence at all: F(n) = (φⁿ − ψⁿ)/√5, where ψ = (1 − √5)/2 ≈ −0.618. Since |ψ| < 1, the ψⁿ term vanishes as n grows, so F(n) is simply the nearest integer to φⁿ/√5. It is astonishing that a formula full of irrationals always lands exactly on an integer.
Nature uses the sequence for packing. Sunflower heads arrange seeds in spirals whose counts are consecutive Fibonacci numbers (often 34 and 55, or 55 and 89), because the golden angle ≈ 137.5° — derived from φ — packs seeds with minimal wasted space. Pinecones, pineapples, and flower petals follow the same optimization. Evolution discovered what the recurrence implies: φ-based spacing is the most efficient packing available.
F(0) = 0, F(1) = 1, F(n) = F(n−1) + F(n−2)
Closed form (Binet): F(n) = (φⁿ − ψⁿ)/√5, where φ = (1+√5)/2 and ψ = (1−√5)/2.
Build up from the start: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Each term adds the previous two: 21 + 34 = 55. So F(10) = 55. This is the last Fibonacci number most people can reach comfortably by hand.
Continuing: F(11) = 89, F(12) = 144, F(13) = 233, F(14) = 377, F(15) = 610, F(16) = 987, F(17) = 1597, F(18) = 2584, F(19) = 4181, F(20) = 6765. So F(20) = 6765 — already a four-digit number, showing the exponential growth (roughly φⁿ).
F(50) = 12,586,269,025 — eleven digits. Hand computation is hopeless here, but the iterative loop does 50 additions. The ratio F(50)/F(49) = 12586269025/7778742049 ≈ 1.618033988749895, matching φ to all displayed digits.
F(100) = 354,224,848,179,261,915,075 — twenty-one digits. A standard 64-bit integer tops out around 9.2 × 10¹⁸ (F(92) is the largest that fits), so exact big-number arithmetic is essential from here on. The calculator handles it effortlessly.
Traders use Fibonacci retracements to predict support levels: after a price swing, they watch the 23.6%, 38.2%, 50%, and 61.8% retracement levels — ratios derived from φ and the sequence (61.8% ≈ 1/φ, 38.2% ≈ 1/φ²). Whether markets truly respect these levels is debated, but millions of traders act on them, which makes them self-fulfilling surprisingly often.
Computer scientists meet Fibonacci in the analysis of the Euclidean algorithm: consecutive Fibonacci numbers are the hardest inputs — they force the maximum number of division steps. Knowing that gcd(F(n+1), F(n)) takes n steps is the key to proving the algorithm’s logarithmic running time, a cornerstone result in algorithm analysis.
The sequence also designs agile story-point scales (1, 2, 3, 5, 8, 13, …). Estimators pick Fibonacci numbers because the growing gaps express growing uncertainty: the difference between 8 and 13 says “we are less sure” more honestly than the difference between 8 and 9 would. A simple recurrence shapes how teams talk about difficulty.
The iterative loop needs n additions, which handles n = 5000 easily. But F(1,000,000) would need a million big-integer additions of ever-growing numbers. The fast doubling identities compute F(n) in O(log n) steps: F(2k) = F(k)×[2×F(k+1) − F(k)] and F(2k+1) = F(k+1)² + F(k)². Each step roughly doubles the index, so F(10⁶) needs only about 20 squaring-sized operations instead of a million additions.
These identities fall out of matrix exponentiation. The matrix [[1,1],[1,0]] raised to the nth power equals [[F(n+1),F(n)],[F(n),F(n−1)]], and squaring the matrix corresponds exactly to the doubling formulas. Binary exponentiation then evaluates the power in logarithmic time — the same trick behind fast modular exponentiation in cryptography.
For this calculator’s range (n ≤ 5000), the plain loop is actually faster in practice: only 5000 small additions, no big multiplications at all. Fast doubling earns its keep around n ≈ 10⁵ and beyond, where the numbers have tens of thousands of digits and each addition is itself expensive. Right tool, right scale.
F(15) should equal F(14) + F(13) = 377 + 233 = 610. Building the sequence: …, 233, 377, 610 — confirmed. This self-checking property means any single arithmetic slip breaks the chain visibly, which is why the sequence is a favorite for teaching careful computation.
Add F(0) through F(10): 0+1+1+2+3+5+8+13+21+34+55 = 143. The identity says the sum equals F(n+2) − 1 = F(12) − 1 = 144 − 1 = 143. Verified! This telescoping-style identity is one of dozens the sequence satisfies.
F(1000) = 434665576869374564356… (209 digits total). The digit count follows log₁₀(F(n)) ≈ n·log₁₀(φ) − log₁₀(√5) ≈ 0.208987·n − 0.3495, giving about 208.6 → 209 digits. The calculator reports the exact count with the value.
Two divisibility gems round out the picture. First, F(m) divides F(n) exactly when m divides n — so F(10) = 55 divides F(20) = 6765 (6765 ÷ 55 = 123). Second, gcd(F(m), F(n)) = F(gcd(m,n)): gcd(F(12), F(18)) = F(6) = 8, and indeed gcd(144, 2584) = 8. The sequence mirrors the divisibility structure of the indices themselves, a rare and beautiful property.
Write out F(0) through F(12) by hand, then check with the calculator. Compute the ratios F(11)/F(10) and F(12)/F(11) — how close are they to φ?
Use the identity ΣF(i) = F(n+2) − 1 to find the sum of the first 20 Fibonacci numbers without adding them one by one.
F(19) = 4181 = 37 × 113. Which smaller Fibonacci number must divide 4181, given that 19 is prime? What does that tell you about Fibonacci primes?
Fibonacci’s original 1202 puzzle: start with one pair of newborn rabbits. Each pair takes one month to mature, then produces one new pair every month, and rabbits never die. How many pairs after 12 months? Month by month: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233.
The logic is pure recurrence: this month’s pairs = last month’s pairs (all still alive) + pairs born this month (one per pair alive two months ago, since newborns need a month to mature). That is exactly F(n) = F(n−1) + F(n−2). After 12 months: 233 pairs.
The puzzle is biologically unrealistic — immortal rabbits! — but as a model of populations with delayed reproduction it was revolutionary, one of the first dynamical models in history. The calculator reproduces Fibonacci’s answer instantly, then keeps going to F(5000), far past anything the rabbits (or Fibonacci) could have imagined.
The Fibonacci Calculator computes F(n) exactly for n = 0 to 5000 by iterating F(k) = F(k−1) + F(k−2) with arbitrary-precision integers, reporting the exact value, the digit count, the ratio F(n)/F(n−1) converging to the golden ratio φ, and the opening terms of the sequence (full sequence for n ≤ 25, first 15 terms otherwise).
It is the sequence 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … where each term is the sum of the two before it: F(n) = F(n−1) + F(n−2), with F(0) = 0 and F(1) = 1.
Using F(0) = 0 indexing, F(50) = 12,586,269,025 — an 11-digit number. (With 1-based indexing starting 1, 1, 2, …, the “50th” term is F(51) = 20,365,011,074 — always check the indexing.)
The ratio of consecutive terms F(n+1)/F(n) converges to the golden ratio φ = (1+√5)/2 ≈ 1.6180339887. For example, 89/55 ≈ 1.61818, and by F(20) the ratio matches φ to six decimal places.
F(n) = (φⁿ − ψⁿ)/√5, where φ = (1+√5)/2 and ψ = (1−√5)/2. Because |ψ| < 1, F(n) is simply the nearest integer to φⁿ/√5 — a closed form with no recurrence.
In phyllotaxis: sunflower heads, pinecones, and pineapples arrange parts in spirals counted by consecutive Fibonacci numbers (e.g. 34 and 55), because the golden angle ≈ 137.5° packs seeds with minimal wasted space.
fib(n) = fib(n−1) + fib(n−2) recomputes the same subproblems exponentially many times — fib(50) needs over 20 trillion calls. A simple loop needs only n additions; the fast-doubling method needs only O(log n) steps.
In technical analysis, traders watch price retracement levels at 23.6%, 38.2%, 50%, and 61.8% of a prior swing — percentages derived from golden-ratio relationships (61.8% ≈ 1/φ). They act as widely watched support/resistance zones.
Up to F(5000), which has 1045 digits, computed exactly with big-number arithmetic. Standard 64-bit integers overflow after F(92), and floating point loses exactness around F(78) — hence the exact integer engine here.
Cite this page as: Fibonacci Calculator. Sigma Calculator. Retrieved October 9, 2026, from https://sigmacalculator.net/math-calculators/fibonacci-calculator/
Last updated: October 9, 2026