Fibonacci Calculator
Generate the Fibonacci sequence up to any term and check if a number belongs to the sequence.
Did this tool work for you?
How to use this calculator
Each Fibonacci number is the sum of the two preceding numbers, starting from 1, 1.
- 1
Enter N to generate the first N Fibonacci numbers (up to 30).
- 2
Enter a number in the check field to see if it belongs to the Fibonacci sequence.
- 3
Watch the ratio F(n)/F(n−1) approach the golden ratio φ ≈ 1.618.
Frequently asked questions
Where does the sequence start?
With F(1) = 1 and F(2) = 1, so the first ten terms are 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Many textbooks begin at F(0) = 0, F(1) = 1. From F(1) onward the terms are identical (F(10) is 55 either way); this page simply has no 0 term.
What is the maximum number of terms?
Thirty. If you enter a larger N, the calculator silently uses 30 and prints the first 30 numbers, ending at F(30) = 832040. The check field is a separate input and can be much larger.
What happens with N below 1 or a decimal?
N is rounded down to a whole number. 7.9 becomes 7. Anything that rounds down to less than 1, including 0, negatives and a cleared field, returns the error "N must be at least 1".
Is 0 a Fibonacci number according to the checker?
The checker answers No for 0 and for negative numbers, because this tool’s sequence starts at 1. Many references do count 0 as F(0), so you may see a different answer elsewhere. Only whole numbers of 1 or more can return Yes; 1.5, for example, returns No.
How does the Fibonacci membership check work, and is it reliable for big values?
It steps through the sequence until it reaches or passes your number and compares for equality, which is exact for every integer up to JavaScript’s safe integer limit of 9,007,199,254,740,991. Above that limit the result line says the value is too large to check exactly instead of guessing.
Why is the ratio line not exactly the golden ratio?
The line shows F(N) ÷ F(N−1) for the number of terms you asked for, which only approaches φ = 1.618034 as N grows. At N = 10 it is 1.617647, and at N = 30 it equals 1.618034 to six decimals. At N = 2 it is 1.000000, and at N = 1 it shows N/A because there is no previous term.
Does it show the nth term without listing all earlier ones?
It always lists the terms up to N and also prints F(N) on its own line. Use N = 30 to get F(30). It cannot jump to F(100) or beyond because of the 30-term cap.
Fibonacci calculator — list terms, find F(n) and test a number
The rule and where this sequence begins
Each term is the sum of the two before it: F(n) = F(n−1) + F(n−2). This page starts at F(1) = 1 and F(2) = 1, so the sequence runs 1, 1, 2, 3, 5, 8, 13 and so on. Enter a count N up to 30 to list that many terms, and enter a separate number to test whether it belongs to the sequence. The two inputs work independently of each other.
| n | F(n) |
|---|---|
| 10 | 55 |
| 11 | 89 |
| 12 | 144 |
| 20 | 6765 |
| 25 | 75025 |
| 30 | 832040 |
Worked example: the default run
With N = 10 and a check value of 89, the tool lists 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, reports F(10) = 55 and answers Yes for 89, because 89 is the 11th term. It also prints the ratio 55 ÷ 34 = 1.617647 next to the golden ratio 1.618034.
Worked example: a number that is not in the sequence
Asking about 100 with N = 30 returns No: the terms near it are 89 and 144, and nothing lies between them. The same run gives the first 30 terms ending at 832040, and a ratio of 1.618034 that now matches the golden ratio to six decimals. Checking 144 with only N = 2 still returns Yes, which shows the check does not depend on how many terms you list.
Why the ratio settles near 1.618
Divide each term by the previous one and the results oscillate around, then close in on, the golden ratio φ = (1 + √5) ÷ 2 ≈ 1.618034. The tool shows this at your chosen N: 1.000000 at N = 2, 1.617647 at N = 10, and 1.618034 at N = 30. The pattern is a standard property of any sequence generated by adding the two previous terms, whatever the starting numbers.
What the tool leaves out
There is no F(0) = 0 term, no negative indices, and no terms beyond the 30th. Any N above 30 is capped at 30. For larger terms you need exact big-integer arithmetic, because ordinary numbers lose precision after 9,007,199,254,740,991. A number above that threshold gets a "too large to check exactly" message in the check line.
Learn more from an authoritative source:
WikipediaSpeed Distance Time Calculator
Solve for speed, distance, or time using the fundamental relationship: Distance = Speed × Time.
Hex Color Converter
Convert between HEX, RGB, HSL, and HSV color formats. Preview the color and get values for CSS, design, and development.
Vector Calculator
Add, subtract, and find the magnitude, dot product, and angle between 2D or 3D vectors.
Matrix Calculator (2×2)
Calculate the determinant, inverse, transpose, and eigenvalues of a 2×2 matrix.
Ohm's Law Calculator
Calculate voltage, current, resistance, or power using Ohm's Law. Enter any two values to find the other two instantly.
Projectile Motion Calculator
Calculate range, maximum height, time of flight, and velocity components for a projectile launched at any angle and speed. Assumes no air resistance.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →