Fibonacci

Compute the nth Fibonacci number and view the complete sequence up to that term. Free online Fibonacci calculator for students, traders, and math enthusiasts.

Calculate Fibonacci number

About This Calculator

The Fibonacci sequence is one of the most famous number patterns in mathematics. It begins with 0 and 1, and each subsequent number is the sum of the two preceding numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and so on. Named after the Italian mathematician Leonardo Fibonacci, who introduced it to Europe in his 1202 book Liber Abaci, this sequence appears throughout nature, art, science, and finance.

Our Fibonacci calculator computes the nth Fibonacci number F(n) using the standard recurrence relation F(n) = F(n-1) + F(n-2) with base cases F(0) = 0 and F(1) = 1. It also generates the complete Fibonacci sequence from F(0) up to F(n) as a comma-separated list, allowing you to see the full progression of numbers.

This calculator accepts any non-negative integer input. For larger values of n (up to approximately 78), the results remain exact within JavaScript's integer precision. The tool is useful for students studying number theory and sequences, traders using Fibonacci retracement levels in technical analysis, programmers exploring recursive algorithms, and anyone curious about this fascinating mathematical pattern.

Regional Notes

The Fibonacci sequence is studied globally in mathematics curricula. In India, it is introduced in CBSE and state board mathematics courses. In the US, it appears in middle school and high school math enrichment programs. In the UK, the Fibonacci sequence is covered in GCSE mathematics. The recurrence definition and properties are identical across all educational systems worldwide.

Frequently Asked Questions

What is the Fibonacci sequence?

The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. It starts with 0 and 1, and then continues: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, and so on. The sequence was introduced to Western mathematics by Leonardo Fibonacci in 1202.

How do you calculate the nth Fibonacci number?

The nth Fibonacci number F(n) is defined recursively: F(0) = 0, F(1) = 1, and F(n) = F(n-1) + F(n-2) for n >= 2. This calculator uses this recurrence to generate both the value and the full sequence up to n.

What are some real-world applications of the Fibonacci sequence?

The Fibonacci sequence appears in nature (flower petal arrangements, pinecone spirals, nautilus shells), computer science (search algorithms, data structures), financial markets (Fibonacci retracement levels for trading), and art and architecture (the golden ratio derived from consecutive Fibonacci terms).

What is the relationship between Fibonacci and the golden ratio?

As n increases, the ratio of consecutive Fibonacci numbers F(n)/F(n-1) approaches the golden ratio φ ≈ 1.618034. For example, 55/34 ≈ 1.6176, and 89/55 ≈ 1.6182. This connection makes the Fibonacci sequence fundamental to understanding the golden ratio in mathematics and design.

How is the Fibonacci sequence used in trading?

Traders use Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) derived from the Fibonacci sequence to identify potential support and resistance levels in financial markets. These levels help predict price pullbacks during trends and are widely used in stock, forex, and cryptocurrency trading.

Can Fibonacci numbers be negative?

The standard Fibonacci sequence is defined for non-negative integers. However, a negafibonacci sequence can be defined for negative indices using the identity F(-n) = (-1)ⁿ⁺¹ x F(n). Our calculator accepts only non-negative integer inputs for the standard Fibonacci sequence.

How large of a Fibonacci number can this calculator handle?

This calculator can compute Fibonacci numbers up to large values using JavaScript's number precision. For inputs up to n = 78, F(n) stays within the range of exact integer representation in JavaScript (below 2^5^3). For larger inputs, the result is an approximation due to floating-point limitations.