Number Sequence Calculator
Find the next numbers in arithmetic, geometric, and Fibonacci sequences.
Related calculators
About
Number Sequence Calculator
Three calculators sit above this, one for each of the sequences that come up most often. Give an arithmetic or geometric sequence its first term, its step and how far along you want to go, and it returns the terms, the nth value and the running total. The Fibonacci calculator needs only the term number. Each shows the working rather than just the answer.
What a sequence is
A sequence is an ordered list of numbers that follow a pattern. Each entry is a term, and the count of terms is the sequence's length, which can be finite or infinite. Order is part of the definition: 1, 2, 3 and 3, 2, 1 are different sequences, and the same value is free to appear more than once.
A series is what you get when you add the terms up. The distinction is worth keeping straight, because the two behave differently: a sequence can settle down to a limit while the series built from it grows without bound. The "sum" line in each calculator above is a series, not a sequence.
Simple patterns can be written out and left to speak for themselves. Anything less obvious is better given as an indexed formula, a rule that produces the nth term directly from n, which is what the definition line above each calculator does.
Arithmetic sequences
An arithmetic sequence adds the same amount every step. That amount is the common difference, and it can be negative, in which case the terms fall away instead of climbing.
Take 1, 3, 5, 7, 9, 11, 13. The common difference is 2, so the fifth term is 1 + 2 × (5 − 1) = 1 + 8 = 9, which is what the list shows. The formula matters once n gets large: reaching the 500th term by counting up would take all afternoon, and by formula it takes one line.
Adding the terms has a shortcut worth knowing:
For 1 + 3 + 5 + 7 + 9 that gives 5 × (1 + 9) ÷ 2 = 50 ÷ 2 = 25, which matches the long way round. The reason it works is worth seeing once. Write the sequence forwards, write it again underneath backwards, and add the columns: every column totals a₁ + aₙ, and there are n of them. That double-counts the sum, so halve it.
The story attached to this is that Carl Friedrich Gauss produced it as a schoolboy when a teacher set the class to adding the numbers from 1 to 100. Pairing 1 with 100, 2 with 99 and so on gives fifty pairs of 101, and 50 × 101 = 5050.
Geometric sequences
A geometric sequence multiplies by the same amount every step. That multiplier is the common ratio, and it has to be non-zero.
In 1, 2, 4, 8, 16, 32, 64, 128 the ratio is 2 and the scale factor is 1, so the eighth term is 1 × 27 = 128. Note the exponent is n − 1, not n, because the first term has not been multiplied by anything yet. Getting that off by one is the most common mistake with these.
For the first three terms of that sequence: 1 × (1 − 2³) ÷ (1 − 2) = −7 ÷ −1 = 7, which is 1 + 2 + 4. When r is exactly 1 the formula divides by zero, and the sum is simply a × n, since every term is the same.
The difference between the two sequence types is the difference between linear and exponential growth, and it is larger than people expect. Start at 2 and add 5 twenty times and you reach 97. Start at 2 and multiply by 5 twelve times and you are at 97,656,250. The arithmetic sequence has barely moved while the geometric one has run away, which is the same arithmetic behind compound interest and behind why doubling anything a few dozen times gets absurd.
When an infinite sum has a finite answer
If the common ratio sits strictly between −1 and 1, each term is smaller than the last and the total converges on a limit even though the terms never stop:
With a = 0.9 and r = 0.1 that gives 0.9 ÷ 0.9 = 1, which is the honest proof that 0.999... equals 1 rather than merely approaching it. Halving repeatedly, a = 1/2 and r = 1/2 gives 1, so 1/2 + 1/4 + 1/8 + ... totals exactly 1. This is the resolution of Zeno's paradox about never reaching the wall: infinitely many steps, finite total distance.
Outside that range the sum diverges and there is no limit to find. The calculator above reports the sum to infinity when the ratio qualifies and says "diverges" when it does not.
Fibonacci
The Fibonacci sequence starts with two 1s and then each term is the two before it added together:
That gives 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, and onward. Some texts start at 0 and 1 instead, which shifts every index by one, so a term number quoted without saying which convention it uses is ambiguous. The calculator above starts at a₁ = 1, a₂ = 1, which makes the 10th term 55.
The sum has a neat shortcut of its own: adding the first n terms gives the (n+2)th term minus 1. For the first ten that is 144 − 1 = 143, and the calculator uses exactly this rather than adding the terms one at a time.
Divide any term by the one before it and the answer settles on the golden ratio, φ = (1 + √5) ÷ 2, about 1.6180339887. At 55 ÷ 34 you are already at 1.6176, and the approximation tightens from there. Because of that there is a closed form, Binet's formula, that jumps straight to the nth term without the loop:
where ψ is (1 − √5) ÷ 2. It is exact in principle, and in floating point it starts drifting well before the term numbers people actually ask for, which is why this calculator adds the terms in exact whole-number arithmetic instead. That is also why it can hand back the 100th term, 354224848179261915075, with all 21 digits correct rather than rounded off at the end.
Where Fibonacci actually turns up
Leonardo of Pisa introduced the sequence to European mathematics in Liber Abaci in 1202, through an artificial problem about breeding rabbits. It had been described in Indian mathematics centuries earlier in work on Sanskrit poetic metre.
The counts really do appear in plants. Sunflower seed heads commonly show 34 spirals one way and 55 the other, or 55 and 89 on larger heads, and pine cones and pineapples show smaller consecutive pairs. The reason is packing efficiency: seeds placed at successive turns of the golden angle, about 137.5°, fill a disc more evenly than any other angle, and the spiral counts that emerge are Fibonacci numbers.
It also has a genuine role in computing. The worst case for Euclid's algorithm for the greatest common divisor is a pair of consecutive Fibonacci numbers, a result proved by Gabriel Lamé in 1844 and the first known analysis of an algorithm's running time.
One popular claim is worth dropping: the nautilus shell is not a golden spiral. It is a logarithmic spiral, which is a real and elegant thing, but its growth ratio is nowhere near φ. Plenty of the art and architecture attributions are equally shaky. The plant spirals and the algorithm result stand up; the aesthetic claims mostly do not.
Reading your result
Check the index convention before comparing an answer with a textbook. All three calculators here treat the first term as n = 1, so "the 10th value" means ten terms in, counting the first.
For a geometric sequence, watch the size of the numbers. A double stops counting in exact whole numbers past about 9 quadrillion, and the calculator flags the result when it crosses that line rather than printing approximate digits as though they were exact. The Fibonacci calculator has no such limit, since it works in exact integers throughout.
If your sequence is neither of these, the pattern may still be arithmetic or geometric one level down. Take the differences between consecutive terms: if those are constant it was arithmetic, and if the differences of the differences are constant you have a quadratic sequence. Take the ratios instead, and a constant means geometric.
Common questions
Frequently asked questions
An arithmetic sequence adds the same amount each step, so it grows in a straight line. A geometric sequence multiplies by the same amount, so it grows exponentially. Starting at 2, adding 5 twenty times reaches 97; multiplying by 5 twelve times reaches 97,656,250.
Use a_n = a_1 + f x (n - 1), where f is the common difference. The multiplier is n - 1 rather than n because the first term has not had the difference added to it yet. With a first term of 2 and a difference of 5, the 20th term is 2 + 5 x 19 = 97.
The sum of the first n terms is n x (a_1 + a_n) / 2. Write the sequence forwards and backwards and add the columns: every column totals a_1 + a_n and there are n of them, which double-counts the sum, so you halve it.
Because the first term has not been multiplied by the ratio yet. The second term has been multiplied once, the third twice, and so on. Using n instead of n - 1 shifts the whole sequence one place along, and it is the most common error with these.
Yes, if it is geometric with a common ratio strictly between -1 and 1. The sum to infinity is a / (1 - r). With a = 0.9 and r = 0.1 that gives exactly 1, which is why 0.999... equals 1 rather than merely approaching it.
Both conventions are in use, which is why a term number is ambiguous unless the starting point is stated. This calculator starts at a_1 = 1 and a_2 = 1, making the 10th term 55. Starting from 0 shifts every index by one.
Divide any Fibonacci term by the one before it and the answer converges on the golden ratio, about 1.6180339887. By 55 divided by 34 you are already at 1.6176. Binet's formula uses this to jump straight to the nth term without looping.
Take the differences between consecutive terms. If they are constant the sequence is arithmetic. If the differences of those differences are constant it is quadratic. Take the ratios instead, and a constant ratio means the sequence is geometric.