Fibonacci Calculator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free Fibonacci calculator. Find the nth Fibonacci number exactly (up to n = 10,000), see the sequence, the number of digits and how the ratio approaches φ.
- Digits
- 0
- Ratio to previous
- 0
- Even or odd
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the Fibonacci calculator
- Enter n, the position in the Fibonacci sequence you want, from 0 to 10,000.
- Read the result. The Fibonacci calculator shows F(n), the number of digits, whether it's even or odd, and the ratio to the previous Fibonacci number.
- Copy the full number from the output box. For large n, the number can have thousands of digits; it's calculated exactly.
A table lists the first Fibonacci numbers up to your n (or up to F(20)).
What is the Fibonacci sequence?
The Fibonacci sequence starts with 0 and 1, and each 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, 987 …
Formally: F(0) = 0, F(1) = 1, and F(n) = F(n − 1) + F(n − 2).
The sequence is named after Leonardo of Pisa, known as Fibonacci, who described it in his 1202 book Liber Abaci using a puzzle about breeding rabbits. The sequence had been described earlier by Indian mathematicians studying poetic metres.
First Fibonacci numbers
| n | F(n) | n | F(n) |
|---|---|---|---|
| 0 | 0 | 11 | 89 |
| 1 | 1 | 12 | 144 |
| 2 | 1 | 13 | 233 |
| 3 | 2 | 14 | 377 |
| 4 | 3 | 15 | 610 |
| 5 | 5 | 16 | 987 |
| 6 | 8 | 17 | 1,597 |
| 7 | 13 | 18 | 2,584 |
| 8 | 21 | 19 | 4,181 |
| 9 | 34 | 20 | 6,765 |
| 10 | 55 | 30 | 832,040 |
F(50) = 12,586,269,025, and F(100) = 354,224,848,179,261,915,075, a 21-digit number.
How the calculator works
The Fibonacci calculator adds numbers step by step using big integers (arbitrary-precision arithmetic), so every digit is exact even for F(10,000), which has 2,090 digits. Ordinary calculators and spreadsheets use floating-point numbers, which lose precision after about F(78), so their large Fibonacci numbers end in incorrect digits.
Binet's formula
There's also a direct formula for the nth Fibonacci number:
F(n) = (φⁿ − ψⁿ) ÷ √5
where φ = (1 + √5) ÷ 2 ≈ 1.618 (the golden ratio) and ψ = (1 − √5) ÷ 2 ≈ −0.618. Because |ψ| < 1, ψⁿ becomes tiny, so F(n) is the nearest whole number to φⁿ ÷ √5. Binet's formula is elegant, but floating-point arithmetic makes it inaccurate for large n, which is why the calculator adds exactly instead.
Fibonacci and the golden ratio
The ratio of consecutive Fibonacci numbers approaches the golden ratio:
- 8 ÷ 5 = 1.6
- 13 ÷ 8 = 1.625
- 21 ÷ 13 = 1.6154
- 89 ÷ 55 = 1.6182
- 144 ÷ 89 = 1.6180
The calculator shows this ratio for your n. Our golden ratio calculator explores φ in design.
Interesting properties
- Every third Fibonacci number is even: F(0), F(3), F(6), F(9) … The rest are odd.
- Sum of the first n numbers: F(0) + F(1) + … + F(n) = F(n + 2) − 1.
- Divisibility: F(m) divides F(n) whenever m divides n. For example, F(5) = 5 divides F(10) = 55.
- GCD property: gcd(F(m), F(n)) = F(gcd(m, n)).
- Cassini's identity: F(n − 1) × F(n + 1) − F(n)² = (−1)ⁿ.
- Digits grow steadily: each Fibonacci number has about 0.209 × n digits for large n, because log₁₀(φ) ≈ 0.209.
Fibonacci numbers in nature
Fibonacci numbers appear in some plant structures: many flowers have 3, 5, 8, 13 or 21 petals; the spirals in sunflower heads and pine cones often come in consecutive Fibonacci numbers (such as 34 and 55). This arrangement relates to the "golden angle" of about 137.5°, which packs seeds efficiently. Not every plant follows this pattern, and some popular claims about Fibonacci numbers in nature and art are exaggerated, but the plant examples are well documented.
Fibonacci in computing and finance
- Computer science: Fibonacci numbers appear in algorithm analysis (Euclid's algorithm takes the most steps on consecutive Fibonacci numbers), Fibonacci heaps and Fibonacci search.
- Programming exercises: computing Fibonacci numbers is a classic way to teach recursion and dynamic programming.
- Agile planning: many software teams estimate tasks with Fibonacci-like scales (1, 2, 3, 5, 8, 13), because the growing gaps reflect growing uncertainty.
- Trading: some traders use "Fibonacci retracement" levels (23.6%, 38.2%, 61.8%) on price charts, though there's little evidence that these levels predict markets.
A worked example
Jordan's development team estimates stories with Fibonacci points. Curious about how fast the sequence grows, Jordan checks F(20) in the Fibonacci calculator: 6,765. The ratio to F(19) = 4,181 is 1.6180339632, already matching the golden ratio to seven decimal places.
For a coding challenge, Jordan needs F(1,000): the calculator shows it has 209 digits and starts 43466557686937456435…, and copies the full exact number from the output box to check their program's result.
Who uses a Fibonacci calculator
Students use it in maths and computer science. Programmers use it to test their code. Teachers use it to explore patterns with classes. Designers and curious readers use it to explore the link with the golden ratio.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit manages Google Ads for small and mid-size businesses, and only Google Ads. We check your account before we ever get on a call, then fix the structure, the keywords, the tracking and the ads, with month-to-month terms and no long contract. Book a free audit call.
How fast Fibonacci numbers grow
Fibonacci numbers grow by roughly 61.8% each step, because the ratio of consecutive terms approaches the golden ratio, about 1.618. That means each term has about 0.209 more digits than the one before, or roughly one extra digit every 4.8 terms. F(10) is 55, F(20) is 6,765, F(30) is 832,040, and F(50) is 12,586,269,025. F(100) has 21 digits: 354,224,848,179,261,915,075. Ordinary calculators lose precision beyond about F(78), because the numbers exceed what standard floating-point arithmetic can store exactly. The Fibonacci calculator uses exact big-integer arithmetic, so every digit is correct.
Checking whether a number is a Fibonacci number
There's a neat test for whether a whole number n is a Fibonacci number: n is in the sequence exactly when 5n² + 4 or 5n² − 4 is a perfect square. For n = 21, 5 × 441 − 4 = 2,201 isn't a square, but 5 × 441 + 4 = 2,209 = 47², so 21 is a Fibonacci number. For n = 20, neither 1,996 nor 2,004 is a perfect square, so 20 isn't. You can also check by generating the sequence with the Fibonacci calculator and seeing whether your number appears.
Lucas numbers
Lucas numbers follow the same rule as Fibonacci numbers, where each term is the sum of the two before, but start with 2 and 1: 2, 1, 3, 4, 7, 11, 18, 29, 47. They're closely linked to Fibonacci numbers. For example, each Lucas number equals the sum of the Fibonacci numbers on either side of the matching position: L(n) = F(n − 1) + F(n + 1). The ratio of consecutive Lucas numbers also approaches the golden ratio. They're a good example of how changing the starting values changes the numbers but not the long-run growth rate.
Fibonacci numbers in puzzles and art
The Fibonacci sequence turns up in many classic puzzles. The number of ways to climb a staircase of n steps, taking one or two steps at a time, is a Fibonacci number: F(n + 1). A staircase of 10 steps can be climbed in F(11) = 89 different ways. Artists and designers use Fibonacci proportions, such as rectangles of 8 by 13 or 13 by 21, because they approximate the golden ratio. Composers have used Fibonacci numbers to structure music, and some poets write "Fibonacci poems" whose lines have 1, 1, 2, 3, 5 and 8 syllables.
Using the Fibonacci calculator for programming practice
Computing Fibonacci numbers is a classic programming exercise, because it shows the difference between slow and fast algorithms. A naive recursive function recalculates the same values over and over, and takes an impractically long time beyond about F(50). An iterative loop or a memoised function computes F(1,000) almost instantly. If you're writing your own version, the Fibonacci calculator is a convenient way to check that your output is correct.
Where the sequence starts
Some books start the sequence at F(0) = 0, others at F(1) = 1. Both give the same numbers. Only the position labels differ, so check which convention a problem uses.
Sources and further reading
- Fibonacci sequence on Wikipedia: history, properties and formulas.
- Binet's formula on Wikipedia: the closed-form expression.
- OEIS: A000045, the Fibonacci numbers in the On-Line Encyclopedia of Integer Sequences.
Frequently asked questions
What is the Fibonacci sequence?
0, 1, 1, 2, 3, 5, 8, 13, 21 …, where each number is the sum of the two before it.
What is the 10th Fibonacci number?
F(10) = 55 (counting F(0) = 0).
What is the 100th Fibonacci number?
354,224,848,179,261,915,075.
How is Fibonacci related to the golden ratio?
The ratio of consecutive Fibonacci numbers approaches the golden ratio, about 1.618.
Is 0 a Fibonacci number?
Yes. By the usual definition, F(0) = 0 and F(1) = 1.
Is the Fibonacci calculator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.