Compute the nth Fibonacci number, generate a sequence of terms, explore golden ratio convergence, Binet's formula, presets, sequence table, and ratio convergence visual.
The **Fibonacci Sequence Calculator** is a comprehensive tool for exploring the world's most famous number sequence. Enter any positive integer n to instantly compute the nth Fibonacci number, generate a full sequence of terms, and see how consecutive ratios converge toward the golden ratio φ ≈ 1.6180339887.
The Fibonacci sequence begins with 0 and 1, and each subsequent term is the sum of the two preceding terms: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. This deceptively simple rule produces a sequence with extraordinary mathematical properties. The ratio of consecutive terms approaches the golden ratio, the sum of the first n terms equals F(n+2) − 1, and every positive integer can be written as a sum of non-consecutive Fibonacci numbers (Zeckendorf's theorem).
This calculator supports multiple computation methods. The iterative approach generates all terms up to n, while Binet's closed-form formula uses φ (the golden ratio) and ψ (its conjugate) to compute F(n) directly — though floating-point precision limits its accuracy for very large n. You can also set custom starting values to explore generalized Fibonacci-like sequences (Lucas numbers, for instance, start with 2 and 1).
A detailed sequence table lists each term with its index, value, and the ratio to the previous term. The ratio convergence chart visually demonstrates how quickly the ratios approach φ. Preset buttons let you jump to notable values like F(10) = 55, F(20) = 6765, or F(50) = 12,586,269,025. Whether you are studying number theory, exploring spirals in nature, or just curious about this iconic sequence, this calculator has you covered.
Computing dozens of Fibonacci terms by hand introduces cumulative errors and is painfully slow — missing one addition cascades through every subsequent value. This calculator generates up to 300 terms instantly, showing the golden-ratio convergence at every step so you can see how quickly F(n)/F(n−1) approaches φ. It also supports custom seed values for Lucas numbers and other generalised sequences, and compares iterative versus Binet's closed-form results so you can understand where floating-point precision breaks down.
F(n) = F(n-1) + F(n-2), with F(0) = 0, F(1) = 1. Binet: F(n) = (φⁿ − ψⁿ) / √5 where φ = (1+√5)/2, ψ = (1−√5)/2.
Result: 10: F(10) = 55
For n = 10: F(10) = 55. The sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. The ratio F(10)/F(9) = 55/34 ≈ 1.6176, close to φ ≈ 1.6180.
The ratio of consecutive Fibonacci numbers F(n+1)/F(n) converges to the golden ratio φ = (1 + √5) / 2 ≈ 1.618034. This convergence is exponentially fast — by n = 12, the ratio already matches φ to five decimal places. Binet's closed-form formula F(n) = (φⁿ − ψⁿ)/√5 (where ψ = 1 − φ) makes this relationship explicit, though floating-point limits mean the iterative method is more reliable for large n in practice.
Sunflower heads, pinecone spirals, and leaf phyllotaxis follow Fibonacci counts because the golden angle (≈ 137.5°) produces the most efficient packing. In computer science, Fibonacci numbers appear in the analysis of the Euclidean algorithm (worst-case input is consecutive Fibonacci numbers), Fibonacci heaps, and optimal binary search trees. The sequence also defines Zeckendorf's representation, where every positive integer can be written as a sum of non-consecutive Fibonacci numbers.
Changing the seed values from (0, 1) produces different but related sequences. Seeds (2, 1) give the Lucas numbers, which share many properties with Fibonacci numbers and satisfy L(n) = F(n−1) + F(n+1). Extending the recurrence to three terms (T(n) = T(n−1) + T(n−2) + T(n−3)) produces the Tribonacci sequence, whose ratio converges to the Tribonacci constant ≈ 1.8393. Use this calculator's custom seed feature to explore any of these families.
A sequence where each number is the sum of the two preceding ones, starting from 0 and 1: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... Use this as a practical reminder before finalizing the result.
The golden ratio φ = (1 + √5) / 2 ≈ 1.6180339887. The ratio of consecutive Fibonacci numbers converges to this value as n increases.
A closed-form expression: F(n) = (φⁿ − ψⁿ) / √5. It computes F(n) directly without generating all previous terms, but loses precision for large n due to floating-point arithmetic.
Very fast. By n = 10, the ratio F(n)/F(n-1) matches φ to about 4 decimal places. By n = 20, it matches to about 8 decimal places.
A Fibonacci-like sequence starting with 2 and 1 instead of 0 and 1. Set the seed values to 2 and 1 in this calculator to generate Lucas numbers.
In sunflower spiral counts, pinecone scales, leaf arrangements, shell spirals, and branching patterns. The golden ratio is closely related to these natural structures.
JavaScript safely handles integers up to about F(78) = 8,944,394,323,791,464. Beyond that, results may lose precision. The calculator limits terms to 300 for performance.