Fibonacci Sequence Generator
Generate the first N Fibonacci numbers with exact big-integer precision — with the last term, the running sum and the golden-ratio approximation.
How to use
- Enter the number of terms you want to generate (1 to 1000).
- Read the last (Nth) term, the sum of all listed terms and the golden-ratio approximation.
- Scroll the full sequence and copy it with one click.
- Try 10 terms (0, 1, 1, 2, 3, 5, 8, 13, 21, 34 — sum 88) to check the output.
About this tool
ShowHide
The sequence starts 0, 1 and every term after is the sum of the two before it. Enter how many terms you want and the tool lists them all, with the final term, the running sum, and the ratio of the last two — the number that converges on the golden ratio φ ≈ 1.618034. Everything is computed in arbitrary-precision integers, so the hundredth or thousandth term is exact rather than rounded.
That exactness is the whole reason to use a tool rather than a spreadsheet. Fibonacci numbers outgrow double-precision arithmetic quickly: F(78) is 8,944,394,323,791,464, which still fits in the 53 bits a double can hold exactly, and F(79) is 14,472,334,024,676,221, which does not. From there on, a calculator working in floating point returns numbers that look right and are wrong in the last digits, with no warning. F(100) is 354,224,848,179,261,915,075, twenty-one digits, and F(1000) has 209.
The convergence to φ is fast and worth watching in the output. The error alternates sign and shrinks by a factor of φ² ≈ 2.618 each step: the ratio is off by about 1.5 × 10⁻⁴ at the tenth term, 10⁻⁸ at the twentieth and 10⁻¹² at the thirtieth. By term thirty it agrees with φ to more digits than a double can represent, which is why the ratio column stops changing long before the sequence does.
Two properties that are more than curiosities. Fibonacci numbers modulo any number are periodic — the last digit repeats with a period of exactly 60, so F(n) and F(n+60) always end in the same digit, which is a quick sanity check on a long list. And because φ is close to the number of kilometres in a mile, consecutive terms convert between them: 5 miles is about 8 km, 8 is about 13, 13 is about 21. The ratios 1.6, 1.625 and 1.615 bracket the true 1.609, so the trick is accurate to within about one percent from the fifth term onward.
Frequently asked questions
Where does the sequence start?
This generator uses the standard convention F(0) = 0, F(1) = 1, so the first ten terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. The 'last term' stat is the final number in the list you generated.
Are large terms exact?
Yes. Calculations use JavaScript big integers, so terms with hundreds of digits are computed exactly with no floating-point rounding. For example F(100) — which appears as the 101st value because the list starts at F(0) — is exactly 354224848179261915075.
What is the golden-ratio number?
It is the ratio of the last term to the one before it. As the sequence grows this ratio converges to the golden ratio φ ≈ 1.6180339887, which is why Fibonacci numbers and φ are so closely linked.
Why is a recursive definition a bad way to compute these?
Because computing each term by recomputing the two before it re-derives the same values an exponential number of times — the thirtieth term costs over a million calls, and the fiftieth is unreachable. Iterating from the bottom, keeping only the last two values, gets any term in as many steps as its index. It is the standard demonstration of why the shape of a definition and the shape of an algorithm are different questions.
Why do the terms grow so fast?
Because each one is very close to the previous one multiplied by the golden ratio, which makes the growth exponential rather than linear: the number of digits increases by roughly one every five terms. That is why exact arithmetic matters here — a double loses precision around the seventy-eighth term, and everything past it is a plausible-looking approximation rather than the number.
Related tools
Random Number Generator
Generate cryptographically random numbers in any range — with or without duplicates, optionally sorted.
Random
Lottery Number Generator
Generate random tickets for 8 popular lotteries (Powerball, EuroMillions, Lotto 6/45, Loto 6, 双色球…) — uses crypto-secure RNG.
Random
Add Page Numbers to a PDF
Number the pages of a PDF — position, style, starting number and whether to skip the cover — and download it. Nothing is uploaded.
File
Collatz Conjecture (3n+1) Sequence
Generate the Collatz sequence for any positive integer — halve when even, triple-plus-one when odd — with step count, peak value and the full path to 1.
Math & Statistics
Rule of Three Calculator
Solve a proportion a/b = c/d — enter any three values, leave one field empty, and the fourth is found by cross-multiplication.
Math & Statistics
A/B Test Calculator (significance & sample size)
Compare two conversion rates: p-value, lift, Wilson and Newcombe intervals, a sample-ratio-mismatch check, and the sample size the next test needs.
Math & Statistics