Boneyard Tools

Fibonacci Calculator

Enter an index n and get the nth Fibonacci number with exact precision, the full sequence from fib(0) up to fib(n), and the ratio of consecutive terms, which closes in on the golden ratio. Large values are computed with BigInt, so no digits are rounded off.

How to use the Fibonacci calculator

  1. Type a whole number index n that is 0 or greater (fib(0) is 0, fib(1) is 1).
  2. Read the nth Fibonacci number, shown in full precision even when it is hundreds of digits long.
  3. Scan the sequence up to n and the golden ratio approximation, then copy any result you need.

Examples

A small index

10
fib(10) = 55

The classic first terms

7
Sequence: 0, 1, 1, 2, 3, 5, 8, 13

A large index stays exact

100
fib(100) = 354224848179261915075

Frequently asked questions

How is the Fibonacci sequence defined here?

It is 0-indexed: fib(0) is 0, fib(1) is 1, and every term after that is the sum of the two before it. So the sequence runs 0, 1, 1, 2, 3, 5, 8, 13, 21, and on. Asking for index n returns the value at that position.

Why are large Fibonacci numbers still exact?

The calculator uses BigInt arithmetic instead of normal floating-point numbers. Floating-point loses precision once a value passes about 16 digits, but BigInt keeps every digit, so fib(100) and beyond come out exactly with no rounding.

What is the golden ratio approximation?

Dividing each Fibonacci number by the one before it, fib(n+1) divided by fib(n), gives a value that gets closer and closer to the golden ratio, about 1.6180339887. The higher the index you choose, the closer the approximation gets.

How can I tell if a number is a Fibonacci number?

A non-negative integer x is a Fibonacci number exactly when 5 times x squared, plus or minus 4, is a perfect square. The engine uses this test, so it can confirm membership even for very large values.

Is there a limit on the index?

The index is capped at 10000 to keep results instant and stop a huge pasted value from running away. Even at the cap the answer is exact, just very long (over two thousand digits).

Is my input private?

Yes. Every calculation runs entirely in your browser. Nothing you type is sent to a server, so the numbers you enter stay on your device.

Related tools