Skip to content

Fibonacci

Generate the Fibonacci sequence.

Terms
Output

No result

About Fibonacci

Fibonacci generates the sequence where each term is the sum of the two before it, starting from zero and one. You choose how many terms to produce and the tool returns them as a comma-separated list, which is convenient for pasting into a spreadsheet or a test fixture.

The number of terms is clamped between one and one hundred, so the output can never become unreasonably long. The sequence is built by simple addition rather than recursion, which means it computes in one pass with no risk of the exponential slowdown that the naive recursive definition suffers from.

One property of the implementation is worth stating, because it affects how the later values should be read. Terms are accumulated as double-precision floating-point numbers, which represent integers exactly only up to about nine quadrillion. The sequence stays exact through the seventy-ninth term; from the eightieth onward the last digits are rounded, so treat the larger values as approximate magnitudes and use a big-integer library if you need exact digits.

Beyond the count of terms, nothing about the sequence can be controlled. There is no offset to start from a different pair of seed values, so a Lucas sequence or a shifted Fibonacci variant cannot be produced, and no mode exists for the related sequences that share the same recurrence — only the standard zero-and-one start is available. Nor is the sequence returned in a form other than the comma-separated list: there is no sum or running total, no index alongside each term, and no way to ask for just the n-th value without generating everything before it. The hundred-term ceiling means the converging ratio cannot be watched much past the point where the floating-point rounding begins to matter.

How to use Fibonacci

  1. 1 Enter the number of terms you want, between 1 and 100.
  2. 2 Click to generate the sequence.
  3. 3 Copy the comma-separated result for use in a spreadsheet or a data fixture.

Frequently asked questions

Why are the largest terms inexact?

They exceed the range where a double-precision float can store every integer exactly, which ends at about nine quadrillion. The seventy-ninth term is still exact; beyond that the trailing digits are rounded, so those values should be read as approximations.

Why does the sequence start with 0 and 1?

That is the standard indexing, where the zeroth term is zero. Some textbooks start at 1, 1 instead. If your convention starts with two ones, the same list applies with the leading zero removed.

Can I generate more than 100 terms?

The field is capped at 100, and the cap is deliberate: past this point the values stop being exact anyway, so a longer list would be precise-looking output with unreliable digits.

What is the ratio between consecutive terms?

It converges on the golden ratio, approximately 1.618. Divide any term by the one before it once the sequence has grown a little and the result approaches that constant, which is the property behind most of the sequence natural-language appeal.

Free, online, and private

Free to use

Fibonacci is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How Fibonacci behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Terms accepted 1 – 100, default 10 — the field declares the min and the code clamps to the same pair
Sequence start 0, 1 — the opening pair is hard-coded, so 10 terms come back as 0, 1, 1, 2, 3, 5, 8, 13, 21, 34
How many are printed exactly the requested count, sliced out of the generated array
Clamped input a request outside the accepted span is silently pulled to the nearest bound instead of being refused
Separator a comma followed by a single space between terms; the list is otherwise unformatted

Compiled from the implementation of this tool and checked against it by itoolnet.

What Fibonacci does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • The series is seeded with the literal pair 0, 1, so this is the F(0) = 0 convention throughout. Working that starts at 1, 1 or at 1, 2 will be off by a term or two against this output, and the page offers no switch to renumber the sequence.
  • The 100-term ceiling is enforced rather than mentioned. Ask for 500 and you quietly receive 100 values — the result is indistinguishable from having asked for exactly 100, so a truncated list can easily be taken for a complete one.
  • Terms are accumulated as JavaScript doubles, so the tail of a long list is approximate: once the values pass 2^53 the integers are no longer exactly representable, and the later entries are printed as rounded figures with trailing zeros rather than as the true digits.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to Fibonacci with the snippet below. It is free, runs entirely in your browser, and needs no signup.