Is it a Fibonacci number?
Test whether a number is in the Fibonacci sequence using the 5n²±4 perfect-square rule, and see its index when it is. Exact for large values via BigInt.
Input
Fibonacci membership
—Type a whole number to check whether it's in the Fibonacci sequence.
A non-negative integer n is a Fibonacci number exactly when 5n² + 4 or 5n² − 4 is a perfect square. The sequence starts F0 = 0, F1 = 1, then each term is the sum of the previous two: 0, 1, 1, 2, 3, 5, 8, 13, 21…
A free Fibonacci number checker that tells you instantly whether any whole number belongs to the Fibonacci sequence — and if so, which index it holds. Uses the 5n² ± 4 perfect-square test, backed by BigInt arithmetic for exact results on large values. Runs entirely in your browser.
How to check if a number is a Fibonacci number
- Type the number you want to test into the input.
- The result appears immediately — Fibonacci or not.
- If it is a Fibonacci number, the index F(n) is shown.
The 5n² ± 4 perfect-square test
A positive integer n is a Fibonacci number if and only if 5n² + 4 or 5n² - 4 is a perfect square. This gives an O(1) membership test without generating the sequence. Because the Fibonacci numbers grow exponentially, checking whether a number is a perfect square for very large n requires exact integer arithmetic — BigInt is used here to ensure correctness where floating-point square root estimates would be unreliable.
Frequently asked questions
How can I tell if a number is a Fibonacci number?
A number n is Fibonacci if and only if 5n² + 4 or 5n² - 4 is a perfect square. This tool applies that test instantly.
What is the Fibonacci index?
The index F(n) is the position in the sequence starting from F(0) = 0. For example, 13 is F(7) because it is the 8th term (counting from zero).
Is 0 a Fibonacci number?
Yes. By convention, F(0) = 0 is the first term of the sequence.
What is the largest Fibonacci number this tool can check?
There is no fixed limit. BigInt arithmetic handles any size exactly, though the input field may impose practical constraints.
Randomly