Calculators

Fibonacci Calculator

Calculate any Fibonacci number F(n) up to n = 10,000 with exact BigInt digits, preview the sequence, and watch the ratio approach the golden ratio.

Loading interactive tool…

Embed this tool on your site

About this tool

The Fibonacci Calculator computes the Fibonacci number at any position n from 0 to 10,000, using the convention F(0) = 0, F(1) = 1, F(2) = 1, F(3) = 2. It uses BigInt for exact large-integer arithmetic, so every digit of results such as F(10,000) — 2,090 digits long — is correct. Alongside F(n) the tool shows its digit count, the ratio F(n)/F(n−1) to eight decimal places next to the golden ratio φ, and a preview of the sequence from F(0) (up to 50 terms, with F(n) highlighted when it falls inside the preview). Results longer than 30 digits are shortened in the summary card and shown in full in a read-only box, and a Copy button copies the complete value. This is a useful reference for mathematics students, algorithm learners, and anyone exploring number theory or nature's mathematical patterns.

Why use it

  • Uses BigInt for exact arithmetic on very large Fibonacci numbers.

  • Handles positions up to 10,000 — results over 2,000 digits long.

  • Shows the ratio F(n)/F(n−1) converging toward the golden ratio.

  • Sequence preview of up to 50 terms for quick reference.

  • Replaces brittle online recursive calculators that overflow at F(80).

  • Useful for algorithm interview prep — generate test cases instantly.

How to use

  1. Enter the position N (0 to 10,000).
  2. Optionally set Preview count (3 to 50) to choose how many sequence terms to list.
  3. Click Calculate or press Enter in the N field.
  4. Read F(n), its number of digits and the F(n)/F(n−1) ratio beside the golden ratio φ.
  5. Scroll the sequence preview, which starts at F(0) = 0 and highlights F(n) when it is within the preview.
  6. Use 'Copy F(n)' to copy the full value, or read it from the full-value box when it is longer than 30 digits.
  7. Compare the ratio across n = 10, 20 and 50 to see how it stabilizes.

When it helps

  • Looking up specific Fibonacci numbers for algorithm analysis or math problems.
  • Checking how many digits a large Fibonacci number has.
  • Teaching or learning Fibonacci numbers and the golden ratio.
  • Generating Fibonacci sequences for programming exercises or tests.
  • Generating test inputs for dynamic programming exercises.
  • Verifying outputs of a recursive function in language tutorials.

Examples

Small index

Input

N = 10

Expected result

F(10) = 55 (2 digits); F(10)/F(9) = 1.61764706; sequence 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55

Medium index, golden ratio

Input

N = 50

Expected result

F(50) = 12586269025 (11 digits); F(50)/F(49) = 1.61803399

Large index (BigInt territory)

Input

N = 200

Expected result

F(200) = 280571172992510140037611932413038677189525 (42 digits)

Maximum index

Input

N = 10000

Expected result

F(10000) has 2,090 digits, beginning 336447648764317832666216120051…

Tips

  • The ratio F(n)/F(n−1) converges to φ ≈ 1.618 — try n=5, n=10, n=20 and watch the digits stabilize.
  • Use the Copy F(n) button for large results — large Fibonacci numbers exceed normal integer storage in spreadsheets, so paste them as text.
  • Fibonacci numbers grow roughly like φ^n / √5 — so F(100) is already 21 digits long.
  • The sum of F(1) through F(n) equals F(n+2) − 1 — a quick mental check for short sequences.
  • Every third Fibonacci number is even (F(3)=2, F(6)=8, F(9)=34) — a nice pattern to spot in the sequence list.
  • To check if a number is Fibonacci by hand, compute 5n² + 4 or 5n² − 4 — if either is a perfect square, n is Fibonacci.

Frequently Asked Questions

What is the Fibonacci sequence?
The Fibonacci sequence starts 0, 1, 1, 2, 3, 5, 8, 13, 21... where each number is the sum of the two preceding ones. F(n) = F(n-1) + F(n-2).
What is the golden ratio?
The golden ratio φ ≈ 1.6180339887... is the limit of the ratio of consecutive Fibonacci numbers as n approaches infinity. It appears in art, architecture, and nature.
Is F(0) = 0 or F(1) = 1?
Both: this calculator uses F(0) = 0 and F(1) = 1, so F(2) = 1 and F(3) = 2. The sequence preview starts at F(0). If your textbook starts at F(1) = 1, F(2) = 1, the values for n ≥ 1 are the same.
What is the largest Fibonacci number this can compute?
N can be up to 10,000. F(10,000) has 2,090 digits and is computed exactly with BigInt; the summary card shows the first 30 digits and the full value appears in a box below.
Why does the golden ratio matter?
The golden ratio is considered aesthetically pleasing and appears in the proportions of the Parthenon, the nautilus shell, and many natural growth patterns. It is also related to the most efficient angle for packing seeds in a sunflower.
How accurate is the golden ratio approximation?
The tool shows F(n)/F(n−1) to 8 decimal places. At n = 10 it reads 1.61764706; from about n = 20 onward it matches φ to the 8 places displayed.
Why does this use BigInt instead of regular numbers?
JavaScript's Number type loses integer precision above 2^53 (~9 quadrillion). F(79) crosses that threshold, so all Fibonacci computations beyond that require BigInt to remain exact.
Does the tool match results from Python's arbitrary-precision integers?
Yes — both compute F(n) iteratively with exact integers, so the digits are identical for any n the tool accepts.

Explore the category

Glossary

Fibonacci number
A member of the sequence F(1)=1, F(2)=1, F(n)=F(n−1)+F(n−2). The sequence grows exponentially and appears throughout mathematics.
Golden ratio (φ)
The irrational number φ ≈ 1.6180339887, defined by (1+√5)/2. The ratio of consecutive Fibonacci numbers converges to φ.
Binet's formula
A closed-form expression for F(n) = (φ^n − ψ^n)/√5, where ψ = (1−√5)/2. Useful for direct computation but loses precision for large n in floating-point.
BigInt
A JavaScript numeric type that supports integers of arbitrary size, used here so Fibonacci values above F(78) (which exceed 2^53) remain exact.
Lucas numbers
A related sequence L(n) = L(n−1) + L(n−2) with L(1)=1, L(2)=3. Many identities link Lucas and Fibonacci numbers.
Zeckendorf's theorem
Every positive integer can be uniquely written as a sum of non-consecutive Fibonacci numbers — useful in number representation theory.
Recursive definition
The standard mathematical specification F(n) = F(n−1) + F(n−2). Naive recursion is exponentially slow; iterative or memoized approaches run in linear time.
Fibonacci spiral
A geometric construction of arcs in successive Fibonacci-sized squares, approximating the logarithmic golden spiral seen in nature.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities