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. Numbers beyond about n = 78 go through floating-point arithmetic and may lose their last digits, so treat very large results as approximate.

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 (0, 1, 1, 2, 3, 5, 8, 13...) — using either the recurrence relation or Binet's closed-form formula for large values of n.

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. Just enter which position in the sequence you want.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators