acalculator

What is the nth Fibonacci number?

Type a term number n. The Fibonacci calculator adds the sequence up from F(0) = 0 and F(1) = 1 and gives F(n) exactly, every digit, with the terms before it and the ratio of the last two terms.

Your numbers

F(n)
55

F(10) = 55.

Digits
2
F(n) ÷ F(n − 1)
1.617647059
Terms
F(0) to F(10): 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55

F(n): 55. F(10) = 55.

How to calculate

Finds the nth Fibonacci number F(n) exactly for n from 0 to 1,000, with the terms before it and the ratio of consecutive terms, which approaches the golden ratio.

Example with the default inputs (Term number n 10): F(10) = 55.

Method: F(0) = 0, F(1) = 1, F(n) = F(n − 1) + F(n − 2), added in exact whole numbers.

  • The sequence starts F(0) = 0, F(1) = 1, so F(1) = F(2) = 1 match OpenStax’s a₁ and a₂.
  • n is a whole number from 0 to 1000.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Term number n 10 gives F(n) 55, Digits 2, F(n) ÷ F(n − 1) 1.617647059, Terms F(0) to F(10): 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55.Source: OpenStax, Algebra and Trigonometry 2e, §13.1 Sequences and Their Notations (Fibonacci: a₁ = a₂ = 1, aₙ = aₙ₋₁ + aₙ₋₂; a₁₀ = 34 + 21 = 55), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-1-sequences-and-their-notations
  2. Term number n 50 gives F(n) 12,586,269,025, Digits 11.
  3. Term number n 100 gives F(n) 354,224,848,179,261,915,075, Digits 21, F(n) ÷ F(n − 1) 1.618033989.
  4. Term number n 0 gives F(n) 0, Digits 1, Terms F(0) to F(0): 0.

How it works

  • F(0) = 0, F(1) = 1, and F(n) = F(n − 1) + F(n − 2) for n ≥ 2.
  • The terms are added in exact whole numbers of any size, so F(n) has every digit.
  • Ratio: F(n) ÷ F(n − 1), shown from n = 2. It approaches the golden ratio φ = (1 + √5) ÷ 2.

This start matches OpenStax’s a₁ = a₂ = 1: F(n) = aₙ for n ≥ 1.

Rules. n is a whole number from 0 to 1,000.

Output format. F(n) is written in full with thousands commas (12,586,269,025). Digits is the count of its digits (F(0) = 0 has 1). The ratio is the exact fraction rounded half up to 10 significant figures. The terms list shows F(m) to F(n), with m = n − 19 or 0, whichever is larger (at most 20 terms), written without commas and separated by commas.

Worked examples by hand

F(10). 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55: F(10) = 55 (2 digits), as OpenStax’s a₁₀ = 34 + 21 = 55. Ratio 55 ÷ 34 = 1.617647059.

F(50) = 12,586,269,025 (11 digits) and F(100) = 354,224,848,179,261,915,075 (21 digits), from the same additions; F(100) ÷ F(99) = 1.618033989, φ to 10 significant figures.

F(0) = 0, by definition; the list is just 0.

Other questions people ask

What is the Fibonacci sequence?

Each term is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, … The rule is F(n) = F(n − 1) + F(n − 2), starting from F(0) = 0 and F(1) = 1.

What is the 10th Fibonacci number?

55. F(10) = F(9) + F(8) = 34 + 21 = 55. OpenStax starts the count at a₁ = 1, a₂ = 1 and also gets a₁₀ = 55, because F(1) = F(2) = 1 here too.

Does the sequence start at 0 or 1?

Both are in use. This calculator uses F(0) = 0 and F(1) = 1, the common convention. From F(1) on, the terms match a sequence that starts 1, 1, so F(n) is the same in both counts for n ≥ 1.

What does the ratio of Fibonacci numbers approach?

F(n) ÷ F(n − 1) approaches the golden ratio φ = (1 + √5) ÷ 2 ≈ 1.618033989. F(10) ÷ F(9) = 55 ÷ 34 ≈ 1.617647059, and by F(100) the ratio agrees with φ to 10 significant figures.

Is there a formula for F(n) without adding up the terms?

Yes, Binet’s formula: F(n) = (φⁿ − ψⁿ) ÷ √5 with ψ = (1 − √5) ÷ 2. With floating point it loses digits for large n, so this calculator adds the terms in exact whole numbers instead.

How large can n be?

n can be 0 to 1,000. F(1000) has 209 digits, and every digit is shown.