Fibonacci Calculator

Find any Fibonacci number exactly, list the sequence, check whether a number is in it, and see how the numbers link to the golden ratio.

F(50)12,586,269,025

Counting starts at 0: F(0) = 0, F(1) = 1, F(2) = 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

  1. The Fibonacci numbers start with 0 and 1. Every next number is the two before it added together: 0, 1, 1, 2, 3, 5, 8, …F(0) = 0, F(1) = 1, F(n) = F(n − 1) + F(n − 2)
  2. Your number is the two numbers before it added together.F(50) = F(49) + F(48)Put in your numbers: 7,778,742,049 + 4,807,526,976Answer: 12,586,269,025
  3. For big positions, adding one by one takes too long, so the calculator uses a shortcut that jumps ahead by doubling the position.Computed with fast doubling: F(2m) = F(m)·(2F(m + 1) − F(m)), F(2m + 1) = F(m)² + F(m + 1)²
  4. This is the answer.F(50)Answer: 12,586,269,025
  5. Fun fact: divide the next Fibonacci number by this one and you get very close to the golden ratio φ ≈ 1.618.Ratio F(51)/F(50)Put in your numbers: 1.618033989; φ = (1 + √5)/2 = 1.618033989Answer: the gap is ψⁿ/F(n) = +2.823e-21

Fibonacci numbers in simple words

The Fibonacci sequence is a list of numbers where each new number is the two numbers before it added together. It starts with 0 and 1.

Example: 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5, 3 + 5 = 8. So the list goes 0, 1, 1, 2, 3, 5, 8, 13, 21 and on forever.

We count positions from 0, so F(0) = 0, F(1) = 1, F(2) = 1 and F(6) = 8. The calculator can find the number at any position, list the start of the sequence, or check if a number is in it.

These numbers turn up in nature, for example in the spirals of pine cones and sunflower seeds.

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.

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.

References

Last updated . Results are estimates for informational purposes only.