Skip to content
ToolZone

Fibonacci Sequence Generator

Generate the Fibonacci sequence up to any length or limit you specify, useful for math coursework or exploring this famous number pattern.

Runs in your browser. Nothing you enter or upload leaves your device.

Copy as comma-separated list
01123581321345589144233377

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Fibonacci Sequence Generator

The Fibonacci Sequence Generator lists the first n terms of the sequence 0, 1, 1, 2, 3, 5, 8, 13..., where each number is the sum of the two before it. Drag the slider to choose anywhere from 1 to 1,000 terms and copy the result as a comma-separated list. Every value is exact, even the 1,000th term, which has 209 digits.

How it works

The generator starts with two values, a = 0 and b = 1. On each step it records a, then replaces the pair with (b, a + b). Repeating that n times produces the first n Fibonacci numbers: 0, 1, 1, 2, 3, 5, and so on. This iterative method takes one addition per term, so even 1,000 terms appear instantly.

Ordinary JavaScript numbers can only represent integers exactly up to about 9 quadrillion, which Fibonacci passes at term 79. To avoid that, the tool uses BigInt, which stores integers of any size. The copy button joins all terms with a comma and a space, ready to paste into a spreadsheet, a test file, or a document.

How to use

  1. 1

    Drag the How many numbers slider to the number of terms you want (1 to 1,000).

  2. 2

    Scroll through the list of terms shown below.

  3. 3

    Click the copy button next to Copy as comma-separated list to copy every term.

Worked examples

Default view

The first 15 terms.

Input
15 numbers
Result
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377

Fifty terms

A programmer checking a loop.

Input
50 numbers
Result
The last term is 7778742049

One hundred terms

Testing big-number handling.

Input
100 numbers
Result
The last term is 218922995834555169026 (21 digits)
Limitations
The sequence always starts at 0 and 1; custom starting values (like Lucas numbers) aren't supported. You can't jump to a single term such as F(500) without listing everything before it. The maximum is 1,000 terms.
Assumptions
The first two terms are 0 and 1.
Privacy
The sequence is calculated in your browser and nothing is sent or saved.

Frequently asked questions

How is each number in the Fibonacci sequence calculated?+

Each number is the sum of the two preceding numbers, starting from 0 and 1, so the sequence goes 0, 1, 1, 2, 3, 5, 8, and so on.

Where does the Fibonacci sequence show up in nature?+

It's often cited in the arrangement of leaves, the spirals of sunflower seeds and pine cones, and the number of petals on many flowers. Many examples are approximate rather than exact, but the pattern is common.

Are very large terms accurate?+

Yes. The tool uses arbitrary-precision integers, so every digit is exact. The 1,000th term in the list has 209 digits.

Does the sequence start with 0 or 1?+

This generator starts with 0, followed by 1, 1, 2, 3. Some books start with 1, 1, so shift by one position if your source does.

What are Fibonacci numbers used for in programming?+

They are classic examples for teaching recursion, memoization, and dynamic programming, and they appear in Fibonacci heaps, Fibonacci search, and agile estimation scales.

Related tools