Fibonacci Sequence Calculator
Generate the Fibonacci sequence, find F(n) instantly, and watch the ratio of consecutive terms converge toward the golden ratio φ ≈ 1.618.
How to use this calculator
Type a whole number n and the calculator returns F(n), the n-th Fibonacci number, along with the full sequence from F(0) up to F(n) and the ratio of the last two terms. Large results (more than 15 digits) also get a scientific-notation form so the answer band stays readable.
The recurrence relation
Every Fibonacci number is the sum of the two before it:
Starting from those two seeds, the sequence unfolds as:
Check two consecutive terms: and — each one strictly follows from the two before it.
Where the sequence starts
This calculator follows the standard convention . A few older or informal references skip the leading zero and start counting at 1, 1, 2, 3, 5, … instead — the two conventions describe the identical sequence of sums, just shifted by one index, so double-check which numbering a source uses before comparing values.
The golden ratio connection
Divide each Fibonacci number by its predecessor and the ratio drifts toward the golden ratio :
The further out you go, the closer the ratio gets — by n = 20 it already agrees with φ to four decimal places. This is the same golden ratio behind classical proportion in art and architecture.
Applications
- Nature. Sunflower seed heads, pinecones, and pineapple scales pack new growth at the golden angle, which produces spiral counts that are consecutive Fibonacci numbers.
- Art and architecture. The golden ratio derived from the Fibonacci sequence has long been used (and sometimes over-attributed) as a guide for pleasing proportions.
- Computer science. Fibonacci numbers appear in algorithm analysis (Fibonacci heaps, the Euclidean algorithm's worst case), and computing them efficiently is a classic exercise in dynamic programming versus naive recursion.
Worked example — building F(12)
- Start from the seeds: , .
- Keep adding the two most recent terms: .
- and , so .
- The ratio — already close to the golden ratio φ.
Frequently asked questions
- What is the Fibonacci sequence?
- The Fibonacci sequence is a list of numbers where each term is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …. It is one of the most studied sequences in mathematics, named after the 13th-century Italian mathematician Leonardo of Pisa (Fibonacci).
- What is the formula for the Fibonacci sequence?
- The recurrence relation is , with seed values and . Every later term is just the sum of the two terms that came before it.
- Does the Fibonacci sequence start at 0 or 1?
- The standard mathematical convention starts , giving 0, 1, 1, 2, 3, 5, …. Some older or informal texts skip the leading 0 and start 1, 1, 2, 3, 5, … instead — both describe the same underlying pattern, just numbered differently.
- How is the golden ratio related to Fibonacci numbers?
- Dividing each Fibonacci number by the one before it produces a ratio that gets closer and closer to the golden ratio as grows. For example , and by the ratio already matches φ to several decimal places.
- Where does the Fibonacci sequence appear in nature?
- Spiral patterns close to Fibonacci proportions show up in sunflower seed heads, pinecones, pineapple scales, and nautilus shells, because packing new growth at the golden angle repeatedly produces Fibonacci-numbered spiral counts. It also appears in branching patterns of trees and the arrangement of leaves around a stem.
- What is F(50) and F(100)?
- F(50) = 12,586,269,025 and F(100) = 354,224,848,179,261,915,075. The sequence grows exponentially — roughly by a factor of φ ≈ 1.618 at each step — so the digit count keeps climbing fast even though the rule stays a simple addition.
- What is the most common mistake when computing Fibonacci numbers?
- Mixing up the starting values. Since and are both small, it is easy to start the recurrence one term off — for instance treating F(1) as 0 instead of 1 — which shifts the entire sequence by one index.
- How large can this calculator go?
- Up to n = 500. F(500) already has 105 digits, computed exactly with BigInt arithmetic — well past the point where ordinary floating-point numbers would lose precision.