Home › Math & Science › Fibonacci Calculator
Fibonacci Calculator
Use this free Fibonacci calculator to find the nth Fibonacci number, list the first N terms, add them up, or check whether a number belongs to the sequence. Results are exact — even for n up to 500 — because the calculator uses BigInt arithmetic, and the diagram shows the Fibonacci squares and how the ratio of consecutive terms closes in on the golden ratio.
Enter n from 0 to 500. Counting starts at F(0) = 0, F(1) = 1, F(2) = 1, F(3) = 2, and so on. Large values are computed exactly with BigInt.
How the Fibonacci sequence works
The Fibonacci sequence is one of the most famous patterns in mathematics. It starts with 0 and 1, and every term after that is the sum of the two terms before it. So the sequence runs 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and on forever. The rule is simple, but the numbers grow fast: by the 20th term you are past 6,000, by the 50th past 12 billion, and by the 100th the number has 21 digits.
F(n) = F(n−1) + F(n−2) for n ≥ 2
Sum of F(1) to F(n) = F(n+2) − 1
Ratio F(n+1) ÷ F(n) → φ ≈ 1.618034 as n grows
The sequence is named after Leonardo of Pisa, known as Fibonacci, who described it in 1202 while modelling how a population of rabbits would grow. The pattern also turns up in nature: the spirals in a sunflower head, the arrangement of pinecone scales, and the branching of many plants follow Fibonacci numbers, because that arrangement packs seeds and leaves as efficiently as possible.
The golden ratio is the sequence's most famous connection. Take any Fibonacci number and divide it by the one before it: 8 ÷ 5 = 1.6, 21 ÷ 13 = 1.615, 55 ÷ 34 = 1.6176, 144 ÷ 89 = 1.6180. The ratio creeps closer and closer to 1.618034, the golden ratio, usually written φ (phi). It never quite reaches it, but the gap shrinks with every step. That is why the golden ratio appears in the same places the Fibonacci numbers do — in art, architecture, and the proportions of shells and flowers. This calculator shows the ratio for your n, so you can watch the convergence happen.
Adding the sequence up has a neat shortcut. The sum of the first n Fibonacci numbers (starting from F(1)) is always F(n+2) − 1. For n = 10, the sum is F(12) − 1 = 144 − 1 = 143, which matches adding them by hand: 1 + 1 + 2 + 3 + 5 + 8 + 13 + 21 + 34 + 55 = 143. Sum mode on this page uses that identity, so it stays instant even for large n.
To check whether a number is in the sequence, mathematicians use a surprising test: a number x is a Fibonacci number exactly when one (or both) of 5x² + 4 and 5x² − 4 is a perfect square. For 55, 5 × 55² − 4 = 15,121, and 123² = 15,121, so 55 passes the test. For 54, neither value is a perfect square, so 54 is not a Fibonacci number. The checker mode runs this test for any whole number you enter.
One warning about counting: some sources start the sequence at 1, 1, 2, 3, 5... instead of 0, 1, 1, 2, 3, 5... This calculator uses the standard modern counting, F(0) = 0 and F(1) = 1, and labels every result with its n so there is no ambiguity. If a textbook gives a different value for "the 10th Fibonacci number," it is almost always counting from F(1) = 1 as the first term.
Worked example
Find F(10), the sum of the first 10 Fibonacci numbers, and check whether 55 is a Fibonacci number.
Step 1: Build the sequence from F(0) = 0 and F(1) = 1, adding each pair: F(2) = 1, F(3) = 2, F(4) = 3, F(5) = 5, F(6) = 8, F(7) = 13, F(8) = 21, F(9) = 34, F(10) = 21 + 34 = 55.
Step 2: Sum — add F(1) through F(10): 1 + 1 + 2 + 3 + 5 + 8 + 13 + 21 + 34 + 55 = 143. The shortcut agrees: F(12) − 1 = 144 − 1 = 143.
Step 3: Check 55 — 5 × 55² − 4 = 15,125 − 4 = 15,121 = 123², a perfect square, so 55 is a Fibonacci number (it is F(10)).
Step 4: Golden ratio — F(11) ÷ F(10) = 89 ÷ 55 = 1.618182, already within 0.0002 of φ ≈ 1.618034.
So the answers are: F(10) = 55, the sum of the first 10 terms is 143, and 55 is a Fibonacci number. Try n = 10 in the calculator above, then try n = 50 to see how fast the numbers grow — F(50) is 12,586,269,025.
FAQ
What is the Fibonacci sequence?
The Fibonacci sequence starts 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55... Each term after the first two is the sum of the two terms before it, so 5 = 2 + 3 and 8 = 3 + 5. It is named after Leonardo of Pisa, known as Fibonacci, who described it in 1202.
What is the 10th Fibonacci number?
Counting from F(0) = 0, the 10th Fibonacci number is F(10) = 55. The sequence runs 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, so the tenth term after zero is 55. Some sources count from F(1) = 1 as the first term; their 10th term is also 55, because both countings list the same values from 1 onward — only the index of 0 differs.
How is the Fibonacci sequence related to the golden ratio?
As the Fibonacci numbers grow, the ratio of one term to the one before it gets closer and closer to the golden ratio, about 1.618034. For example, 55 ÷ 34 = 1.6176, and 144 ÷ 89 = 1.6180. The ratio never quite reaches the golden ratio, but it converges to it — this calculator shows the ratio for your n so you can watch it approach 1.618034.
How do you check if a number is a Fibonacci number?
A number x is a Fibonacci number exactly when one (or both) of 5x² + 4 and 5x² − 4 is a perfect square. For example, for x = 55: 5 × 55² − 4 = 15,121 = 123², so 55 is a Fibonacci number. This calculator runs that test for you in Is it Fibonacci mode.
Why does this calculator use BigInt for large n?
Fibonacci numbers grow very fast — F(100) already has 21 digits, and F(500) has 105 digits. Ordinary browser numbers lose exactness past about 15 digits, so they would give rounded, wrong answers. BigInt is exact integer arithmetic with no size limit, so this calculator returns the full, exact value even for n = 500.