Fibonacci Calculator

Get the nth Fibonacci number exactly, however large, along with the sequence up to that point and the ratio of consecutive terms.

F(n)

Sequence up to F(n)

The definition

F(0) = 0  ·  F(1) = 1  ·  F(n) = F(n−1) + F(n−2)

Each term is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 and onward. Some texts start the sequence at F(1) = 1, which shifts every index by one — worth checking before comparing answers.

Binet's formula

F(n) = (φn − ψn) / √5,   where φ = (1+√5)/2 and ψ = (1−√5)/2

A closed form that needs no iteration. Because |ψ| < 1, the second term shrinks towards zero, so F(n) is simply φn/√5 rounded to the nearest whole number. In floating point this drifts once n passes about 70, which is why the calculator above uses exact integer arithmetic instead.

The golden ratio

The ratio of consecutive terms converges on φ ≈ 1.6180339887. It arrives quickly: 13/8 = 1.625 is already within 0.5%, and by the twentieth term the ratio is correct to seven decimal places. The convergence alternates, overshooting and undershooting on successive terms.

Worked example

Find F(10)

  1. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55
  2. Counting from F(0) = 0, the eleventh entry is F(10) = 55
  3. Binet check: φ10/√5 = 122.9919/2.2361 = 54.9999 → rounds to 55 ✓
  4. Ratio F(10)/F(9) = 55/34 = 1.617647, already close to φ

Frequently asked questions

What is the Fibonacci sequence?

A sequence where each term is the sum of the two before it, starting from 0 and 1: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 and so on.

What is the formula for the nth Fibonacci number?

Binet's formula gives it in closed form: phi to the power n minus psi to the power n, all divided by the square root of five, where phi is the golden ratio and psi is one minus the square root of five over two.

How is the Fibonacci sequence related to the golden ratio?

The ratio of consecutive Fibonacci numbers converges on the golden ratio, about 1.618034. The approximation improves rapidly and alternates between overshooting and undershooting.

Does the Fibonacci sequence start at 0 or 1?

Both conventions exist. This calculator uses F of 0 equals 0 and F of 1 equals 1, which is the standard in mathematics. Some texts start at F of 1 equals 1, shifting every index by one.

Related calculators

HCF & LCMCubic Equation SolverGann CalculatorFunction Grapher