Fibonacci Calculator
Enter a position n to get the n-th Fibonacci number exactly, even when it has thousands of digits. List any run of up to 200 numbers, or test whether a number belongs to the sequence and see how it breaks into non-neighbouring Fibonacci numbers. The ratio of neighbours and the Lucas number are shown too. Everything runs in your browser.
12586269025
11 digits
The Fibonacci numbers start 0, 1 and every number after is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21 and so on. This tool uses exact big integers, so even F(20,000), with over 4,000 digits, is correct to the last digit. The ratio of neighbouring numbers approaches the golden ratio, about 1.6180339887. A number is a Fibonacci number exactly when 5 times its square plus or minus 4 is a perfect square. Everything is worked out in your browser.
Related Tools
[5 suggestions]Arithmetic and Geometric Sequence Calculator
Find the nth term and the sum of an arithmetic or geometric sequence, the sum to infinity, the position of a value, or identify a list of numbers.
Student ToolsPrime Factorization Calculator
Break any whole number up to 18 digits into its prime factors, with division steps, all divisors and a prime check.
Math & MoneyGCD and LCM Calculator
Find the greatest common divisor and least common multiple of two or more whole numbers, with the Euclidean algorithm steps.
Math & MoneyScientific Notation Converter
Convert a number to scientific, engineering, E and standard notation, round to significant figures and see the SI prefix, with every digit kept exact.
Student ToolsLogarithm Calculator
Calculate a logarithm to any base, plus the common, binary and natural logs, antilogarithms and the change of base working.
Student ToolsAbout the Fibonacci Calculator
The Fibonacci numbers start with 0 and 1, and every later number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 and so on. The tool counts the positions from 0, so F(10) is 55, F(50) is 12,586,269,025 and F(100) is 354,224,848,179,261,915,075. It uses big integers and a fast doubling method, so it finds F(20,000), which has 4,180 digits, instantly and exactly, where an ordinary calculator would round off after about 15 digits. F(1000) has 209 digits. The ratio of each number to the one before settles toward the golden ratio, about 1.6180339887, and by position 30 it agrees to 12 places. A whole number is a Fibonacci number exactly when 5 times its square plus 4, or minus 4, is a perfect square, which is how the test works for numbers of any size. Every positive whole number can also be written in exactly one way as a sum of Fibonacci numbers that are not neighbours, called its Zeckendorf form: 100 is 89 plus 8 plus 3. Binet's closed formula with the golden ratio gives the numbers too, but in floating point it stays exact only to about F(70). Fibonacci numbers appear in the Euclidean algorithm, in spirals and growth patterns, and in many programming exercises. The Lucas numbers, 2, 1, 3, 4, 7, 11, follow the same rule from different starting values.
What are the first Fibonacci numbers?▾
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. Each is the sum of the two before it. F(0) is 0 and F(1) is 1.
How do you calculate the n-th Fibonacci number?▾
You can add up from the start, which takes n steps, or use the fast doubling identities, which take about log n steps. For small n, Binet's formula with the golden ratio also works, but it loses accuracy for larger n.
How do you check if a number is a Fibonacci number?▾
A number x is a Fibonacci number exactly when 5 times x squared plus 4, or minus 4, is a perfect square. For example 144 works because 5 x 144 x 144 + 4 = 103,684, which is 322 squared.
What is the golden ratio and how does it relate?▾
The golden ratio is about 1.6180339887. The ratio of a Fibonacci number to the one before it gets closer to it as the numbers grow.
Is my data uploaded?▾
No. The calculation runs in your browser and nothing you enter is sent anywhere.