Fibonacci Calculator
Enter n to get the nth Fibonacci number as an exact whole number — even F(100000), which has 20,899 digits. Alongside the value you get Binet's closed-form formula checked against the exact answer, the ratio of consecutive terms converging on the golden ratio, and a table of any run of terms you choose. Free, no sign-up — it runs in your browser.
A whole number from 0 to 100,000. F(0) = 0, F(1) = 1.
Results
354224848179261915075
F(100)
21
Digits
Binet's formula
F(n) = (φⁿ − ψⁿ) ÷ √5, where φ = (1 + √5) ÷ 2 ≈ 1.6180339887 and ψ = (1 − √5) ÷ 2 ≈ −0.6180339887. Because |ψ| < 1 the second term fades away, so F(n) is φⁿ ÷ √5 rounded to the nearest whole number.
φ^100 ≈ 7.920708398E20
ψ^100 ≈ 1.262513338E-21
φ^100 ÷ √5 ≈ 3.542248482E20
(φ^100 − ψ^100) ÷ √5, rounded in double-precision arithmetic = 354224848179263111168
This differs from the exact F(100) = 354224848179261915075. A double carries about 16 significant digits, so Binet's formula in ordinary floating point drifts from around n = 70. The exact figures here use whole-number arithmetic.
Ratio of consecutive terms
F(n + 1) ÷ F(n) approaches the golden ratio φ as n grows, alternating above and below it.
φ = 1.618033988749894848204586834365…
F(101) ÷ F(100) = 1.618033988749894848204586834365…
These agree with φ for the first 30 decimal places.
The sequence
Up to 100 terms.
| n | F(n) | F(n + 1) ÷ F(n), cut to 10 places |
|---|---|---|
| 0 | 0 | — |
| 1 | 1 | 1.0000000000 |
| 2 | 1 | 2.0000000000 |
| 3 | 2 | 1.5000000000 |
| 4 | 3 | 1.6666666666 |
| 5 | 5 | 1.6000000000 |
| 6 | 8 | 1.6250000000 |
| 7 | 13 | 1.6153846153 |
| 8 | 21 | 1.6190476190 |
| 9 | 34 | 1.6176470588 |
| 10 | 55 | 1.6181818181 |
| 11 | 89 | 1.6179775280 |
| 12 | 144 | 1.6180555555 |
| 13 | 233 | 1.6180257510 |
| 14 | 377 | 1.6180371352 |
| 15 | 610 | 1.6180327868 |
| 16 | 987 | 1.6180344478 |
| 17 | 1597 | 1.6180338134 |
| 18 | 2584 | 1.6180340557 |
| 19 | 4181 | 1.6180339631 |
How to Use the Fibonacci Calculator
- 1. Enter n. Any whole number from 0 to 100000. The tool uses the indexing F(0) = 0, F(1) = 1, F(2) = 1, F(3) = 2.
- 2. Read F(n). The value appears with its digit count. Past 40 digits the card shows the first and last digits, and Copy all digits copies every one.
- 3. Compare the formulas. The Binet section shows φⁿ, ψⁿ and the rounded result next to the exact term, so you can see where floating-point arithmetic stops being trustworthy. The ratio section shows F(n + 1) ÷ F(n) to 30 decimals beside φ.
- 4. List terms. In The sequence, choose a start term and how many to show (up to 100) to get a table of F(n) with each ratio F(n + 1) ÷ F(n).
What the Fibonacci Sequence Is
Each term is the sum of the two before it: F(n) = F(n − 1) + F(n − 2), starting 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144. Leonardo of Pisa (Fibonacci) used it in Liber Abaci (1202) to model a population of rabbits, though the numbers had already appeared in Indian writing on poetic metre. Some books start the sequence at F(1) = F(2) = 1 and leave out F(0); the values are the same, only the position numbers differ.
A few identities worth knowing: the terms add up as F(1) + F(2) + … + F(n) = F(n + 2) − 1 (1 + 1 + 2 + 3 + 5 + 8 + 13 + 21 + 34 + 55 = 143 = F(12) − 1); every third term is even; F(m) divides F(n) whenever m divides n; and Cassini's identity says F(n − 1)·F(n + 1) − F(n)² = (−1)ⁿ.
Binet's Formula and Its Limits
Binet's formula gives F(n) directly: F(n) = (φⁿ − ψⁿ) ÷ √5, with φ = (1 + √5) ÷ 2 and ψ = (1 − √5) ÷ 2. Since ψ is about −0.618, ψⁿ shrinks toward 0 and F(n) is simply φⁿ ÷ √5 rounded to the nearest integer. For n = 10, φ10 ≈ 122.9919, ψ10 ≈ 0.0081, and (122.9919 − 0.0081) ÷ 2.2361 = 55.
Why this calculator does not just use Binet
An ordinary calculator or spreadsheet stores about 16 significant digits. In double-precision arithmetic Binet's formula first goes wrong at n = 71, giving 308061521170130 instead of the true F(71) = 308061521170129, and the error grows from there. This tool computes terms with exact whole-number arithmetic (the fast-doubling identities F(2k) = F(k)(2F(k+1) − F(k)) and F(2k+1) = F(k)² + F(k+1)²) and shows Binet only as a comparison.
The Golden Ratio
Divide each term by the one before it and the answers close in on φ = 1.6180339887…, the golden ratio. They alternate around it — 2, 1.5, 1.667, 1.6, 1.625, 1.615… — and each ratio is closer than the last. After 20 terms F(21) ÷ F(20) = 10946 ÷ 6765 agrees with φ to 7 decimal places; F(41) ÷ F(40) agrees to 16; F(101) ÷ F(100) agrees to all 30 places the calculator shows. The reason is the same as for Binet: F(n + 1) ÷ F(n) ≈ φⁿ⁺¹ ÷ φⁿ = φ.
Worked example: F(100)
F(100) = 354224848179261915075 (21 digits) Digits by formula: ⌊100 × 0.20898764 − 0.34948500⌋ + 1 = 21 F(101) ÷ F(100) = 1.618033988749894848204586834365…
Frequently Asked Questions
- What is the 100th Fibonacci number?
- F(100) = 354,224,848,179,261,915,075, a 21-digit number. That uses the convention F(0) = 0 and F(1) = 1. If your source numbers the sequence from 1, 1, 2, 3, …, its 100th term is F(100) too; only sources that drop the leading 1 shift the position by one.
- How do you find the nth Fibonacci number without listing every term?
- Use Binet's formula for small n, or fast doubling for exact results: it builds F(n) from F(n ÷ 2) and F(n ÷ 2 + 1) with a few multiplications, so even F(100000) needs only about 17 doublings. Adding term by term works but takes n steps.
- Does the Fibonacci sequence start at 0 or 1?
- Both conventions are in use. Mathematics usually starts at F(0) = 0, F(1) = 1 (this calculator). Many textbooks and puzzles start with 1, 1. The terms after the start are identical, so check which index your problem means before comparing answers.
- How is the Fibonacci sequence related to the golden ratio?
- The ratio of consecutive terms F(n + 1) ÷ F(n) tends to φ = (1 + √5) ÷ 2 ≈ 1.618034. Conversely, φⁿ ÷ √5 is within 0.5 of F(n), which is Binet's formula. The table in the tool shows the ratios converging.
- Why does Binet's formula give a whole number?
- The irrational parts cancel exactly: φⁿ and ψⁿ are conjugates, so their difference is a multiple of √5. In floating-point arithmetic, though, φⁿ is rounded, and from about n = 71 the rounding error exceeds 0.5 and the answer is off by one or more.
- How many digits does F(n) have?
- About 0.2090 × n digits: precisely ⌊n·log₁₀φ − log₁₀√5⌋ + 1 for n ≥ 2. So F(1000) has 209 digits and F(100000) has 20,899.
- Are there other numbers that follow the same rule?
- Yes. Any two starting values and the rule 'add the previous two' make a Fibonacci-like sequence; starting from 2 and 1 gives the Lucas numbers 2, 1, 3, 4, 7, 11, 18. The ratios of all such sequences also approach φ. Try a sequence of your own in the Number Sequence Solver.