How to use the Fibonacci sequence calculator
- Choose what to find. “F(n)” gives a single term, “List terms” gives every term between two indices, and “Is it Fibonacci?” tests a whole number.
- Enter a whole-number index, or a number to test. n can be 0, positive, or negative, from −10,000 to 10,000. Listing is limited to 200 terms at a time.
- Read the exact value. The large figure is F(n). The cards show the neighboring terms and, when F(n) is not 0, the ratio of the next term to this one.
The calculator opens on n = 10. With F(0) = 0 and F(1) = 1, F(10) is 55, the same tenth term given in OpenStax’s Precalculus 2e, section 11.1.
The Fibonacci sequence
Each Fibonacci number is the sum of the two before it. This calculator uses the indexing that starts at zero:
The first terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, …. Many textbooks, including OpenStax Precalculus 2e, section 11.1, start the list at 1, 1, 2, 3, 5, … and write a recursive formula with two initial terms:
Those two conventions agree for every n ≥ 1: their aₙ is this page’s F(n). In the textbook, the eighth and ninth terms are 21 and 34, so the tenth term is 21 + 34 = 55. A homework problem that calls 1 the first term is asking for F(n) with this same numbering.
The sequence is not an arithmetic or geometric sequence: the differences and the ratios both change from term to term. Neighboring ratios do settle toward the golden ratio (1 + √5) ÷ 2 ≈ 1.6180339887, which the F(n) result shows as F(n + 1) ÷ F(n). That ratio is a description, not how the value is computed.
How the terms are computed
Every result is obtained from the recurrence with exact whole-number arithmetic. The calculator does not use Binet’s formula to produce F(n), because the rounding in that formula can be off for large n. F(20) is 6,765, F(30) is 832,040, and F(100) is 354,224,848,179,261,915,075, all of the digits included.
For a negative index the same recurrence extends uniquely, by the rule F(−n) = (−1)ⁿ⁺¹ F(n). So F(−1) = 1, F(−2) = −1, F(−3) = 2 and F(−6) = −8. Load “F(−6)” to see it. Indices below −10,000 or above 10,000 are outside this page’s range.
Testing whether a number is Fibonacci
A non-negative whole number x is a Fibonacci number exactly when 5x² + 4 or 5x² − 4 is a perfect square, a characterization proved by Ira Gessel in 1972. The test is exact, and the calculator then finds every index in range at which the value appears. 0 is only F(0). 1 is F(1), F(2) and also F(−1). 55 is only F(10). 4 is not a Fibonacci number: 5 × 16 + 4 = 84 and 5 × 16 − 4 = 76, and neither is a square. If the square test passes but the index is outside −10,000 to 10,000, the page still reports that the number is Fibonacci and notes that the index is out of range.
A negative number is in the sequence only when it equals F(−n) for some n, which happens when the sign of (−1)ⁿ⁺¹ matches. −8 is F(−6); −3 is F(−4); −1 is F(−2).
Not a Fibonacci retracement tool
This page is a mathematics tool for the Fibonacci sequence of whole numbers. It does not compute Fibonacci retracement levels, support or resistance, or any trading or investment figure. Those uses of the Fibonacci name are a different topic and are not offered here.
Where the sequence appears
OpenStax Precalculus 2e, section 11.1, introduces the sequence with a recursive formula and notes it in some natural patterns: the chambers of a nautilus shell, pinecones, and the number of petals on certain flowers — a calla lily with one petal, a black-eyed Susan with 13, and daisies with 21 or 34.
For other kinds of lists — a constant difference, or a constant ratio — use the number sequence calculator. To add a polynomial written in sigma notation, use the summation calculator.
Sources & assumptions
How this calculator gets its numbers. Full method: our methodology.
- F(0) = 0, F(1) = 1, and F(n) = F(n − 1) + F(n − 2). For n ≥ 1 this is the same list as a₁ = 1, a₂ = 1 in OpenStax Precalculus 2e, 11.1.
- Negative indices use F(−n) = (−1)ⁿ⁺¹ F(n). Terms are computed from the recurrence with exact whole numbers, not from Binet’s formula.
- A non-negative whole number x is Fibonacci exactly when 5x² + 4 or 5x² − 4 is a perfect square. n is limited to −10,000 through 10,000; lists are limited to 200 terms.
Sources
- OpenStax (Rice University), Precalculus 2e, 11.1 Sequences and Their Notations. Recursive formulas, and the Fibonacci sequence with a₁ = 1, a₂ = 1, aₙ = aₙ₋₁ + aₙ₋₂ (the 10th term is 55). The section also notes the sequence in natural patterns such as nautilus chambers, pinecones, and petal counts (calla lily 1, black-eyed Susan 13, daisies 21 or 34).
- The Fibonacci Quarterly, Problem H-187: n is a Fibonacci Number if and Only if 5n² + 4 or 5n² − 4 is a Square. Ira Gessel’s 1972 characterization (vol. 10, pp. 417–419): a positive integer n is a Fibonacci number if and only if 5n² + 4 or 5n² − 4 is a perfect square.
Last reviewed . This is a mathematics tool for the Fibonacci sequence, not a retracement or trading calculator.
Frequently asked questions
What is the 10th Fibonacci number?
With F(0) = 0 and F(1) = 1, F(10) = 55. Textbooks that start the sequence at 1, 1, 2, … also give 55 as the 10th term.
Does the sequence start at 0 or at 1?
Both conventions are used. This calculator uses F(0) = 0, F(1) = 1. From n = 1 onward, that is the same list as 1, 1, 2, 3, 5, …, so the nth term for n ≥ 1 does not depend on whether F(0) is shown.
How do I check whether a number is a Fibonacci number?
A non-negative whole number x is Fibonacci exactly when 5x² + 4 or 5x² − 4 is a perfect square (Gessel, 1972). The “Is it Fibonacci?” mode runs that test and reports the index.
Are negative indices allowed?
Yes. The recurrence extends uniquely to negative n by F(−n) = (−1)ⁿ⁺¹ F(n). For example, F(−6) = −8.
Is this a Fibonacci retracement calculator?
No. This page computes terms of the Fibonacci sequence of whole numbers. It does not calculate retracement levels or any trading figures.
How are large terms calculated?
By the recurrence F(n) = F(n − 1) + F(n − 2), using exact whole-number arithmetic. Binet’s formula is not used to produce the result.