Fibonacci Calculator
Find the nth Fibonacci number, the sum of the sequence up to it, and how closely the ratio approaches the golden ratio.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Fibonacci Calculator does
This fibonacci calculator will find the nth Fibonacci number, the sum of the sequence up to it, and how closely the ratio approaches the golden ratio. Fill in the single field and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for finding a specific Fibonacci number. If you need the other side of this job, there is also a percentile calculator.
How to use it
- Enter a term number n, between 0 and 78.
- Read F(n) and the preceding term F(n−1).
- Their ratio is shown against the golden ratio, with the difference alongside.
- The running sum and the first twenty-five terms of the sequence appear below.
How it works
The ratio of consecutive Fibonacci numbers converges on the golden ratio φ = (1+√5)/2 ≈ 1.6180339887. The convergence is fast: by the twentieth term the ratio is correct to nine decimal places.
Binet's formula gives F(n) in closed form using powers of φ, but it loses accuracy to floating-point rounding for larger n. The iterative method used here is exact up to F(78), beyond which the values exceed the range where JavaScript integers are exactly representable.
The sum of the first n Fibonacci numbers is F(n+2) − 1, one of a long list of identities the sequence satisfies. The appearances of Fibonacci numbers in plant growth are real — leaf and seed arrangements genuinely follow them, for reasons to do with efficient packing at a constant divergence angle — but many of the claimed sightings in art and architecture are read in after the fact.
When to use it
- Finding a specific Fibonacci number.
- Demonstrating convergence to the golden ratio.
- Checking a programming exercise against known values.
- Working through a sequences problem.
Common mistakes to avoid
- Disagreeing about indexing. Here F(0) = 0 and F(1) = 1, which is the usual mathematical convention; some texts start at F(1) = 1, F(2) = 1.
- Using Binet's formula in floating point for large n and getting a value that is off by one.
- Reading golden-ratio claims about art and architecture uncritically.
Frequently asked questions
What is the 20th Fibonacci number?
6765, with F(0) = 0 as the starting term.
What is the golden ratio?
(1 + √5)/2, approximately 1.6180339887. The ratio of consecutive Fibonacci numbers converges on it.
Why does this stop at F(78)?
Because F(79) exceeds the range where JavaScript can represent integers exactly, so results beyond that would be silently wrong.