Fibonacci Calculator

Form

Results

n-th term (Fn)

0

1

What is Fibonacci Calculator?

The Fibonacci sequence starts with 0 and 1, then builds each new term by adding the two preceding terms. Its opening values are 0, 1, 1, 2, 3, 5, 8 and 13. This calculator returns a term at a chosen index, rather than adding every term up to that index.

The index convention matters. On this page, the initial zero is F₀ and the following one is F₁. That means an input of 6 gives F₆ = 8, even though 8 is the seventh entry when you count the displayed list from its first position.

2

How to Use This Calculator

  1. Enter the nonnegative integer index n. Use 0 for the first term under this page’s convention.
  2. Choose Calculate to generate the sequence up to that index.
  3. For a small input, write down the two starting terms and repeatedly add the last two values.
  4. Check the index labels when comparing your result with a textbook, worksheet or another calculator.

Fractional indices and negative-index extensions are outside this form’s intended use. Large results can also exceed ordinary exact numeric storage, so use modest indices for worked examples that require an exact integer.

3

Formula Used

F₀ = 0; F₁ = 1; Fₙ = Fₙ₋₁ + Fₙ₋₂ for integers n ≥ 2.
4

Variables Explained

QuantityExplanation
nThe sequence index. It is a count, so enter a nonnegative whole number.
F₀ and F₁The fixed starting values 0 and 1. They define the particular sequence generated here.
FₙThe value at index n, obtained by repeated addition. The output is not the index itself or a cumulative sum.
5

Worked Example

To calculate F₇, start with F₀ = 0 and F₁ = 1. Then F₂ = 0 + 1 = 1, F₃ = 1 + 1 = 2, F₄ = 1 + 2 = 3, F₅ = 2 + 3 = 5, F₆ = 3 + 5 = 8, and F₇ = 5 + 8 = 13.

Checking two consecutive terms

If a calculation gives F₈ = 21 and F₉ = 34, the next value must be 21 + 34 = 55. This local check catches many copying errors. To establish the whole sequence, however, also check the starting values: other sequences can follow the same addition rule with different seeds.

A term is not the sum of the sequence

At index 5, the term is F₅ = 5. The sum from F₀ through F₅ is 0 + 1 + 1 + 2 + 3 + 5 = 12. If a question asks for a total, returning 5 answers the wrong question even though it is a correct Fibonacci term.

6

Why Use This Calculator?

This sequence is useful for practicing recurrence relations, testing a simple algorithm and studying how a rule plus starting values defines a sequence. The calculator lets you compare an independently calculated term with an iterative result.

Indexing and alternative starting lists

Some teaching materials begin the displayed list with 1, 1 and call those the first and second terms. Their nth term can therefore differ from an index that starts at zero. Write an explicit label, such as F₆, alongside the answer rather than relying only on “the sixth number.”

Precision and large indices

The implementation repeatedly adds the last two values using the server’s ordinary numeric representation. That is efficient for small examples, but it is not an arbitrary-precision sequence generator. At sufficiently large indices, exact integer digits can be lost or the result can become too large to represent. Formatting the result with commas improves readability without extending that numeric precision.

7

Common Mistakes

    • Do not count the initial zero as index 1 when following this page’s definition.
    • Include both starting values before applying the recurrence. Starting with 1 and 2 produces a shifted list.
    • Add the previous two terms, not the previous term and the current index.
    • Do not assume a rounded or extremely large output is an exact proof of a mathematical identity. Verify small examples exactly and use appropriate integer software for large ones.
8

Frequently Asked Questions

Why does the value 1 appear twice?

The first one is a starting value, F₁ = 1. The next term follows the recurrence: F₂ = F₁ + F₀ = 1 + 0 = 1. Repeated values at different indices are allowed.

Is zero a Fibonacci number here?

Yes. This page uses F₀ = 0. Its presence also makes the recurrence produce F₂ = 1 from the two starting values. When comparing lists, check whether the source includes this zero.

Will the ratio of consecutive terms always be the same?

No. Early ratios change: 2/1 = 2, 3/2 = 1.5 and 5/3 is about 1.667. For large positive indices the ratios approach the golden ratio, but finite terms generally do not have exactly that ratio.

Can the same rule produce another sequence?

Yes. Starting with 2 and 1 gives 2, 1, 3, 4, 7 and 11, which is different from the Fibonacci sequence. Both the recurrence and the starting values are necessary to specify a sequence.

How can I check a sum of several initial terms?

With the indexing used here, F₀ + F₁ + … + Fₙ = Fₙ₊₂ − 1. For n = 5, the sum is 12 and F₇ − 1 = 13 − 1 = 12. This identity is a check on a cumulative sum, not a change to what the calculator returns for an individual index.

9

Sources & References