Fibonacci calculator
This Fibonacci calculator finds the nth Fibonacci number up to F(20000) exactly, lists the sequence or checks whether a number belongs to it. F(20) is 6,765 and F(50) already 12,586,269,025.
Example: What would you like to know: nth Fibonacci number · Index n 20 → Result: F(20) = 6,765. Source: Wikipedia – Fibonacci-Folge (Definition, Binet-Formel, Identitäten, Zeckendorf-Satz). Updated: .
How it is calculated
Every Fibonacci number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 … Formally F(0) = 0, F(1) = 1 and F(n) = F(n−1) + F(n−2).
How it is calculated
For large n the calculator uses the doubling formulas F(2k) = F(k) · (2·F(k+1) − F(k)) and F(2k+1) = F(k)² + F(k+1)². This works with integer arithmetic and no rounding error, even for hundreds of digits. The quotient F(n+1) / F(n) approaches the golden ratio 1.6180339887….
Checking and decomposing
A number x is a Fibonacci number exactly when 5x² + 4 or 5x² − 4 is a perfect square. By Zeckendorf’s theorem every positive integer can be written uniquely as a sum of non-consecutive Fibonacci numbers: 100 = 89 + 8 + 3.
- Every third Fibonacci number is even, every fourth is divisible by 3, every fifth by 5.
- The sum F(0) to F(n) equals F(n+2) − 1.
- Lucas numbers start with 2 and 1 and follow the same rule: 2, 1, 3, 4, 7, 11 …
Frequently asked questions
What are the first Fibonacci numbers?
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377 … Each number is the sum of its two predecessors.
How do you calculate the nth Fibonacci number?
By recursion F(n) = F(n−1) + F(n−2) or faster with the doubling formulas. The calculator gives F(n) exactly up to n = 20,000.
How is the Fibonacci sequence related to the golden ratio?
The quotient of two consecutive numbers approaches φ = 1.618…: 89 / 55 = 1.6182 and 233 / 144 = 1.6181.
Sources and legal basis
- Wikipedia – Fibonacci-Folge (Definition, Binet-Formel, Identitäten, Zeckendorf-Satz)
- OEIS A000045 – Fibonacci numbers (values and properties)
- Wikipedia – Fibonacci sequence (Fast doubling, recognizing Fibonacci numbers, Zeckendorf representation)
- Wikipedia – Lucas-Folge (L(n) = F(n−1) + F(n+1))
As of: · Editorial policy
Related tools
- Sequence CalculatorSequence calculator: enter numbers, find the rule (arithmetic, geometric, Fibonacci, quadratic), get the next terms, the nth term and the sum of n terms.
- Golden Ratio CalculatorGolden ratio calculator: split a length into a long and a short part, work out the other dimensions from any one and plan a golden rectangle, with working.
- Pascal Triangle CalculatorPascal triangle calculator: build rows up to 60, show the whole triangle, expand (a+b)^n and (a−b)^n and check properties such as the row sum and Fibonacci.
- Prime Number CalculatorPrime number calculator: list all primes up to 10 million, check whether a number is prime or find the nth prime – with twin primes, gaps and working.
- Collatz conjecture calculatorCollatz conjecture calculator: steps to reach 1, peak value, even and odd steps, the full sequence and record-holding start numbers up to a limit.
- Number base converter with stepsConvert between binary, octal, decimal, hex and any base from 2 to 36 – with full working, fractions, repeating digits and two’s complement (8–64 bit).
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Happy Number CheckerHappy number checker: see every step of the digit-square sum until it reaches 1 or the 4 → 16 → … → 4 loop, spot happy primes and list all happy numbers.
- WAM calculator (weighted average mark)WAM calculator for Australian uni students: enter each mark with its credit points or units of credit and get your weighted average mark with the working.