Fibonacci Calculator

Get any Fibonacci number exactly, list the sequence, check whether a number belongs to it, and watch the ratio of neighbouring terms close in on the golden ratio.

F(50)12,586,269,025

F(0) = 0, F(1) = 1.

F(50)

12,586,269,025

  • Digits11
  • F(51) ÷ F(50)1.618033989
  • Golden ratio φ1.618033989
  • Ratio − φ+2.823e-21
  • F(51)20,365,011,074

Values are exact. Binet's formula F(n) = (φⁿ − ψⁿ)/√5 gives the same numbers, but floating-point evaluation of it loses exactness after about n = 70.

How this was calculated

F(0) = 0, F(1) = 1, F(n) = F(n − 1) + F(n − 2).

Computed with fast doubling: F(2m) = F(m)·(2F(m + 1) − F(m)), F(2m + 1) = F(m)² + F(m + 1)².

F(50) = 12,586,269,025.

Ratio F(51)/F(50) = 1.618033989; φ = (1 + √5)/2 = 1.618033989; the gap is ψⁿ/F(n) = +2.823e-21.

Definition and fast computation

F(0) = 0, F(1) = 1, and every later term is the sum of the two before it: F(n) = F(n − 1) + F(n − 2). That gives 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, …

To reach large n quickly, the calculator uses the doubling identities F(2m) = F(m)(2F(m + 1) − F(m)) and F(2m + 1) = F(m)² + F(m + 1)² with exact integers. For example, F(50) = 12,586,269,025, and F(1000) has 209 digits.

Golden ratio

The ratio of neighbouring terms F(n + 1)/F(n) approaches φ = (1 + √5)/2 ≈ 1.618033989. The gap is exactly ψⁿ/F(n), where ψ = (1 − √5)/2, so the ratio lands alternately above and below φ. By n = 50, the gap is about 2.8 × 10⁻²¹.

Binet's formula F(n) = (φⁿ − ψⁿ)/√5 is exact in theory, but evaluating it in floating point breaks down after about n = 70. That is why this tool uses integer arithmetic.

Is a number a Fibonacci number?

A whole number x is a Fibonacci number exactly when 5x² + 4 or 5x² − 4 is a perfect square. For 144: 5 × 144² + 4 = 103,684 = 322², so 144 is a Fibonacci number, namely F(12). For a number that fails the test, the calculator shows the Fibonacci numbers on either side of it.

How to use the Fibonacci Calculator

Pick what you want to find.

  1. Choose a mode

    nth term, a list of terms, or a membership check.

  2. Enter n, N or the number

    Type the index, how many terms to list, or the number to test.

  3. Read the result

    See the exact value, the ratio to φ, or the neighbouring Fibonacci numbers.

References

Frequently asked questions

Does the sequence start at 0 or 1?

This calculator uses F(0) = 0 and F(1) = F(2) = 1, the convention in OEIS A000045. In list mode you can choose to start at 1 instead.

How big can n be?

Up to 20,000, where F(n) has 4,180 digits. Long values appear in scientific notation, with every digit listed in a table.

Why is 1 listed twice?

Because F(1) and F(2) both equal 1, the number 1 appears at two positions in the sequence.

Last updated . Results are estimates for informational purposes only.