Browse Definitions :

Fibonacci sequence

What is the Fibonacci sequence?

The Fibonacci sequence is a set of integers (the Fibonacci numbers) that starts with a zero, followed by a one, then by another one, and then by a series of steadily increasing numbers. The sequence follows the rule that each number is equal to the sum of the preceding two numbers.

The Fibonacci sequence begins with the following 14 integers:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 ...

Each number, starting with the third, adheres to the prescribed formula. For example, the seventh number, 8, is preceded by 3 and 5, which add up to 8.

The sequence can theoretically continue to infinity, using the same formula for each new number. Some resources show the Fibonacci sequence starting with a one instead of a zero, but this is fairly uncommon.

Calculating the Fibonacci sequence

The Fibonacci sequence can be calculated mathematically. In this approach, each number in the sequence is considered a term, which is represented by the expression Fn. The n reflects the number's position in the sequence, starting with zero. For example, the sixth term is referred to as F5, and the seventh term is referred to as F6.

Using this numbering, the Fibonacci sequence can be defined by the following three equations:

  • F0 = 0 (applies only to the first integer)
  • F1 = 1 (applies only to the second integer)
  • Fn = Fn-1 + Fn-2 (applies to all other integers)

The first two equations are essentially stating that the term in the first position equals 0 and the term in the second position equals 1. The third equation is a recursive formula, which means that each number of the sequence is defined by using the preceding numbers. For example, to define the fifth number (F4), the terms F2 and F3 must already be defined. These two numbers, in turn, require that the numbers preceding them are already defined. The numbers continuously build on each other throughout the sequence.

The following table shows the position of each term, along with its Fn value and Fibonacci number, starting with the first term and ending with the 14th.

Term position

Fn value

Fibonacci number











































You can try out the formula for yourself, using the table to find the sequence numbers preceding the target term value. For example, the following calculation finds the Fibonacci number for the term in the tenth position (F9):

F9 = F9-1 + F9-2 = F8 + F7 = 21 + 13 = 34

The challenge with a recursive formula is that it always relies on knowing the previous Fibonacci numbers in order to calculate a specific number in the sequence. For example, you can't calculate the value of the 100th term without knowing the 98th and 99th terms, which requires that you know all the terms before them. There are other equations that can be used, however, such as Binet's formula, a closed-form expression for finding Fibonacci sequence numbers. Another option it to program the logic of the recursive formula into application code such as Java, Python or PHP and then let the processor do the work for you.

History of the Fibonacci sequence

The Fibonacci sequence is named for Leonardo Pisano (also known Fibonacci), an Italian mathematician who lived from 1170 to 1250. Fibonacci considered the sequence to be an answer to the following question:

"How many pairs of rabbits will be produced in a year, beginning with a single pair, if in every month each pair bears a new pair which becomes productive from the second month on?" The result can be expressed numerically as 1, 1, 2, 3, 5, 8, 13, 21, 34 ...

A Sanskrit grammarian, Pingala, is credited with the first mention of the sequence of numbers, sometime between the fifth century B.C. and the second or third century A.D. Since Fibonacci introduced the series to Western civilization, it has had a high profile from time to time. In The Da Vinci Code, for example, the Fibonacci sequence is part of an important clue. Another application, the Fibonacci poem, is a verse in which the progression of syllable numbers per line follows Fibonacci's pattern.

Fibonacci numbers can also be used to define a spiral and are of interest to biologists and physicists because they are frequently observed in various natural objects and phenomena. The branching patterns in trees and leaves, for example, and the distribution of seeds in a raspberry reflect the Fibonacci sequence.

Diagram illustrating Fibonacci numbers spiral
Fibonacci numbers can be illustrated as a spiral with squares representing the widths of the numbers in the sequence. The squares fit nicely together, forming the spiral. In this example, 5 plus 8 equals 13, then 8 plus 13 add up to 21, etc.

The Fibonacci sequence is often associated with the golden ratio, a proportion (roughly 1:1.6) that occurs frequently throughout the natural world and is applied across many areas of human endeavor. Both the Fibonacci sequence and the golden ratio are used to guide design for architecture, websites and user interfaces, among other things.

See also: glossary of mathematical terms and algorithms, mathematical symbols.

This was last updated in May 2022

Continue Reading About Fibonacci sequence

  • local area network (LAN)

    A local area network (LAN) is a group of computers and peripheral devices that are connected together within a distinct ...

  • TCP/IP

    TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect ...

  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

  • identity management (ID management)

    Identity management (ID management) is the organizational process for ensuring individuals have the appropriate access to ...

  • fraud detection

    Fraud detection is a set of activities undertaken to prevent money or property from being obtained through false pretenses.

  • single sign-on (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for ...

  • change management

    Change management is a systematic approach to dealing with the transition or transformation of an organization's goals, processes...

  • IT project management

    IT project management is the process of planning, organizing and delineating responsibility for the completion of an ...

  • chief financial officer (CFO)

    A chief financial officer (CFO) is the corporate title for the person responsible for managing a company's financial operations ...

  • core HR (core human resources)

    Core HR (core human resources) is an umbrella term that refers to the basic tasks and functions of an HR department as it manages...

  • HR service delivery

    HR service delivery is a term used to explain how an organization's human resources department offers services to and interacts ...

  • employee retention

    Employee retention is the organizational goal of keeping productive and talented workers and reducing turnover by fostering a ...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...