Fibonacci Sequence Calculator — Instant Nth Term & Golden Ratio Chart

Instantly compute any term of the Fibonacci sequence, exact up to F(100) using BigInt. See the ratio of consecutive terms converge to the golden ratio φ, explore Lucas numbers, and view a bar chart of the first N terms.

What Is the Fibonacci Sequence?

The Fibonacci sequence builds each term by adding the two before it. It runs 1, 1, 2, 3, 5, 8, 13, and written as a formula it is F(n) = F(n−1) + F(n−2). This tool lists the terms up to the count you specify, gives the exact value of the nth term, and charts how the ratio between neighbouring terms approaches the golden ratio.

From the 79th term onward ordinary numbers can no longer represent the values exactly, so the «look up the nth term» field uses arbitrary-precision integers to compute up to the 100th term without error. The chart, on the other hand, grows exponentially by nature: from around the 20th term the bars become extreme, so keep the term count small when you want to watch the convergence.

How to Use the Fibonacci Calculator

  1. Decide how many terms to display Specify how many terms appear in the list and the chart. For watching the convergence, somewhere around 15 to 20 reads best.
  2. Look up the nth term Enter the term number you want and its value appears. Exact integers are available up to the 100th term.
  3. Check the convergence of the ratio Look down the column of F(n+1)/F(n) and you can follow numerically how it approaches the golden ratio of about 1.618 as the terms advance.

Tips for getting more out of it

  • The Fibonacci sequence is defined by F(n) = F(n−1) + F(n−2) with F(1) = F(2) = 1 as starting values.
  • The ratio of consecutive terms F(n+1)/F(n) converges to the golden ratio φ ≈ 1.618 as n increases. Watch it happen in the convergence table.
  • For n > 78, JavaScript 64-bit floats can no longer represent Fibonacci numbers exactly. The "Find nth term" field uses BigInt to compute F(n) accurately up to n = 100.
  • Fibonacci numbers appear throughout nature: the spiral arrangement of sunflower seeds, pinecone scales, and nautilus shells all follow Fibonacci patterns (phyllotaxis).

When the Fibonacci Sequence Comes in Handy

Maths homework and checking your working

Compare against an nth term you computed by hand. Exact integers are returned even for terms with many digits, so no error creeps in along the way.

Confirming the link with the golden ratio

Follow numerically how the ratio between neighbours closes on 1.618. It helps turn the word «converges» into something you can actually see.

Preparing expected values for a program

When testing a recursive or dynamic-programming implementation, you can confirm here the values to use as the correct answer.

As a scale for estimation

Software teams sometimes use values close to this sequence when sizing work. Useful for checking the spacing between the steps.

Fibonacci Sequence Terms

Recurrence Relation
A formula that defines the next term using the preceding ones. For the Fibonacci sequence, F(n) = F(n−1) + F(n−2) is that formula.
Golden Ratio
The ratio of roughly 1.618 expressed as (1 + √5) / 2. The ratio between neighbouring Fibonacci terms converges on this value.
Lucas Numbers
A sequence with the same recurrence but different starting values. It runs 1, 3, 4, 7, 11, and converges on the golden ratio at the same speed.
Binet's Formula
A formula that finds the nth term directly using the golden ratio rather than the recurrence. It gives you the value without stepping through the terms one by one.
Arbitrary-Precision Integer
A mechanism for handling integers with no limit on the number of digits. It is what allows the 79th term onward to be computed without error.
Phyllotaxis
The rules governing how leaves and seeds are arranged on a plant. Fibonacci numbers are known to appear in patterns such as the spirals of sunflower seeds.

FAQ

Both conventions exist. This tool uses the 1-indexed convention F(1) = 1, F(2) = 1, which is common in Japanese high-school mathematics. The 0-indexed convention F(0) = 0, F(1) = 1 is equally valid and more common in computer science.

Lucas numbers share the same recurrence L(n) = L(n−1) + L(n−2) as Fibonacci, but with different starting values: L(1) = 1, L(2) = 3, giving 1, 3, 4, 7, 11, 18, 29, … They converge to the golden ratio at the same rate as Fibonacci numbers.

Binet's formula is the closed-form expression F(n) = (φⁿ − ψⁿ) / √5, where φ = (1+√5)/2 and ψ = (1−√5)/2. It gives any Fibonacci number directly from n, without computing previous terms. In practice, floating-point errors make it unreliable for large n, which is why this tool uses integer iteration with BigInt instead.
Tool-kun

Side Note — Fibonacci, the golden ratio, and Binet's formula

The sequence was popularised in Europe by Leonardo of Pisa (Fibonacci) in his 1202 book Liber Abaci, where he used it to model rabbit population growth. However, equivalent sequences appeared in Indian mathematics as early as 200 BCE in the work of Pingala, who studied poetic meter.

The golden ratio φ = (1 + √5) / 2 ≈ 1.618 satisfies φ² = φ + 1, which is the key to why Fibonacci numbers converge to it. Binet's formula gives F(n) exactly: F(n) = (φⁿ − ψⁿ) / √5, where ψ = (1 − √5) / 2 ≈ −0.618. This closed-form expression lets you compute any Fibonacci number directly, without iterating.