Math

Fibonacci nth Term

Compute the nth Fibonacci number with F0 = 0 and F1 = 1, with the recurrence, a worked example for F20 and a note on the golden ratio.

Inputs

Results update as you type — essentials first

Saved scenarios

Store input snapshots on this device — load anytime.

No saved scenarios yet.

Formula / how it works

F₀ = 0, F₁ = 1, Fₙ = Fₙ₋₁ + Fₙ₋₂. So 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, … The ratio Fₙ₊₁ ÷ Fₙ approaches the golden ratio ≈ 1.618.

Detailed guide

What it is, how to use it, how to read the numbers, common mistakes, a worked example, formulas, and FAQs.

What this calculator is

Each Fibonacci number is the sum of the two before it, starting from 0 and 1. The sequence appears in counting problems, such as the number of ways to climb stairs taking one or two steps at a time, in algorithm analysis, and in patterns in nature such as spirals in some plants. This calculator returns the nth term using zero-based indexing, so F0 = 0 and F1 = 1. It limits n to 78, because F78 is the largest Fibonacci number below the limit of exact integers in standard floating-point arithmetic (about 9 × 10¹⁵). For larger terms, use arbitrary-precision tools.

When to use / who it helps

  • You need a specific Fibonacci number for a maths problem.
  • You are checking code that generates the sequence.
  • You are exploring the golden ratio.
  • You want to count ways of tiling or climbing with steps of size 1 or 2.
  • You are studying recurrence relations.

How to use

Steps

  1. Enter n, the index of the term you want.
  2. Remember that indexing starts at zero.
  3. Read F(n).
  4. Check by adding the two previous terms.
  5. Divide consecutive terms to see the ratio approach 1.618.
  6. Use larger-number software for n above 78.

How to interpret results

  • F(n) grows roughly by a factor of 1.618 each step.
  • The sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55.
  • Every third Fibonacci number is even.
  • Index conventions differ; some sources start at F1 = 1, F2 = 1.
  • F(78) is the last term guaranteed exact here.

Common mistakes & gotchas

  • Starting the index at 1 when the tool starts at 0.
  • Expecting exact results above n = 78.
  • Adding the wrong pair of terms.
  • Confusing the sequence with powers of two.
  • Entering a negative or decimal n.

Worked example

Worked example — F20

  1. Terms: F10 = 55, F11 = 89, F12 = 144, F13 = 233, F14 = 377, F15 = 610.
  2. Continuing the recurrence: F16 = 987, F17 = 1,597, F18 = 2,584, F19 = 4,181.
  3. F20 = F19 + F18 = 4,181 + 2,584 = 6,765.
  4. Ratio check: 6,765 ÷ 4,181 ≈ 1.61803, close to the golden ratio.

Result: F(20) = 6,765.

To load the form's own demo values, tap Try example above the Calculate button.

How to calculate / formula

F₀ = 0, F₁ = 1, Fₙ = Fₙ₋₁ + Fₙ₋₂. So 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, … The ratio Fₙ₊₁ ÷ Fₙ approaches the golden ratio ≈ 1.618.

Frequently asked questions

What is the Fibonacci sequence?

A sequence where each term is the sum of the previous two, starting 0, 1.

Does the sequence start at 0 or 1?

Conventions vary. This tool uses F0 = 0 and F1 = 1.

What is the golden ratio connection?

The ratio of consecutive terms approaches (1 + √5) ÷ 2 ≈ 1.618.

Why is n limited to 78?

Beyond that, values exceed the range where JavaScript numbers represent integers exactly.

Where do Fibonacci numbers appear?

In counting problems, algorithms, and some patterns in nature.

Is there a closed formula?

Yes, Binet's formula, though it needs high precision for large n.