What the Fibonacci sequence is and why the ratio matters
The Fibonacci sequence is the list of numbers you get when you start with 1, 1 and make every later number the sum of the two before it: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. That single rule — Fn = Fn−1 + Fn−2 — is the whole definition. Everything else about the sequence is a consequence of it.
The consequence people care about is the ratio. Divide each term by the one before it and you get 1, 2, 1.5, 1.6667, 1.6, 1.625, 1.6154, 1.6190 … The values bounce either side of a limit and close in on it fast. That limit is the golden ratio φ = 1.6180339887, and it is not a coincidence: if the ratio settles down to some value x, then dividing the recurrence through by Fn−1 gives x = 1 + 1/x, so x² = x + 1. Solve that quadratic with the quadratic formula and the positive root is exactly (1 + √5) ÷ 2. The golden ratio calculator works the same number from the geometric definition.
This matters outside recreational mathematics. Fibonacci numbers are the worst case for the Euclidean algorithm, so they bound how many division steps a greatest common factor computation can take. They index the Fibonacci heap and the Fibonacci search technique. And because the sequence grows geometrically at rate φ, it is a standard first example when you want to show that a linear recurrence has exponential behaviour without ever writing an exponential.
The recurrence, Binet's closed form, and the sum identity
You have three ways to reach the same number, and this calculator uses all three so they can check one another.
The recurrence. Add the previous two terms. This is exact — every intermediate value is a whole number — and it costs n additions. That is what produces the headline term here.
Binet's closed form. Fn = (φn − ψn) ÷ √5, where ψ = (1 − √5) ÷ 2 = −0.6180339887. The two symbols are the roots of the characteristic equation x² = x + 1, and any sequence of the form Aφn + Bψn satisfies the recurrence for any constants A and B. Picking A = 1/√5 and B = −1/√5 is the choice that makes the first two terms come out as 1 and 1, and that pins down the sequence completely. Because |ψ| is less than 1, ψn never exceeds 0.62 in size and shrinks quickly, which is why Fn is always the nearest integer to φn ÷ √5.
The sum identity. F1 + … + Fn = Fn+2 − 1. Proof in one line: rewrite each Fk as Fk+2 − Fk+1; the sum telescopes to Fn+2 − F2, and F2 = 1. Change the starting terms and the same telescoping gives Gn+2 − G2, which is why the identity still works when you enter 2 and 1 for the Lucas numbers.
Worked example: the 12th Fibonacci number, three ways
Set the term index to 12 and leave both starting terms at 1.
- Build the list. 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. The twelfth entry is 144.
- Check the last step. F12 = F11 + F10 = 89 + 55 = 144.
- Sum by hand. 1 + 1 + 2 + 3 + 5 + 8 + 13 + 21 + 34 + 55 + 89 + 144, accumulating as 2, 4, 7, 12, 20, 33, 54, 88, 143, 232, 376.
- Sum by the identity. F14 − 1 = 377 − 1 = 376. The two agree.
- Ratio. F13 ÷ F12 = 233 ÷ 144 = 1.6180556. That sits 0.0000216 above φ = 1.6180340.
- Binet. A convenient identity gives the powers exactly: φn = (Ln + Fn√5) ÷ 2 with L12 = 322, so φ12 = (322 + 144 × 2.2360680) ÷ 2 = (322 + 321.9937888) ÷ 2 = 321.9968944. Likewise ψ12 = (322 − 321.9937888) ÷ 2 = 0.0031056.
- Finish Binet. 321.9968944 − 0.0031056 = 321.9937888, and 321.9937888 ÷ 2.2360680 = 144.000000.
All three routes land on 144, which is the point of running them together: the recurrence is exact but slow to write out, Binet is fast but floating-point, and the sum identity is a cross-check on both.
How to read the ratio column
Look at the ratio column and you will see it straddle φ rather than approach from one side. For the standard sequence the ratio Fn+1 ÷ Fn lands below φ when n is odd and above it when n is even: 1.000 at n = 1, 2.000 at n = 2, 1.500 at n = 3, 1.6667 at n = 4. That alternation comes straight from Binet: the ψn term flips sign with every step, so the error it introduces flips too.
The size of the error falls by a factor of about φ² = 2.618 per term, which is why you gain roughly two decimal places every five terms. By n = 15 the ratio 987 ÷ 610 = 1.6180328 matches φ to five decimal places; by n = 20 the ratio 10,946 ÷ 6,765 = 1.6180340 matches it to seven. If you need φ itself rather than an approximation, take the square root of 5, add 1 and halve.
The growth rate is the other thing worth reading. Each term is about 1.618 times the last, so the sequence behaves like a geometric sequence with common ratio φ once the early terms are past. That gives a useful shortcut: the number of Fibonacci terms below some bound M is roughly log(M√5) ÷ log φ, so the count reaches 30.4 at a million and 44.7 at a billion. This calculator confirms both crossings: F30 = 832,040 is the last term below a million and F45 = 1,134,903,170 is the first above a billion.
Fibonacci numbers, running sums and consecutive ratios
| n | Fn | ΣF1..Fn | Fn ÷ Fn−1 |
|---|---|---|---|
| 1 | 1 | 1 | — |
| 2 | 1 | 2 | 1.000000 |
| 3 | 2 | 4 | 2.000000 |
| 4 | 3 | 7 | 1.500000 |
| 5 | 5 | 12 | 1.666667 |
| 6 | 8 | 20 | 1.600000 |
| 7 | 13 | 33 | 1.625000 |
| 8 | 21 | 54 | 1.615385 |
| 9 | 34 | 88 | 1.619048 |
| 10 | 55 | 143 | 1.617647 |
| 11 | 89 | 232 | 1.618182 |
| 12 | 144 | 376 | 1.617978 |
| 13 | 233 | 609 | 1.618056 |
| 14 | 377 | 986 | 1.618026 |
| 15 | 610 | 1,596 | 1.618037 |
| 16 | 987 | 2,583 | 1.618033 |
| 17 | 1,597 | 4,180 | 1.618034 |
| 18 | 2,584 | 6,764 | 1.618034 |
| 19 | 4,181 | 10,945 | 1.618034 |
| 20 | 6,765 | 17,710 | 1.618034 |
Every cumulative entry equals Fₙ₊₂ − 1: at n = 20 that is 17,711 − 1 = 17,710. Note that the ratio column here is Fₙ ÷ Fₙ₋₁, one index earlier than the Fₙ₊₁ ÷ Fₙ output tile, so row 12 reads 1.617978 while the tile at n = 12 reads 1.618056.
Why the term index stops at 78
A JavaScript number is an IEEE 754 double, which represents every integer exactly up to 253 = 9,007,199,254,740,992 and only some integers above it. F78 = 8,944,394,323,791,464 is under that ceiling; F79 = 14,472,334,024,676,221 is over it, and would come back with its last digits silently wrong. The input maximum is set at 78 so that every integer this page reports is the true one.
If you enter starting terms much larger than 1, the terms grow proportionally faster and can cross the same ceiling well before n = 78. The calculator raises a warning when any headline figure exceeds it.
Pitfalls and assumptions
- Indexing conventions differ. This calculator uses F1 = 1, F2 = 1. Many textbooks and most programming references start at F0 = 0, F1 = 1, which shifts every index by one. Before you compare a value against a published table, check which convention it uses.
- Binet is not exact in floating point. The closed form is exact in algebra but φn is not representable, so the computed value drifts from the integer as n grows. Rounding to the nearest integer recovers the right answer well beyond the range this page allows, but the raw closed-form figure is not the value to quote.
- Recursion without memoisation is exponentially slow. The naive recursive definition calls itself twice per term and evaluates Fn in roughly Fn calls. Use iteration or memoisation; that is why this calculator loops.
- The ratio is undefined wherever a term is zero. The standard sequence never hits zero after the start, but generalised starting pairs such as 1 and 0, or 3 and −3, produce a zero term and a blank ratio at that point.
- Fibonacci-like does not mean Fibonacci. A sequence that merely grows at roughly 1.618 per step is a geometric sequence, not a Fibonacci one. The defining property is the additive recurrence, not the growth rate.
Lucas numbers, generalised sequences and when to use a different tool
Set the starting terms to 2 and 1 and you get the Lucas numbers: 2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123. They obey the same recurrence and are tied to the Fibonacci numbers by Ln = Fn−1 + Fn+1 and by φn = (Ln + Fn√5) ÷ 2, the identity used in the worked example above. Their consecutive ratio converges to the same φ, because φ is a property of the recurrence rather than of the starting values.
Any starting pair works. The general solution of the recurrence is Aφn + Bψn, and the two starting terms fix A and B. Since |ψ| < 1, the φ part dominates for every starting pair except the single degenerate line where A = 0, which needs G2 ÷ G1 to be exactly the irrational number ψ and so cannot be reached with the whole-number inputs here.
Reach for a different tool when the pattern is not additive. A sequence with a constant difference is an arithmetic sequence; one with a constant multiplier is a geometric sequence. If you are counting arrangements rather than continuing a pattern, the combination calculator or the factorial calculator is the right page — though the two subjects meet in a pretty identity: summing the shallow diagonals of Pascal's triangle, the same triangle behind binomial expansion, reproduces the Fibonacci numbers exactly.
Key terms
- Recurrence relation
- A rule that defines each term of a sequence using earlier terms. The Fibonacci recurrence is second-order and linear: it looks back two terms and combines them with constant coefficients.
- Characteristic equation
- The polynomial you get by substituting xn into a linear recurrence. For Fibonacci it is x² = x + 1, whose roots φ and ψ drive the closed form.
- Closed form
- A formula that gives the nth term directly from n, with no loop and no reference to earlier terms. Binet's formula is the closed form for Fibonacci.
- Golden ratio (φ)
- (1 + √5) ÷ 2 = 1.6180339887. The unique positive number that is one greater than its own reciprocal, and the limit of the Fibonacci ratio.
- Generalised Fibonacci sequence
- Any sequence obeying Gn = Gn−1 + Gn−2 with arbitrary starting terms. The Lucas numbers are the best-known example after Fibonacci itself.
