About the Fibonacci Calculator
The rule could not be simpler: start with 0 and 1, and every number after that is the sum of the two before it.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, …
That is the whole definition. What comes out of it is not simple at all — a sequence that is neither arithmetic nor geometric, yet grows at a steady multiplying rate; a constant that turns up in art and architecture; and a pattern that appears in pinecones, sunflower heads and the branching of trees.
This calculator finds any Fibonacci number exactly, however large, lists the sequence, and tests whether a given number belongs to it.
How to Use the Fibonacci Calculator
The nth Fibonacci number. Enter a position. Indexing starts at F₀ = 0, so F₁₀ is 55.
List the sequence. Enter how many terms you want.
Is this number Fibonacci? Enter any whole number, however large, and it is tested exactly.
Why Exact Arithmetic Matters Here
This is the part that separates a correct Fibonacci calculator from a plausible one.
Computers store ordinary numbers with about 16 significant digits. Fibonacci numbers pass that limit at F₇₉. Beyond it, a calculation done in ordinary floating-point arithmetic does not fail or warn — it quietly returns digits that are wrong.
F₁₀₀, floating point: 354224848179262000000
F₁₀₀, exact: 354224848179261915075
The last six digits are simply invented. Nothing signals the problem; the number looks entirely reasonable.
This calculator uses exact whole-number arithmetic throughout, so every digit it prints is correct. At F₁₀₀ that is 21 digits; at F₁₀₀₀ it is 209.
Why the closed form is not used
There is a formula — Binet's — that gives Fₙ directly:
Fₙ = (φⁿ − ψⁿ) / √5, where φ = (1 + √5)/2
It is elegant, and it is remarkable that a formula built from irrational numbers always produces a whole number. But it is not a good way to compute one: it involves raising an irrational number to a power, and the rounding error overtakes the answer at around the seventieth term.
So the closed form belongs in the article, not in the calculation. Adding the previous two numbers is both simpler and exactly right.
The Golden Ratio
Divide each Fibonacci number by the one before it:
| Terms | Ratio | |-------|-------| | 3 ÷ 2 | 1.5 | | 5 ÷ 3 | 1.666… | | 13 ÷ 8 | 1.625 | | 55 ÷ 34 | 1.61764… | | 144 ÷ 89 | 1.617977… | | 6765 ÷ 4181 | 1.6180339… |
The ratios close in on φ = 1.6180339887…, alternating above and below it and narrowing each time. By F₄₀ the approximation is accurate to eleven decimal places.
φ is the number satisfying φ² = φ + 1 — the only positive value that is exactly one more than its own reciprocal. That self-similarity is precisely what the Fibonacci rule encodes, which is why the ratio has nowhere else to go.
A consequence worth noticing: the sequence grows geometrically even though its rule is addition. Each term is about 1.618 times the last, so Fibonacci numbers behave like a geometric sequence with ratio φ, despite never multiplying anything.
Patterns Worth Knowing
The sum has a shortcut. Adding the first n terms gives the term two places further along, minus one:
0 + 1 + 1 + 2 + 3 + 5 + 8 = 20, and F₈ − 1 = 21 − 1 = 20
Every third one is even. 0, 2, 8, 34, 144 — and no others. The pattern of odd, odd, even repeats forever because that is what adding does to parity.
Every fourth is divisible by 3, every fifth by 5, every sixth by 8. In general Fₙ divides Fₘ whenever n divides m.
Consecutive Fibonacci numbers share no common factor. Their greatest common divisor is always 1, which makes them the worst possible case for Euclid's algorithm — and that is exactly why they are used to test it.
The Fibonacci test. A whole number n is Fibonacci precisely when 5n² + 4 or 5n² − 4 is a perfect square. For 144: 5 × 144² − 4 = 103,676, which is not a square, but 5 × 144² + 4 = 103,684 = 322². One of the two is enough, so yes.
Step-by-Step Example
Building up to F₁₀.
Checking a number. Is 144 Fibonacci?
Generate until you reach or pass it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. Yes — it is F₁₂, and it is also the only Fibonacci number besides 1 that is a perfect square.
Is 145? The sequence goes straight from 144 to 233, so no.
Why not recursion. Computing F₄₀ by the definition, recursively, means over 300 million additions, because each call recomputes everything beneath it. Working upwards and keeping the last two values takes exactly 39 additions. This calculator works upwards.
Understanding Your Result
The result gives the Fibonacci number, grouped with separators when it is long.
The around it line names the neighbouring terms.
The sequence shows the opening terms for context.
The golden ratio line gives the ratio to the previous term and its distance from φ — printed to twelve decimal places, because six would hide the convergence entirely.
The notes report the digit count and confirm the arithmetic was exact.
When Should You Use This Calculator?
Coursework and puzzles. The sequence is a standard topic in discrete mathematics and number theory.
Programming practice. Fibonacci is the classic example for recursion, dynamic programming and memoisation — and a good test of whether a language handles big integers.
Agile estimation. Many teams size work in Fibonacci numbers, because the widening gaps discourage false precision on large items.
Algorithm analysis. Fibonacci search, Fibonacci heaps, and the worst case of Euclid's algorithm all rest on the sequence.
Design and proportion. The golden ratio is used, and argued about, in layout and typography. Fibonacci numbers are the usual way of approximating it in whole units.
Natural patterns. Seed heads, petal counts and leaf arrangements frequently show Fibonacci numbers, because packing at the golden angle is the most efficient arrangement.
Testing big-number arithmetic. If a tool gets F₁₀₀ right, its integer handling is probably sound.
Common Mistakes
Assuming a floating-point answer is correct. Past F₇₉ it is not, and nothing warns you.
Getting the index off by one. F₁₀ = 55 with F₀ = 0, but 55 is the eleventh number if you count from the start. Both conventions are in use — check which one a question means.
Using naive recursion. Correct but exponentially slow. Work upwards.
Believing every golden-ratio claim. The sequence genuinely appears in phyllotaxis and seed packing. Many claims about the Parthenon, the Mona Lisa and credit cards do not survive measurement, and the golden ratio's supposed aesthetic superiority has little experimental support.
Expecting Binet's formula to be exact in practice. It is exact in mathematics and inexact in floating point — the two are different claims.
Assuming all Fibonacci numbers are prime. 8, 21, 34 and 144 are not. Fibonacci primes exist but thin out quickly, and it is not known whether there are infinitely many.
Extending backwards without care. The sequence does continue into negative indices — F₋₁ = 1, F₋₂ = −1, F₋₃ = 2 — alternating in sign. This calculator handles the forward direction only.