Fibonacci Calculator
The sequence, the ratio, and where the arithmetic stops being exact.
Work out Fibonacci. The sequence, the ratio, and where the arithmetic stops being exact. Refuses out-of-range input instead of guessing.
F(20)
6,765
Ratio to the previous term: 1.61803396
Each term is the sum of the two before it, starting from 0 and 1. The ratio between consecutive terms converges on the golden ratio, 1.6180339887…, and it converges fast — by F(20) the two agree to seven decimal places. The sum of the first n terms is always F(n+2) minus 1, which is one of a large family of identities the sequence satisfies and a useful check that a calculation is right. F(78) is the last term that fits exactly in a double-precision number. Past that the arithmetic silently loses precision, so the exact flag turns off rather than presenting a number that looks right and is not.
How the Fibonacci Calculator works
The nth Fibonacci number with the sequence leading to it, the ratio to the previous term, and an honest flag for where double-precision arithmetic stops being exact — which is F(78), sooner than most calculators admit.
Also known as: nth fibonacci number · fibonacci sequence generator · golden ratio from fibonacci · fibonacci up to 100
Frequently asked questions
What is the Fibonacci sequence?
Each term is the sum of the two before it, starting 0, 1, 1, 2, 3, 5, 8, 13. It appears in the branching of plants, the spirals of pinecones and the arrangement of leaves, for reasons that come down to efficient packing.
How is Fibonacci related to the golden ratio?
The ratio of consecutive terms converges on it, 1.6180339887…, and quickly — by the twentieth term the two agree to seven decimal places. The convergence holds for any starting pair, not just 0 and 1.
What is the largest exact Fibonacci number here?
F(78), at 8,944,394,323,791,464. Beyond that a double-precision number cannot hold the exact integer, so the result is flagged approximate rather than presented as exact when it is not.
Is there a formula for the nth Fibonacci number?
Yes — Binet's formula, using powers of the golden ratio. It is exact in principle and loses precision in floating point faster than simple addition does, which is why this calculator iterates instead.
What is the sum of the first n Fibonacci numbers?
F(n+2) minus 1, always. It is one of a large family of identities the sequence satisfies, and a quick way to check that a calculation has not gone astray.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/fibonacci-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Fibonacci Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/fibonacci-calculator" style="color:#64748b">Fibonacci Calculator</a> from The Calc Library</p>The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.
Related calculators
Collatz Conjecture Calculator
Halve if even, triple and add one if odd. Nobody knows why it works.
OpenDigital Root Calculator
Sum the digits until one is left. It is always n mod 9.
OpenBirthday Paradox Calculator
23 people. Better than even. Yes, really.
Open