Skip to content
Zesona
Fibonacci GeneratorLocal

Fibonacci Generator

Generate exact Fibonacci numbers of any size, well past F(79) where floating-point implementations start returning wrong values.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

The usual mathematical convention

Try an example

Ready

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Choose how many terms and which indexing convention you want.

  2. 2

    Every term is an exact integer, however large.

Questions about Fibonacci Generator

Why does the indexing convention matter?

Because it shifts every term. Starting from F(0) = 0 is standard in mathematics and is what Binet’s formula assumes; starting from F(1) = 1 appears in older textbooks and in puzzle statements. A sequence quoted without saying which can be off by one throughout.

Where does floating point fail?

At F(79) = 14,472,334,024,676,221, the first Fibonacci number above 2^53. From there a double cannot hold the value exactly, so an implementation using ordinary numbers returns a wrong answer - silently, with no warning. These are exact integers, so F(1000) is correct to all 209 digits.

Should I use Binet’s formula?

Not for exact values. It expresses F(n) in terms of the golden ratio, which is irrational, so any floating-point evaluation accumulates error and starts giving wrong integers around n = 70. Iterating the addition, as here, is both exact and faster.

Is my data sent anywhere?

No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.

Does the Fibonacci Generator work offline?

Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Fibonacci Generator keeps working with the network switched off and nothing is ever sent to a server.

Other tools you might reach for next.