Paritian

Mathematics

Fibonacci Calculator

Any term of the Fibonacci sequence, the terms around it, the running total and how close the ratio has got to the golden ratio.

Results

The sequence 0 1 1 2 3 5 8 13 21 34 55 89 144
That term 144
The one before 89
The one after 233
Everything up to it, added 376
Ratio to the one before 1.61797753
Digits it has 3

What this tool does

Start with nought and one, then keep adding the last two together. That is the whole rule, and it produces a sequence that describes the spiral of a shell, the arrangement of seeds in a sunflower head and the worst case of a few well-known algorithms. Ask for a term and you get the number itself, its neighbours, everything up to it added together, and the ratio between it and the term before — which creeps closer to 1.618 the further along you go.

Formula

each term is the sum of the two before it, starting from 0 and 1

Variables

SymbolMeaningUnit
nWhich term you want
OUTThe sequence
TEThat term
PRThe one before
NXThe one after
SUEverything up to it, added
GRRatio to the one before
DGDigits it has

Worked example

  • Which term you want12
  • The sequence0 1 1 2 3 5 8 13 21 34 55 89 144
  • That term144
  • The one before89
  • The one after233
  • Everything up to it, added376
  • Ratio to the one before1.61797753
  • Digits it has3

Frequently asked questions

Why does the ratio settle near 1.618?

Because dividing each term by the one before it converges on the golden ratio, the number that solves x squared equals x plus one. By the tenth term it is already right to two decimal places, and by the fortieth it is right to eight. That convergence is the reason the sequence keeps turning up in places that have nothing to do with rabbits.

Why does it stop at term 500?

Because the numbers grow faster than the arithmetic stays exact. Python handles whole numbers of any size, but a browser's numbers lose their last digits somewhere above the seventy-eighth term, and a calculator that quietly disagrees with itself between the two would be worse than one with a limit. The sequence shown is cut at the first twenty-five terms for the same practical reason.