Fibonacci Calculator
Free Fibonacci calculator: find the nth Fibonacci number, generate the sequence with running sums and golden-ratio drift, or check if a number is a Fibonacci number and find its position.
https://hexacalculator.com/calculators/mathematics/arithmetic/fibonacci-calculator
Mathematics
Arithmetic
Fibonacci Calculator
Free Fibonacci calculator: find the nth Fibonacci number, generate the sequence with running sums and golden-ratio drift, or check if a number is a Fibonacci number and find its position.
Fibonacci Calculator
Fibonacci calculator
Result
F(10) = 55. Its ratio to the previous term is 1.6176, closing in on the golden ratio, about 1.618.
- Previous term F(n-1)
- Next term F(n+1)
- Sum up to F(n)
- Ratio to previous term
The sequence up to your term
n | Fibonacci F(n) | Running sum | Ratio F(n)/F(n-1) |
|---|---|---|---|
| 0 | 0 | 0 | — |
| 1 | 1 | 1 | — |
| 2 | 1 | 2 | 1 |
| 3 | 2 | 4 | 2 |
| 4 | 3 | 7 | 1.5 |
| 5 | 5 | 12 | 1.667 |
| 6 | 8 | 20 | 1.6 |
| 7 | 13 | 33 | 1.625 |
| 8 | 21 | 54 | 1.615 |
| 9 | 34 | 88 | 1.619 |
| 10 | 55 | 143 | 1.618 |
The Fibonacci sequence starts with 0 and 1, after which each number is the sum of the two preceding ones. So it continues like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. Expressed as a rule, it looks like this: .
This calculator offers three functions: finding any number in the fibonacci sequence, generating the sequence up to a certain number of elements and checking if a given number is a fibonacci number. By selecting one of the modes above, the result will be shown in the corresponding field.
What is the Fibonacci sequence?
The Fibonacci sequence is defined by two initial values and a rule. The first two terms are and , where each subsequent term is the sum of the previous two terms, i.e. . Such a definition in which new terms are generated on the basis of previous terms is called a recurrence relation.
To manually calculate a single term, you simply add. To get , you add the two previous terms, namely . By continuing to calculate, the numbers grow quickly as each term takes on all of the influences accumulated so far.
This concept has a long history. Centuries ago Indian scholars described this pattern as part of their study of poetry. Later around 1202 Leonardo of Pisa, better known as Fibonacci, introduced the concept to Europe through a problem about rabbit breeding. Although the rabbits are fictitious it turns out that the resulting sequence of numbers forms the basis for an astonishingly large number of phenomena in mathematics and nature.
The calculation of the nth Fibonacci number.
One direct method of computing a particular Fibonacci number is to sequentially build up a table of Fibonacci numbers, starting with the first two values, 0 and 1, and then continuing to add two numbers together as many times as necessary to reach the desired position. The table on this page shows exactly this method, listing the values from F(0) through the desired position.
Another way is to use a closed formula that directly applies to any element. This formula is called the Binet's Formula and consists of the golden ratio and its conjugate value .
is a small negative number and gets smaller as gets larger. So the result at any position is the whole number closest to . This means that Fibonacci numbers, which are all whole numbers, come from a formula involving the square root of an irrational number.
The golden ratio hidden within the proportions.
When any Fibonacci number is divided by the one before it, the result approximates a constant value known as the Golden Ratio. In the early stages of the sequence, the ratios fluctuate like , and , but they converge rapidly so that after about a handful of terms, the decimal places are nearly identical. You can observe this shift easily in the ratio column of the table.
This explains why the Fibonacci numbers appear in a wide variety of contexts where the golden ratio appears, from the spirals in sunflower seed heads to the proportions that artists strive for. The golden ratio is precisely the number that the ratios of the Fibonacci numbers approach more and more closely.
The sum of Fibonacci numbers:
The sum of consecutive terms has a simple trick to it. When you add the first few Fibonacci numbers together, their sum is always one less than the Fibonacci number two places over.
One can easily verify this. The individual terms from to are 0, 1, 1, 2, 3, 5, 8, and their sum is 20. In fact it's . The total sum function used on this page uses that identity instead of adding up each individual term.
How to check if a number is a Fibonacci number:
There is a way to generate the fibonacci numbers until you get a number that is larger than the one you are investigating. This is actually what a testing tool does internally. There is also another clever method of determining if a number is a Fibonacci number without having to write out the sequence. A non-negative integer is a Fibonacci number if and only if either or is a perfect square.
For example, take 144. It is both and , so it's a perfect square. Consequently, 144 is the fibonacci number at position 12. Let's look at 100. Since neither nor are perfect squares, 100 is not a fibonacci number. It falls between 89 and 144.
Fibonacci numbers for negative positions
The sequence can be extended to negative position numbers by using the same recursive relationship in reverse, starting from F1 = 1 and F0 = 0. Calculating backwards gives the sequence 1, −1, 2, −3, 5, −8... The absolute value of each term is the corresponding Fibonacci number, with alternating signs following F(-n) = (-1)^(n+1) F(n).
n | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F(n) | -8 | 5 | -3 | 2 | -1 | 1 | 0 | 1 | 1 | 2 | 3 | 5 | 8 |
This tool covers positions that are greater than or equal to 0. This is the convention most people refer to as the Fibonacci sequence. The negative side is also shown here so you can see the full picture.
Does the sequence start at 0 or 1?
Both conventions are used, which often leads to confusion. The modern standard followed by this tool starts at zero: , , , . In older books and puzzles the leading zero is sometimes dropped and one is started with, so that in those the nth element corresponds to the th element of this tool. Where position matters, this page will show an index for each element, so it's clear which element is being considered.
Where does the Fibonacci sequence appear?
In plants the number of spirals on a pine cone, pineapple or sunflower seed head is often found to match a Fibonacci number. This is because the arrangement of seeds or leaves in an angle relative to the Golden Ratio helps them fill space most efficiently. The same numbers appear when counting the branching of some trees and the arrangement of leaves around their stems.
In computer science, the sequence is a classic example of recursion and illustrates the value of storing previously computed results. The Fibonacci numbers are also the basis for the name "Fibonacci heap" data structure, used in computer programming. They also appear in search techniques, in the analysis of Euclid's algorithm, and in number theory, where every positive integer can be written as the sum of non-consecutive Fibonacci numbers.
Table of first Fibonacci numbers:
Here are the individual terms from F(0) to F(20). If you switch the calculation tool into list mode, you can extend it as far as you like.
n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
F(n) | 0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 | 34 | 55 |
n | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | |
F(n) | 89 | 144 | 233 | 377 | 610 | 987 | 1597 | 2584 | 4181 | 6765 |
Frequently asked questions
- What is the Fibonacci sequence?
The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting from 0 and 1. So the sequence goes like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. The rule can be expressed as a formula: F(n) = F(n-1) + F(n-2), with F(0) = 0 and F(1) = 1.
- What is the 10th Fibonacci number?
If one begins with F(0) = 0 and the position is considered to be 10, then the element at that position F(10) = 55. The sequence of numbers so far would be: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Even if one begins with 1 and omits the leading zero, the tenth number in the sequence is still 55. So in this example both conventions agree but the position designations are shifted by one.
- Is 0 a fibonacci number?
Yes. Zero is the first Fibonacci number, and F(0) = 0. 1 appears as F(1), and 1 again as F(2). Each subsequent element is generated by adding together both starting values and the two previous elements.
- How to check if a number is a Fibonacci Number?
A non-negative integer n is a Fibonacci number if and only if one or both of the following expressions are perfect squares: 5n2 + 4 or 5n2 − 4. For example, for n = 144, 5n2 + 4 = 103684 = 3222, so 144 is a Fibonacci number. The test mode of this tool performs this check and reports the position of that number.
- What is the relationship between the Fibonacci sequence and the golden ratio?
When any Fibonacci number is divided by the previous term, the result approximates to the value of the Golden Ratio which is approximately 1.618. The further along the sequence you go, the closer the ratio gets to this value, which is why Fibonacci numbers appear in nature and design together with the golden ratio.
- What is the formula of binet?
Binet's formula is a closed-form expression used to compute Fibonacci numbers directly from their position in the sequence without having to add up all of the previous terms. It states that F(n) = (phi^n - psi^n)/sqrt(5), where phi is the golden ratio and psi is its conjugate, namely (1 - sqrt(5))/2. In fact, F(n) is the integer closest to the value obtained by dividing phi^n by sqrt(5).
- Does the index of the Fibonacci sequence start at 0 or 1?
Both methods are used. This page follows the modern convention that begins with F(0) = 0 followed by F(1) = 1, F(2) = 1 and F(3) = 2. In older documents sometimes a zero is omitted so that the sequence starts at 1. In such cases the nth element of the sequence corresponds to the (n minus 1)th element in this tool. The tables on this page always show the index, avoiding confusion.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- Wolfram MathWorld: Fibonacci Number
Authoritative reference on Fibonacci numbers, Binet's formula, identities, and the golden ratio.
- OEIS A000045: Fibonacci numbers
The Fibonacci sequence in the On-Line Encyclopedia of Integer Sequences, with terms, formulas, and references.
- Cuemath: Fibonacci Sequence
Fibonacci sequence explained for students, with the golden-ratio link, sums, and worked examples.