Skip to content
Calcrivo

Fibonacci Calculator

Compute the nth Fibonacci number and display the sequence up to that term.

Inputs

Which Fibonacci number to compute (F(0)=0, F(1)=1, …). Max 1000.

F(n)

55

Digits

2

F(n)/F(n−1) → φ

≈ 1.6180339887

Sequence (first terms)

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55

Step by step

  1. Recurrence

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

  2. F(10)

    = 55

How it works

The Fibonacci sequence is defined by F(0) = 0, F(1) = 1, and F(n) = F(n−1) + F(n−2) for n ≥ 2. The ratio of consecutive terms converges to the golden ratio φ = (1+√5)/2 ≈ 1.618. This calculator uses BigInt for exact computation up to F(1000), which has 209 digits.

Formulas

Fibonacci recurrence

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

n
Term index (0-based)

Binet's formula (closed form)

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

φ
Golden ratio ≈ 1.618
ψ
Conjugate ≈ −0.618

Frequently Asked Questions

What is the golden ratio?

The golden ratio φ = (1 + √5)/2 ≈ 1.6180339887. The ratio F(n)/F(n−1) approaches φ as n grows. It appears throughout mathematics, art and nature.

Why use BigInt instead of floating point?

Fibonacci numbers grow exponentially. F(79) already exceeds Number.MAX_SAFE_INTEGER (2⁵³−1), so standard JavaScript numbers lose precision. BigInt provides exact integer arithmetic regardless of size.

You might also need