Fibonacci calculator
Choose what you need: the exact n-th Fibonacci number with its number of digits, the first N terms of the sequence, or a test of whether a number belongs to it. All values are exact big integers, with no rounding.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Choose a mode: n-th number, first N terms or check.
- Type a whole number. Its meaning depends on the mode, as the hint under the box says.
- Read the result and the extra rows below it.
How it works
The sequence is built by adding the two previous terms using exact integers, so F(1000), which has 209 digits, is correct in every digit. The digit count is the length of the decimal text. The check walks the sequence until a term reaches your number.
Worked example
F(100) = 354,224,848,179,261,915,075 (21 digits), written without separators in the result box. F(10) = 55. The first ten terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. Checking 144 gives: yes, it is F(12). Checking 100 says no, and shows that the nearest Fibonacci numbers are F(11) = 89 and F(12) = 144.
Tips
- Every third Fibonacci number is even: F(0), F(3), F(6) and so on.
- The ratio of consecutive terms approaches the golden ratio, about 1.618.
- F(n) has about 0.209 × n digits.
Frequently asked questions
What is the Fibonacci sequence?
Each term is the sum of the two before it, starting 0, 1: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. This tool counts from F(0) = 0, so F(1) = 1, F(2) = 1 and F(10) = 55.
How big can n be?
In n-th mode, up to 10,000. F(10,000) has 2,090 digits. Large values are shown by their first and last digits, and the copy button copies every digit. Because the arithmetic uses exact big integers, nothing is rounded.
How does the check work?
It generates the sequence until it reaches or passes your number. If it hits the number exactly, it reports the position; otherwise it shows the Fibonacci numbers just below and above. A number is Fibonacci exactly when 5n² + 4 or 5n² − 4 is a perfect square.
Why does 1 have position 1?
1 appears twice, as F(1) and F(2). The check reports the first position.
What is the sum of the listed terms?
The sum F(0) + … + F(k) always equals F(k + 2) − 1. For the first 10 terms it is 88, which is F(11) − 1 = 89 − 1.