Nth Fibonacci Number Calculator

Find the nth Fibonacci number.

How it is calculated

The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, … and each term is the sum of the two before it: F(n) = F(n−1) + F(n−2), with F(1) = F(2) = 1. This tool counts from 1, so n = 1 gives 1 and n = 10 gives 55; there is no F(0) input. The engine does not use a closed-form formula: it starts with 0 and 1 and adds step by step n − 1 times, so each answer is exact for the position you ask. Accepted n is a whole number from 1 to 90; decimals are cut to a whole number and anything outside the range returns nothing. Every result from n = 1 to 90 is exact, with no floating-point loss.

Worked example

Ask for the 20th Fibonacci number. The sequence runs 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1,597, 2,584, 4,181 and then the 20th term is the sum of the previous two: 2,584 + 4,181 = 6,765. The tool shows 6,765 for n = 20. The ratio of the 20th term to the 19th is 6,765 / 4,181 ≈ 1.618, which is close to the golden ratio.

Try this example →

Common mistakes

  • Counting from F(0) = 0. Here the first term is 1 and n = 10 gives 55. A source that starts with a leading 0 treats the same number as one position later.
  • Assuming the answer comes from Binet's formula with a rounded golden ratio. The tool adds the terms, which stays exact for the allowed range.
  • Entering n above 90 or a negative number and expecting a result; the tool returns nothing for values outside 1 to 90.
  • Confusing the position with the value: n = 20 asks for the 20th number in the sequence, not for a number below 20.

About this calculator

This calculator finds the nth Fibonacci number — from the sequence where each number is the sum of the two before it (1, 1, 2, 3, 5, 8, 13...) — by adding the terms step by step (no closed-form formula) for any position n from 1 to 90.

Computer science students use it as a classic exercise in recursion, memoization and algorithmic complexity, and math enthusiasts use it to explore where the sequence shows up in nature, art and the golden ratio.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    A neat sanity check is the ratio of neighbouring terms. Run n = 20 and n = 21, then divide: 10,946 ÷ 6,765 is about 1.61803, already very close to the golden ratio. If your textbook or code starts at F(0) = 0, the numbering still matches this tool for every n from 1 upward, so F(10) is 55 in both. Where do you run into Fibonacci numbers, in coursework, code or design?

Popular calculators

All Calculators