Skip to content
Omnikalc

Fibonacci numbers: the nth term, the sum and the golden ratio

Find the nth Fibonacci number with Binet's formula, the sum of the first n terms, the Lucas number and the ratio that approaches the golden ratio, and check whether a number belongs to the sequence.

Updated on
Your inputs

Value out of range

Value out of range

Results

Fibonacci number F(n)

6,765

Previous term F(n − 1)
4,181
Next term F(n + 1)
10,946
Sum F(1) + … + F(n)
17,710
Ratio F(n) ÷ F(n − 1)
1.618033963
Tends to the golden ratio φ = 1.6180339887…
Lucas number L(n)
15,127
Is the number to check a Fibonacci number? (1 = yes)
1
Yes, it is a Fibonacci number
Its position in the sequence
12

The sequence behind spirals and rabbits

Start with 0 and 1, then keep adding the last two numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144… This is the Fibonacci sequence, named after Leonardo of Pisa, who used it in his 1202 book Liber Abaci in a puzzle about how fast rabbits breed. Indian mathematicians had described it centuries earlier in the study of poetic meters. The sequence appears in surprising places, from the spirals of sunflower seeds and pine cones to algorithms and financial charts.

Definition

F(0) = 0, F(1) = 1, and F(n) = F(n − 1) + F(n − 2)

n 0 1 2 3 4 5 6 7 8 9 10 11 12
F(n) 0 1 1 2 3 5 8 13 21 34 55 89 144

Binet’s formula

Computing F(100) by adding term after term is tedious. Binet’s formula, published by Jacques Binet in 1843 (and known earlier to de Moivre), gives any term directly:

F(n) = (φⁿ − ψⁿ) ÷ √5, where φ = (1 + √5) ÷ 2 ≈ 1.6180339887 is the golden ratio and ψ = (1 − √5) ÷ 2 ≈ −0.618.

Because |ψ| is less than 1, ψⁿ quickly becomes negligible, so F(n) is simply φⁿ ÷ √5 rounded to the nearest whole number. The calculator uses this and works up to n = 78, the largest term it can display exactly.

Worked example

For n = 20:

  • F(20) = φ²⁰ ÷ √5 rounded = 6,765.
  • Previous term F(19) = 4,181; next term F(21) = 10,946.
  • Sum of the first 20 terms: F(22) − 1 = 17,710.
  • Ratio F(20) ÷ F(19) = 1.618033963, already within 0.00000003 of φ.
  • Lucas number L(20) = 15,127.

Useful properties

  • Sum: F(1) + F(2) + … + F(n) = F(n + 2) − 1.
  • Ratio: F(n + 1) ÷ F(n) tends to φ as n grows.
  • Test: a whole number x is a Fibonacci number exactly when 5x² + 4 or 5x² − 4 is a perfect square. For 144, 5 × 144² + 4 = 103,684 = 322², so 144 is F(12).
  • Divisibility: F(m) divides F(n) whenever m divides n; for example F(3) = 2 divides every third term.
  • Lucas numbers: 2, 1, 3, 4, 7, 11, 18… follow the same rule with a different start, and L(n) = φⁿ + ψⁿ.

In nature and elsewhere

Many plants arrange leaves and seeds at angles related to the golden ratio, so counting the spirals on a sunflower head or a pine cone often gives consecutive Fibonacci numbers such as 34 and 55. In computer science, Fibonacci numbers appear in the analysis of algorithms and data structures such as Fibonacci heaps. Traders use “Fibonacci retracements”, though there is little evidence that markets respect them.

Frequently asked questions

What is the Fibonacci sequence?

A sequence in which each number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 and so on. Leonardo of Pisa, known as Fibonacci, used it in 1202 in a puzzle about breeding rabbits, though it was known earlier in Indian mathematics.

What is Binet's formula?

F(n) = (φⁿ − ψⁿ) ÷ √5, where φ = (1 + √5) ÷ 2 ≈ 1.618 is the golden ratio and ψ = (1 − √5) ÷ 2. Because ψⁿ becomes tiny, F(n) is simply φⁿ ÷ √5 rounded to the nearest whole number.

How can I tell if a number is a Fibonacci number?

A whole number x is a Fibonacci number exactly when 5x² + 4 or 5x² − 4 is a perfect square. For 144, 5 × 144² + 4 = 103,684 = 322², so 144 is a Fibonacci number: F(12).

Why does the ratio approach the golden ratio?

Dividing each term by the one before gives 1, 2, 1.5, 1.667, 1.6, 1.625… which converges to φ = 1.6180339887…. The sum of the first n terms equals F(n + 2) − 1.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.