Navigation

HomeImage ToolsCode ToolsMath ToolsDate ToolsGeneratorsUtilities
Color ToolsText ToolsPDF Tools

Test Fibonacci Number

Check if a given number belongs to the Fibonacci sequence.

What Is a Fibonacci Number?

Drop in any integer and find out if it belongs to the sequence 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89... where each term is the sum of the two before it. Check uses the 5n²±4 perfect-square trick for instant answers, with BigInt arithmetic so numbers hundreds of digits long still work. And everything runs in your browser. Nothing gets uploaded.

FAQ

How does the test work?

A number n is Fibonacci if 5n²+4 or 5n²−4 is a perfect square. For large numbers, we also iterate the sequence using BigInt to find the exact index.

Is 0 a Fibonacci number?

Yes. 0 is the 0th Fibonacci number (F(0) = 0).

What about negative numbers?

This tool tests non-negative integers only. The negafibonacci extension exists but is not covered here.

How large can the number be?

The tool uses BigInt arithmetic, so it can handle very large numbers with hundreds of digits.

Related Tools