Mathematics calculator

Fibonacci Calculator

Find an exact Fibonacci number by index, including values larger than native integer arithmetic can store.

Calculator inputs

Enter your values

Exact sequence value
Calculated output

Result summary

Your result will appear here

Complete the required fields and select the calculate button.

Fibonacci terms arranged beside adjoining squares and a spiral
Each term is the sum of the two terms immediately before it.
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 a whole-number index from 0 through 5,000. Use 0 for the first term under this page’s convention.
  2. Choose Calculate to generate that exact term.
  3. Review the neighboring terms and digit count shown with the answer.
  4. For a small input, write down the two starting terms and repeatedly add the last two values as a check.

Fractional indices and negative-index extensions are outside this form’s intended use. The calculator uses decimal-string addition so every displayed digit remains exact throughout the supported range.

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 an algorithm and studying how a rule plus starting values defines a sequence. The previous and next outputs provide a direct local check: adding the previous term to the result must produce the next term.

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.”

Exact large terms

The implementation adds nonnegative integer strings one digit at a time rather than relying on a fixed-size server integer. Commas are inserted only after the calculation. This keeps every displayed digit exact through the supported maximum index of 5,000.

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 mistake Fₙ for the sum of all terms through n; those are different quantities.
  • Do not enter a negative or fractional index. This page accepts whole-number indices from 0 through 5,000.
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