Fibonacci Calculator
Find the n-th Fibonacci number exactly using BigInt, with sequence preview.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this fibonacci calculator
- Enter the index n between 0 and 5000.
- Press Calculate to compute the n-th Fibonacci number F(n).
- Read the digit count, exact value, and the first twelve terms of the sequence.
- Use Copy to put F(n) on your clipboard, or Reset to clear the input.
About this fibonacci calculator
The fibonacci calculator returns F(n), the n-th term of the Fibonacci sequence. It uses JavaScript BigInt arithmetic so the result is exact even for very large indices.
The recurrence is F(n) = F(n − 1) + F(n − 2) with the base cases F(0) = 0 and F(1) = 1. The sequence begins 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …, each term the sum of the two before it. For example, F(10) = 55, computed by iterating up from F(2) = 1, F(3) = 2, F(4) = 3, … through F(10) = 55. The tool computes terms iteratively (not recursively) so it stays linear in n. The upper limit is n = 5000, where F(5000) has more than a thousand digits and the BigInt math still finishes in well under a second.
Fibonacci numbers show up in combinatorics, computer-science recurrences, the golden-ratio limit F(n+1) ÷ F(n) → φ, and many natural growth patterns.
FAQ
- What does the fibonacci calculator return?
- It returns F(n), the n-th term of the Fibonacci sequence, computed exactly with BigInt arithmetic. The first twelve terms of the sequence are also shown.
- What is the formula for Fibonacci numbers?
- F(n) = F(n − 1) + F(n − 2) for n ≥ 2, with base cases F(0) = 0 and F(1) = 1. The closed-form Binet formula exists but loses precision for large n; this tool iterates the recurrence instead.
- What is the largest index supported?
- Up to n = 5000. Beyond that the BigInt values become large enough to noticeably slow down rendering in the browser, so the input is capped.
- Does the sequence start at 0 or 1?
- This tool starts at F(0) = 0 and F(1) = 1, which is the modern convention. Some older sources start at F(1) = 1 and F(2) = 1, so the index of a given value is offset by one between the two systems.
- Does this tool store my numbers?
- No. The calculation runs entirely in your browser; nothing is sent to a server or saved between visits.
- Is the fibonacci calculator free?
- Yes. It is free to use with no signup, no account, and no usage limit.