Saved

Press the star next to a tool's name to save it.

All my tools

Fibonacci Calculator

This Fibonacci calculator finds the nth Fibonacci number exactly, even with thousands of digits, lists the sequence, and checks whether a number is a Fibonacci number.

Restored your last values ·

The sequence starts F0 = 0, F1 = 1. The calculator works with exact whole numbers, so even F10000, which has 2,090 digits, is exact.

Everything is worked out in your browser. Nothing is uploaded.

Result

–

Choose what you want and press Calculate.

Recent results
See full result

A Fibonacci calculator finds any number in the Fibonacci sequence, lists the sequence, or checks whether a number belongs to it. Enter a position and this Fibonacci calculator gives F(n) exactly, however many digits it has, along with the ratio to the previous number, which approaches the golden ratio. Switch modes to list the first numbers of the sequence or to test any whole number.

How to use the Fibonacci calculator

  1. Choose what you want: find the nth number, list the sequence, or check a number.
  2. Enter a whole number: a position up to 10,000, a count up to 500, or the number to check.
  3. Press Calculate. Long results appear in a box you can copy.

What the Fibonacci sequence is

In the Fibonacci sequence, each number is the sum of the two before it. Many authors start with a zeroth number, F0 = 0, followed by F1 = 1 and F2 = 1, so the sequence begins 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 and continues for ever. This calculator uses that convention.

F(n) = F(n − 1) + F(n − 2), with F(0) = 0 and F(1) = 1

A little history

The numbers were described in Indian mathematics as early as 200 BC, in work by Pingala on the patterns of Sanskrit poetry made from syllables of two lengths. They're named after the Italian mathematician Leonardo of Pisa, known as Fibonacci, who introduced the sequence to Western European mathematics in his book Liber Abaci in 1202.

Worked examples

  • F(10) = 55. Counting from F0: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55.
  • F(50) = 12,586,269,025.
  • F(100) = 354,224,848,179,261,915,075, a 21-digit number.
  • Is 144 a Fibonacci number? Yes, it's F12.
  • Is 100 a Fibonacci number? No: it falls between 89 and 144.

The golden ratio

Fibonacci numbers are closely tied to the golden ratio, φ, about 1.6180339887. Binet's formula expresses the nth Fibonacci number in terms of n and the golden ratio, and it implies that the ratio of two consecutive Fibonacci numbers gets closer and closer to φ as n increases. You can see this in the results: F(10) ÷ F(9) is 55 ÷ 34, about 1.6176, while F(20) ÷ F(19) already matches φ to seven decimal places.

Exact answers for huge numbers

Fibonacci numbers grow fast: F(100) already has 21 digits, and ordinary calculator arithmetic can only hold about 15 or 16 significant digits. This calculator works with exact whole numbers of any length, using a method called fast doubling that finds F(n) in a handful of steps, so F(10000), which has 2,090 digits, comes out exactly. Large results are shown in full in the box below the answer, ready to copy.

Where Fibonacci numbers appear

  • Nature: the branching of trees, the arrangement of leaves on a stem, pineapple fruitlets, artichoke flowers and pine cone scales often follow Fibonacci patterns, though not in every species.
  • Computing: the Fibonacci search technique and the Fibonacci heap data structure use them.
  • Mathematics: they turn up so often that a journal, the Fibonacci Quarterly, is dedicated to them.
  • Art and design: rectangles and spirals based on them approximate the golden ratio.

How the check works

To test a number, the calculator steps through the sequence until it reaches or passes the number. If it lands exactly on it, the number is a Fibonacci number and its position is shown; otherwise you see the Fibonacci numbers just below and above it. Note that 1 appears twice in the sequence, as F1 and F2.

Listing the sequence

In List the sequence mode, enter how many numbers you want, up to 500, and the calculator writes them out one per line as F0 = 0, F1 = 1, F2 = 1 and so on, ready to copy into a spreadsheet, a program or your notes. The list is useful for spotting patterns: every third Fibonacci number is even, every fourth is a multiple of 3, and every fifth is a multiple of 5. Seeing the numbers side by side also shows how quickly they grow, roughly multiplying by the golden ratio at each step.

Fibonacci numbers in puzzles and planning

The sequence appears in classic counting problems. The number of ways to climb a staircase of n steps, taking one or two steps at a time, is a Fibonacci number, and the same kind of count describes the patterns of long and short syllables that interested Pingala. Some teams also use Fibonacci numbers such as 1, 2, 3, 5, 8 and 13 as a scale for estimating the size of tasks, because the growing gaps reflect growing uncertainty in bigger jobs.

Using the results in code

If you're writing a program that needs Fibonacci numbers, remember that most programming languages store ordinary numbers with limited precision. Beyond F78, a standard double-precision number can't hold every digit, and beyond F92 the result no longer fits in a signed 64-bit integer. Use your language's big-integer type for large values, and check your output against this calculator: copy a result from the box and compare it digit by digit. For long runs, the iterative approach of adding the last two numbers is simple and fast, while the doubling method used here is quicker when you need a single number far along the sequence.

Common mistakes

  • Starting at 1 instead of 0. Some books number from F1 = 1, which shifts every position by one.
  • Rounding big numbers. Ordinary floating-point math loses digits past F78.
  • Expecting every spiral in nature to be Fibonacci. Many are, but not all.

What next

Use this often? Add Fibonacci to your Home screen.

Frequently asked questions

How does the Fibonacci calculator work?

It uses F(n) = F(n − 1) + F(n − 2) with F(0) = 0 and F(1) = 1, worked out with exact whole-number arithmetic, so even very large results are exact.

What is the 10th Fibonacci number?

F(10) = 55, counting from F(0) = 0.

What is F(100)?

F(100) = 354,224,848,179,261,915,075, a 21-digit number.

How are Fibonacci numbers related to the golden ratio?

The ratio of consecutive Fibonacci numbers approaches the golden ratio, about 1.618, as n increases.

Is 144 a Fibonacci number?

Yes. 144 is F12 in the sequence that starts F0 = 0.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools