b2KIT

Fibonacci Sequence Generator

Generate Fibonacci sequences to any length with golden ratio visualization and spiral drawing on canvas.

Tested tool guide Tested browser tools Checked August 16, 2026

What Fibonacci Sequence Generator does, with a checked example

Type a length and this page returns the Fibonacci sequence as a numbered list: each term is the sum of the two before it. Alongside the list it shows how the ratio of consecutive terms closes in on the golden ratio, and it draws the classic spiral on a canvas by fitting quarter-circle arcs into squares whose sides are the Fibonacci numbers. The surprise most users hit first: there are two conventions, starting with 0, 1 or with 1, 1, so the same length produces two different lists. The sequence also outgrows practical sizes quickly: term 50 is 12,586,269,025.

Worked example

A concrete input and expected output from the current implementation.

Input

16 terms

Expected output

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610

Each new term is the sum of the two before it, so the sixteenth term is 233 + 377 = 610. With the alternative 1, 1 start, the sixteenth entry would instead be 987, which is why confirming the starting pair matters.

How the result is produced

1

Building the sequence

With the 0, 1 start, the page builds the list term by term: each entry after the first two is the sum of its two predecessors, so the sequence runs 0, 1, 1, 2, 3, 5, 8, 13 and on. The recurrence is the whole definition; the values need no other formula. Because the addition compounds, the sequence grows exponentially, roughly by the golden ratio each step.

2

Ratios and the spiral

Dividing each term by its predecessor gives ratios that alternate above and below the golden ratio, phi = (1 + sqrt(5))/2, about 1.618, converging closer with every step. The canvas visualization tiles squares with side lengths equal to consecutive Fibonacci numbers and connects quarter-circle arcs of those radii; the joined arcs approximate a logarithmic spiral, the shape often called the Fibonacci or golden spiral.

Good uses

  • Preparing a lesson or worksheet on recurrence relations: generate the exact values for, say, the first 30 terms and confirm a student's handwritten extension of the pattern.
  • Pulling the side lengths and the drawn spiral for a layout or composition built on golden-ratio proportions, then overlaying the canvas spiral on the design to check the fit.
  • Settling a puzzle or contest question quickly: which term first exceeds a given number, or whether a candidate number appears in the sequence at all.

Limits and checks

  • The 'Nth Fibonacci number' is ambiguous. With a 0, 1 start the tenth entry is 34; with a 1, 1 start it is 55. Confirm the page's starting pair before quoting a term index, because both conventions are common.
  • Precision has a limit. Ordinary floating-point arithmetic holds integers exactly only up to about 2^53 (9,007,199,254,740,992), a limit the sequence crosses around its 79th term. For longer lists, check that the page keeps exact digits; otherwise the final figures round off.
  • The drawn curve is quarter-circle arcs joined end to end, not a single continuous logarithmic spiral, and consecutive-term ratios only approach phi: they alternate above and below it and never equal it, so no two terms give the golden ratio exactly.

Common questions

Is the spiral on the canvas the real golden spiral?

Not exactly. The drawing fits quarter-circle arcs into squares whose sides are Fibonacci numbers, so the curve changes radius in steps at each arc boundary. A true golden spiral is a single continuous logarithmic curve whose radius multiplies by phi every quarter turn. The two look nearly identical, and the drawn version converges to the true shape as the sequence grows, but they are not the same curve.

What is the 100th Fibonacci number?

With the 0, 1 convention, the value at index 100 is 354,224,848,179,261,915,075. Because each step multiplies the size by roughly the golden ratio, the index-100 value runs to 21 digits, so long sequences legitimately look enormous. If your result for that position ends in zeros or falls short of 21 digits, precision loss is the cause and exact arithmetic is needed.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools