Fibonacci Calculator

The Fibonacci sequence is one of the most famous number patterns in mathematics. Each term is formed by adding the two terms that come before it: the sequence starts 1, 1, 2, 3, 5, 8, 13, 21, and keeps going indefinitely. The nth Fibonacci number, written F(n), is your position in this sequence. So F(1) = 1, F(2) = 1, F(3) = 2, F(4) = 3, F(5) = 5, and so on. What makes the sequence remarkable is how it appears throughout nature, from the spiral arrangements of seeds in a sunflower to the branching of trees and the growth of shells, and how it is intimately linked to the golden ratio phi. As you go further along the sequence, the ratio of any term to the one before it gets closer and closer to phi, approximately 1.61803. By the 20th term the approximation is accurate to six decimal places, and by the 30th term it is accurate to more than twelve. You enter the position n, from 1 up to 70, and the calculator returns F(n), the complete sequence from F(1) to F(n), the ratio of the last two terms as an approximation of phi, and the number of digits in F(n). The sequence is computed iteratively to avoid floating-point rounding issues for small to medium values of n. This tool is useful for students studying sequences and series, for anyone curious about the golden ratio, and for programmers testing Fibonacci implementations. Values above n=70 can exceed the safe integer range for standard JavaScript arithmetic.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
55
F(10): the 10th Fibonacci number
F(n)/F(n-1) ratio1.617647
Digits in F(n)2
Sum of sequence143
1, 1, 2, 3, 5, 8, 13, 21, 34, 55

Sequence is computed iteratively. Reliable for n up to 70. Above that, JavaScript number precision may cause rounding.

How it works

The calculator builds the Fibonacci sequence iteratively: F(1) = 1, F(2) = 1, and for each subsequent term F(k) = F(k-1) + F(k-2). This avoids the rounding errors that can accumulate with Binet's closed-form formula at large n. The ratio F(n)/F(n-1) is the best rational approximation to the golden ratio phi achievable with consecutive Fibonacci numbers. The sum of the first n Fibonacci numbers equals F(n+2) minus 1, a useful identity that the calculator verifies by summing all displayed terms. Digits in F(n) are counted by converting the number to a string and measuring its length.

Worked example

Using the default n = 10: the sequence is built step by step as 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Therefore F(10) = 55. The ratio of the last two terms is 55 divided by 34 = 1.617647, already close to phi = 1.61803. The sum of all ten terms is 1+1+2+3+5+8+13+21+34+55 = 143, which also equals F(12) minus 1 = 144 minus 1 = 143.

Related calculators