Fibonacci Calculator

Fibonacci Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

Fn=φn−(1−φ)n5,φ=1+52F_{\text{n}} = \frac{\varphi^{\text{n}} - (1-\varphi)^{\text{n}}}{\sqrt{5}}, \qquad \varphi = \frac{1+\sqrt{5}}{2}
Show calculation steps (1)
  1. Sum of Fibonacci Terms F(0) to F(n)

    ∑i=0nFi=Fn+2−1\sum_{i=0}^{\text{n}} F_i = F_{\text{n}+2} - 1

    Sum of the first terms equals F(n+2) - 1

Usage stats

Advertisement

Results

Fibonacci number F(30)
832,040
value of the nth term
Term position (n) 30
Sum F(0)…F(n) 2,178,308
Binet (golden-ratio) estimate 832,040

Report an error on this page

What is the Fibonacci sequence?

The Fibonacci sequence is one of the most famous patterns in mathematics. It starts with 0 and 1, and every following number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. This Fibonacci calculator finds the value of the nth term, plus the running sum of all terms up to that point.

Fibonacci spiral formed by quarter arcs through nested squares
The Fibonacci sequence grows by adding the two previous terms, producing the famous spiral.

How to use the calculator

Enter the term position n (the index of the number you want, starting from 0) and submit. The calculator returns F(n), the cumulative sum \(F(0)+F(1)+\ldots+F(n)\), and the golden-ratio estimate from Binet's formula. Values up to \(n = 90\) are supported with full integer accuracy.

The formula explained

Two methods give the same answer. The simplest is the recursive rule \(F(n) = F(n-1) + F(n-2)\). The elegant closed form is Binet's formula, which uses the golden ratio \(\varphi = \frac{1+\sqrt{5}}{2} \approx 1.618\).

$$F_{\text{n}} = \frac{\varphi^{\text{n}} - (1-\varphi)^{\text{n}}}{\sqrt{5}}, \qquad \varphi = \frac{1+\sqrt{5}}{2}$$

Because the second term \(\psi^{\text{n}}\) shrinks toward zero, F(n) is extremely close to \(\varphi^{\text{n}}/\sqrt{5}\), so rounding to the nearest integer gives the exact Fibonacci number. This calculator computes the result iteratively for perfect precision and also shows the Binet estimate for comparison.

Advertisement
Diagram of the golden ratio phi from a line segment divided in golden proportion
Binet's formula uses the golden ratio \(\varphi = \frac{1+\sqrt{5}}{2}\).

Worked example

For \(n = 10\): the sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. So \(F(10) = 55\). The sum of the first eleven terms (F(0) through F(10)) is

$$\sum_{i=0}^{10} F_i = F_{12} - 1 = 144 - 1 = 143$$

The Binet estimate \(\varphi^{10}/\sqrt{5} \approx 55.0036\), which rounds to 55.

Advertisement

Fibonacci Numbers Reference Table (F(0) to F(20))

The Fibonacci sequence starts with F(0) = 0 and F(1) = 1. Every later term is the sum of the two before it: F(n) = F(n−1) + F(n−2). The cumulative sum of the first terms follows the identity \(S(n) = F(0) + F(1) + \dots + F(n) = F(n+2) - 1\).

n F(n) S(n) = F(n+2) − 1
0 0 0
1 1 1
2 1 2
3 2 4
4 3 7
5 5 12
6 8 20
7 13 33
8 21 54
9 34 88
10 55 143
11 89 232
12 144 376
13 233 609
14 377 986
15 610 1596
16 987 2583
17 1597 4180
18 2584 6764
19 4181 10945
20 6765 17710

Larger milestones

n F(n)
30 832040
40 102334155
50 12586269025
90 2880067194370816120

Check of the sum identity: S(10) = 0+1+1+2+3+5+8+13+21+34+55 = 143 = F(12) − 1 = 144 − 1.

FAQ

Does the sequence start at 0 or 1? This tool uses the standard convention \(F(0)=0\) and \(F(1)=1\), so position 0 returns 0.

Why limit n to 90? F(90) is about \(2.88 \times 10^{18}\), near the limit of exact 64-bit integer arithmetic. Beyond this, floating-point rounding could cause errors.

What is the golden ratio's connection? The ratio of consecutive Fibonacci numbers \(F(n+1)/F(n)\) converges to \(\varphi \approx 1.6180339887\) as n grows large.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators