ToolJutsu
All tools
Calculator Tools

Fibonacci Generator

Generate the Fibonacci sequence up to any term.

Mode

The sequence starts 0, 1, 1, 2, 3, 5, … — each term is the sum of the two before it. Large terms are computed exactly with BigInt.

Last term generated (term 20)

4,181

Terms generated

20

Sum of the sequence

10,945

Sequence
  1. 10
  2. 21
  3. 31
  4. 42
  5. 53
  6. 65
  7. 78
  8. 813
  9. 921
  10. 1034
  11. 1155
  12. 1289
  13. 13144
  14. 14233
  15. 15377
  16. 16610
  17. 17987
  18. 181,597
  19. 192,584
  20. 204,181
Processed on your device. We never see your files.

How to use Fibonacci Generator

What this calculator does

This tool generates the Fibonacci sequence — the famous series where every number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, and so on. You can ask for the first N terms or for every term up to a maximum value. The generator returns the full sequence in a scrollable list, the last term it produced, the count of terms, and the running sum of everything generated. All of the larger numbers are computed with BigInt, so even term 500 is shown exactly rather than as a rounded approximation.

Why you might need it

The Fibonacci sequence turns up far more often than its simple definition suggests. Programmers use it as a classic exercise in recursion, iteration, and memoisation. Mathematics students study it alongside the golden ratio, since the ratio of consecutive terms converges on roughly 1.618. Designers and traders reference Fibonacci numbers in layout grids and retracement levels. Teachers use it to demonstrate how a tiny rule produces rapid, structured growth. Having the sequence generated instantly — with an exact sum and the nth term — saves you from writing throwaway code or making addition slips on long runs of large numbers.

How to use it

  1. Choose a mode. “First N terms” asks you for a count; “Up to a maximum value” asks you for a ceiling.
  2. Enter your number. In count mode this is how many terms you want, capped at 1000. In maximum-value mode it is the largest term the sequence may reach.
  3. Read the result: the last term generated appears in the headline card, with the term count and the sum shown beside it.
  4. Scroll the sequence list to see every term with its position, and use the copy buttons to copy a single value or the whole comma-separated list.

How it’s calculated

Each Fibonacci term is defined by the recurrence F(n) = F(n−1) + F(n−2), with the starting values F(1) = 0 and F(2) = 1. The generator computes the sequence iteratively rather than recursively: it keeps two running values, adds them to get the next term, and shifts the pair forward. This iterative approach takes linear time and avoids the exponential blow-up of naive recursion. Because Fibonacci numbers grow geometrically — roughly multiplying by the golden ratio 1.618 each step — they quickly exceed the range that ordinary numbers can store without rounding, so every term is held as a BigInt. The sum is accumulated as a BigInt total while the sequence is built, and the nth term is simply the last value produced. In maximum-value mode the loop stops as soon as the next term would exceed your ceiling.

Common pitfalls

The most common surprise is indexing. Because this tool starts at term 1 = 0, “the 10th Fibonacci number” here is 34, while a textbook that starts 1, 1 would call 34 the ninth. When comparing with another source, check which convention it uses. Another point of confusion is the sum: it is the total of every term actually generated, so it changes as you change N or the maximum. Finally, maximum-value mode stops at the last term that is less than or equal to your ceiling — it never produces a term that exceeds it.

Tips

To explore the golden ratio, generate a few dozen terms and divide each by the one before it; the quotient settles near 1.6180339887. If you need a specific high term, count mode is the direct route — set N to the index you want and read the headline card. Because everything is computed locally with exact BigInt arithmetic, you can experiment freely with large values, and nothing you type ever leaves your browser.

Frequently asked questions

Where does the Fibonacci sequence start?
This generator uses the common modern convention that begins 0, 1, 1, 2, 3, 5, 8, 13, … so the first term is 0 and the second is 1. Some textbooks start at 1, 1, 2, 3, which simply shifts every index by one. The arithmetic — each term is the sum of the two before it — is identical either way.
Why are the large terms exact and not rounded?
The calculator uses JavaScript's BigInt type, which holds whole numbers of any size without the rounding error that ordinary floating-point numbers suffer beyond about 16 digits. That means term 200, which has 42 digits, is shown precisely rather than as an approximation.
What do the two modes do?
'First N terms' generates exactly the number of terms you ask for. 'Up to a maximum value' keeps producing terms while they stay less than or equal to the ceiling you set, then stops. Use the first when you need a fixed length and the second when you care about a value threshold.
Why is there a cap on the number of terms?
Generating is capped at 1000 terms so the page stays fast and the scrollable list renders smoothly on phones. Term 1000 already has 209 digits, which is far beyond any everyday need, so the limit rarely matters in practice.
Is anything I enter sent to a server?
No. The whole sequence is generated by JavaScript in your browser. Your inputs are never uploaded or stored, and the tool works offline once the page has loaded.

Related tools