Home› Math & Science› Fibonacci Sequence Generator

Fibonacci Sequence Generator

Generate the first N terms of the Fibonacci sequence, or look up the Nth Fibonacci number directly. Each term is the sum of the previous two.

Inputs

F(0) = 0, F(1) = 1, F(2) = 1, F(3) = 2, ...
Sequence
—
Nth term (chosen above)
—
Sum of first N terms
—
Golden ratio approximation (last ÷ prev)
—

About Fibonacci Sequence Generator

Definition

F(0) = 0, F(1) = 1, F(n) = F(n−1) + F(n−2) for n ≥ 2. Each term is the sum of the previous two.

Golden ratio

The ratio of consecutive Fibonacci numbers approaches φ = (1 + √5) ÷ 2 ≈ 1.6180339887… as n grows. Try setting count = 30 and check the ratio — it converges quickly.

Where they appear

Plant phyllotaxis (leaf arrangements), spiral growth in shells and galaxies, the structure of pinecones and sunflowers, and many algorithmic puzzles (dynamic programming, recursion).