Skip to main content
math

Fibonacci Calculator

Calculate the nth Fibonacci number using the recurrence F(n) = F(n-1) + F(n-2), with options for custom starting values.

Reviewed by Chase FloiedUpdated

This free online fibonacci calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

Position in the Fibonacci sequence (n ≥ 0)

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Fibonacci Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Fibonacci Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Fibonacci Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Fibonacci Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The Fibonacci Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Calculate the nth Fibonacci number using the recurrence F(n) = F(n-1) + F(n-2), with options for custom starting values. The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About Fibonacci Calculator

The Fibonacci sequence is arguably the most famous sequence in mathematics. Beginning with 0 and 1, each subsequent number is the sum of the two preceding ones: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and so on. Named after Leonardo of Pisa (known as Fibonacci), who introduced the sequence to Western mathematics in his 1202 book Liber Abaci, the sequence models rabbit population growth in his original problem. The Fibonacci sequence appears throughout nature — in the spirals of sunflower seeds, the branching of trees, the arrangement of pine cone scales, and the shell of the nautilus. The ratio of consecutive Fibonacci numbers converges to the golden ratio φ ≈ 1.6180339887, a value prized in art, architecture, and design for its aesthetic properties. In computer science, Fibonacci numbers arise in the analysis of algorithms (Fibonacci heaps, Euclid's algorithm complexity), data structures, and dynamic programming exercises. This calculator computes F(n) iteratively for accuracy with large n and also shows how the ratio of consecutive terms approaches φ.

The Math Behind It

The standard Fibonacci sequence is defined by F(0) = 0, F(1) = 1, and F(n) = F(n−1) + F(n−2) for n ≥ 2. Binet's closed-form formula F(n) = (φⁿ − ψⁿ)/√5, where φ = (1+√5)/2 and ψ = (1−√5)/2, allows direct computation but suffers from floating-point errors for large n. The ratio F(n+1)/F(n) converges to φ as n → ∞. Important identities include Cassini's identity: F(n−1)F(n+1) − F(n)² = (−1)ⁿ, and the addition formula: F(m+n) = F(m)F(n+1) + F(m−1)F(n). The sum of the first n Fibonacci numbers equals F(n+2) − 1. Every positive integer can be uniquely represented as a sum of non-consecutive Fibonacci numbers (Zeckendorf's theorem). The Fibonacci sequence modulo m is periodic (Pisano period). Generalized Fibonacci sequences allow arbitrary starting values; the Lucas numbers (2, 1, 3, 4, 7, 11, …) are a well-known variant. Matrix exponentiation [F(n+1), F(n); F(n), F(n−1)] = [[1,1],[1,0]]ⁿ enables O(log n) computation.

Formula Reference

Recurrence

F(n) = F(n−1) + F(n−2)

Variables: F(0) = 0, F(1) = 1 (standard)

Binet's Formula

F(n) = (φⁿ − ψⁿ) / √5

Variables: φ = (1+√5)/2 ≈ 1.618, ψ = (1−√5)/2 ≈ −0.618

Worked Examples

Example 1: Compute F(10)

Find the 10th Fibonacci number (0-indexed).

Step 1:F(0)=0, F(1)=1, F(2)=1, F(3)=2, F(4)=3
Step 2:F(5)=5, F(6)=8, F(7)=13, F(8)=21, F(9)=34
Step 3:F(10) = F(9) + F(8) = 34 + 21

F(10) = 55

Example 2: Golden Ratio Approximation

Show that F(10)/F(9) approximates φ.

Step 1:F(10) = 55, F(9) = 34
Step 2:Ratio = 55/34 ≈ 1.617647…
Step 3:φ ≈ 1.618034…

The ratio 55/34 ≈ 1.6176 is within 0.025% of φ.

Common Mistakes & Tips

  • !Off-by-one errors: F(0) = 0, F(1) = 1 in 0-indexed convention; some sources use 1-indexed.
  • !Using Binet's formula for large n without arbitrary-precision arithmetic — floating-point errors accumulate.
  • !Assuming the Fibonacci sequence always starts at 0 and 1; generalized sequences can start with any two values.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

What is the golden ratio and how does it relate to Fibonacci?

The golden ratio φ = (1 + √5)/2 ≈ 1.618 is the limit of the ratio of consecutive Fibonacci numbers. As n grows, F(n+1)/F(n) approaches φ with increasing accuracy.

How fast do Fibonacci numbers grow?

Fibonacci numbers grow exponentially, approximately as φⁿ/√5. F(n) has roughly n × log₁₀(φ) ≈ 0.209n digits.