1. Home
  2. Calculators
  3. Fibonacci Calculator

Fibonacci Calculator

For students and programmers who want an exact Fibonacci number or to check whether a value belongs to the sequence.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Fibonacci Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table.

Features

  • Exact F(n) up to n = 20,000
  • Sum of the first n terms
  • Ratio of each term to the one before
  • Fibonacci membership test
  • Fast-doubling method

Supported formats

Input

  • A typed number

You get

  • On-screen results
  • Copyable text
  • CSV table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Fibonacci Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It uses F(0) = 0 and F(1) = 1 and handles n up to 20,000.
  • Some books start the sequence at 1, 1, which gives the same numbers shifted by one place.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Finding Fibonacci numbers exactly, summing them and testing whether a number belongs

In the Fibonacci sequence each number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13 and on. It shows up in spirals of shells and flowers, in puzzles, in sorting algorithms and in interview questions. This page returns exact terms far beyond what a spreadsheet can show, adds up the terms for you, and checks whether a number of your own belongs to the sequence.

How it works

Adding terms one at a time would take 20,000 steps to reach F(20,000), but the page uses fast doubling instead, which relies on the identities F(2k) = F(k) × (2 × F(k+1) − F(k)) and F(2k+1) = F(k) squared plus F(k+1) squared. These let the position be halved at every step, so only about fifteen steps are needed. All the arithmetic is done with big integers, so every digit is exact. F(20,000) has 4,180 digits.

Finding the nth term

Choose to find the nth Fibonacci number, enter n from 0 to 20,000, and the page shows the term, the number of digits, the sum of all terms from F(0) up to F(n), the ratio of the term to the one before it and, for small n, the first twenty terms. The sum uses the identity that adding F(0) to F(n) always gives F(n + 2) minus 1, so no long addition is needed. A term with more than 40 digits is shown with all its digits in a text box that you can copy or download.

Checking a number

Choose the check option and enter any positive whole number. A number N is Fibonacci exactly when 5 × N squared plus 4 or 5 × N squared minus 4 is a perfect square. The tool tests this with exact integer square roots, and when the answer is yes it tells you the position, such as that 144 is F(12). When the answer is no it prints the two expressions it tested, 5m² + 4 and 5m² − 4, and says that neither is a perfect square.

Edge cases

n must be a whole number from 0 to 20,000. F(0) is 0 and F(1) and F(2) are both 1, so the number 1 is Fibonacci at two positions. The ratio of a term to the previous term is not defined for n below 2 and is left out. Numbers to check can be as large as the page accepts, and the square test stays exact because it uses integers, not floating-point arithmetic.

A worked example

F(50) is 12,586,269,025, a number with 11 digits. The sum of F(0) through F(50) is 32,951,280,098, which is F(52) minus 1. The ratio F(50) divided by F(49) is 1.61803398875, matching the golden ratio 1.6180339887 to every shown digit. F(100) is 354,224,848,179,261,915,075, with 21 digits, and its sum is 927,372,692,193,078,999,175. For the check mode, 144 is a Fibonacci number, F(12), while 145 is not, because 5 × 145² + 4 and 5 × 145² − 4 are not perfect squares.

Limits

The page computes the standard sequence only. Variants such as Lucas numbers, negative indices and generalised recurrences are not offered. The limit of 20,000 is there to keep the page fast and the result readable, since the digits roughly grow by 0.21 per step. The membership test works for numbers you type, not for a list pasted in bulk.

Checked against the current version of the Fibonacci Calculator on .

Frequently asked questions

Why does the ratio of neighbouring Fibonacci numbers approach 1.618?

Because the sequence behaves like a geometric one with ratio equal to the golden ratio, the positive root of x squared equals x plus 1. The ratio F(50) divided by F(49) already agrees with it to 11 decimal places.

Does the sequence start with 0 or with 1?

Both conventions exist. This page uses F(0) = 0 and F(1) = 1, so the list begins 0, 1, 1, 2, 3, 5. Books that start at 1, 1, 2 number each term one place earlier.

What is F(100)?

F(100) is 354,224,848,179,261,915,075, with F(0) = 0 and F(1) = 1.

How can I tell if a number is a Fibonacci number?

A positive integer N is Fibonacci when 5N² + 4 or 5N² − 4 is a perfect square. The tool applies this test exactly.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.