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.