Fibonacci Series Generator
Generate the Fibonacci sequence up to any n-th term and instantly get the sum of all terms. Enter n, and the calculator lists F(0) through F(n) using the recurrence F(n) = F(n-1) + F(n-2).
Fibonacci Series Calculator
Fibonacci Number Formula
Where:
- \(F(n)\) — the \(n\)-th Fibonacci number
- \(F(n-1)\), \(F(n-2)\) — the two previous terms of the sequence
This recurrence relation defines each term as the sum of the two preceding ones, starting from 0 and 1. The sequence begins \(0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, \ldots\)
A closed-form expression also exists, known as Binet's formula:
\[ F(n) = \frac{\varphi^n - \psi^n}{\sqrt{5}}, \quad \varphi = \frac{1 + \sqrt{5}}{2}, \; \psi = \frac{1 - \sqrt{5}}{2} \]
Here \(\varphi \approx 1.618\) is the golden ratio, which the ratio of consecutive Fibonacci numbers approaches as \(n\) grows.
Fibonacci Series – Calculation Example
Example: generate the Fibonacci series up to the 10th term, with \(n = 10\).
\[ F(0) = 0, \; F(1) = 1 \]
\[ F(2) = 1 + 0 = 1, \quad F(3) = 1 + 1 = 2, \quad F(4) = 2 + 1 = 3 \]
\[ F(5) = 3 + 2 = 5, \quad F(6) = 5 + 3 = 8, \quad F(7) = 8 + 5 = 13 \]
\[ F(8) = 13 + 8 = 21, \quad F(9) = 21 + 13 = 34, \quad F(10) = 34 + 21 = 55 \]
Result: the sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, and the total (sum) is 143.
How to Use the Fibonacci Series Calculator
- Enter the desired term count in the "nᵗʰ term (n)" field (for example, 10).
- The calculator generates the full sequence from \(F(0)\) up to \(F(n)\).
- Read the "Fibonacci sequence" result to see every term listed in order.
- Read the "Fibonacci total (sum)" result to get the sum of all generated terms.
What Is the Fibonacci Series?
The Fibonacci series is one of the most famous number sequences in mathematics. Each term is the sum of the two terms before it: starting from 0 and 1, you get 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. The sequence is named after the Italian mathematician Leonardo of Pisa, known as Fibonacci, who introduced it to European mathematics in 1202 through his book Liber Abaci, where it modeled the growth of a rabbit population.
The series has a remarkable property: as \(n\) increases, the ratio \(F(n+1)/F(n)\) converges to the golden ratio \(\varphi \approx 1.618\). This connection links Fibonacci numbers to geometry, art, and architecture. In nature, Fibonacci numbers appear in the spirals of sunflowers and pinecones, the arrangement of leaves on a stem (phyllotaxis), and the branching patterns of trees.
Beyond mathematics, the sequence is widely used in computer science. It illustrates recursion, dynamic programming, and memoization, and it appears in algorithms such as the Fibonacci search technique and the Fibonacci heap data structure. The sum of the first terms also has a neat closed form: the sum \(F(0) + F(1) + \cdots + F(n)\) always equals \(F(n+2) - 1\). You can verify this with the example above: \(F(12) - 1 = 144 - 1 = 143\).
If you are studying number sequences, you may also want to compare the Fibonacci series with a Geometric Progression, where each term is multiplied by a constant ratio instead of added.
Notes and Limitations
- The calculator counts terms from \(F(0) = 0\), so entering \(n = 10\) produces \(n + 1 = 11\) numbers: \(F(0)\) through \(F(10)\).
- Values of \(n\) below 1 are invalid; the minimum allowed input is 1.
- Fibonacci numbers grow exponentially. For very large \(n\), the terms and their sum become huge, and the results are displayed as rounded JavaScript numbers, losing precision beyond \(2^{53}\) (around \(n = 78\)).
- Some sources start the sequence at 1, 1 instead of 0, 1. Both conventions describe the same underlying sequence; this calculator uses the standard indexing with \(F(0) = 0\).
- The sum result uses the identity \(F(0) + F(1) + \cdots + F(n) = F(n+2) - 1\), which is a quick way to check the calculator's output by hand.
Quick Reference Table
| n | F(n) | Sum F(0)…F(n) |
|---|---|---|
| 1 | 1 | 1 |
| 5 | 5 | 12 |
| 10 | 55 | 143 |
| 15 | 610 | 1,596 |
| 20 | 6,765 | 17,710 |
For related tools, try the Binomial Coefficient calculator or solve equations with the Quadratic Equation calculator.
Frequently Asked Questions
How do I calculate Fibonacci numbers by hand?
Start with 0 and 1, then add the last two numbers to get the next one: 0, 1, 1, 2, 3, 5, 8, and so on. To find \(F(n)\), keep adding pairs until you reach the \(n\)-th term. To check your work quickly, remember that the sum \(F(0) + F(1) + \cdots + F(n)\) always equals \(F(n+2) - 1\).
Why does entering n = 10 give me 11 numbers?
The calculator starts counting at \(F(0) = 0\), so \(n = 10\) produces \(F(0)\) through \(F(10)\) — that is 11 terms in total. This is the standard mathematical indexing. If you expect 10 numbers starting from 1, simply enter \(n = 9\) or adjust your count by one.
What are the first 20 Fibonacci numbers?
The sequence up to \(F(20)\) is: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765. The sum of all these terms is 17,710, which you can verify with the identity \(F(22) - 1 = 17711 - 1\).
Can this calculator handle very large values of n?
Only up to about \(n = 78\) with full precision. JavaScript numbers lose accuracy beyond \(2^{53}\), so Fibonacci numbers larger than that are shown rounded. \(F(78)\) is roughly 8.9 quadrillion, close to this limit. For exact values of larger terms you would need a big-integer library or a programming language with arbitrary-precision arithmetic.
Some sources start the Fibonacci sequence with 1, 1 — which is correct?
Both conventions describe the same sequence. This calculator uses the standard indexing \(F(0) = 0, F(1) = 1\), which is what most modern mathematics references use. Starting at 1, 1 simply skips the initial zero and shifts all indices by one, so \(F(6) = 8\) here equals the sixth number in the 1, 1, 2, 3, 5, 8 list.
What happens if I enter 0 or a negative number?
The calculator returns "Invalid input" because the minimum allowed value is \(n = 1\). There is no term before \(F(0)\) to generate, and negative inputs fall outside the sequence's standard definition. If you enter \(n = 1\), you get just 0 and 1 with a sum of 1.
How is the Fibonacci sequence related to the golden ratio?
As \(n\) grows, the ratio of consecutive terms \(F(n+1)/F(n)\) gets closer and closer to the golden ratio \(\varphi \approx 1.618\). For example, 55/34 ≈ 1.6176. This is why Binet's closed-form formula, \(F(n) = (\varphi^n - \psi^n)/\sqrt{5}\), can compute any Fibonacci number directly without iterating through the whole sequence.