Fibonacci Sequence Generator

Generate Fibonacci numbers up to any count or value limit.

About this calculator

Generate the Fibonacci sequence either by number of terms or up to a maximum value. The result lists the sequence and a table of index and value, from F(0) = 0.

Handy for programming practice, maths puzzles and seeing how quickly the sequence grows.

How to use it

  1. Choose the mode: By Count or Up to Maximum Value.
  2. Enter the number of terms, or the limit.
  3. Press Generate.

Rule

The Fibonacci sequence starts 0, 1 and each next term is the sum of the previous two: F(n) = F(n−1) + F(n−2). The ratio of consecutive terms approaches the golden ratio φ = (1 + √5) ÷ 2 ≈ 1.6180339887. Binet's formula gives a closed form: F(n) = (φⁿ − ψⁿ) ÷ √5 with ψ = (1 − √5) ÷ 2.

Worked example

First 10 terms

Sequence0, 1, 1, 2, 3, 5, 8, 13, 21, 34
F(20)6,765
F(30)832,040

Tips and common mistakes

  • Each term is the sum of the previous two.
  • The sequence passes one million at F(31).
  • In code, loops are faster than naive recursion.
  • Every third Fibonacci number is even.
  • Ratios of consecutive terms approach 1.618.

Frequently asked questions

What is the Fibonacci sequence?

A sequence where each number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8…

What is the 10th Fibonacci number?

F(10) is 55.

What is the golden ratio?

About 1.618, the limit of the ratio of consecutive Fibonacci numbers.

Where does it appear in nature?

In spirals of sunflowers, pine cones and shells, though sometimes loosely claimed.

Does it start from 0 or 1?

Conventions differ; this tool starts at F(0) = 0.

How fast does it grow?

Exponentially, by a factor of about 1.618 each step.

Related tools