Number Sequence Calculator

About this calculator

The Number Sequence Calculator works out the terms of an arithmetic, geometric or Fibonacci sequence. Give it the first term, the common difference or ratio, and how many terms you want, and it returns the nth term, the sum of the first n terms and the sequence itself.

Each result comes with the formula and a worked substitution so you can follow the arithmetic.

A whole number from 1 to 1,000.
Embed this calculator

Paste this code into a Custom HTML block on your site. The calculator fits the width of the block. Adjust the height in the code if you want more room for results.

Find this widget in the publisher directory

What is a number sequence?

A number sequence is an ordered list of numbers that follows a rule. Each entry is called a term, and its position in the list is its index, usually written n. Sequences show up in savings plans, population models, computer algorithms, and patterns in nature. This calculator handles the three families people ask about most: arithmetic, geometric and Fibonacci.

Arithmetic sequences

In an arithmetic sequence you add the same amount, the common difference d, to get from one term to the next. Starting at a₁ the terms are a₁, a₁ + d, a₁ + 2d, and so on.

aₙ = a₁ + (n − 1) × d
Sₙ = n × (a₁ + aₙ) ÷ 2

Worked example. Start at 1 with d = 2. The sequence is 1, 3, 5, 7, 9. The fifth term is 1 + 4 × 2 = 9, and the sum of the first five terms is 5 × (1 + 9) ÷ 2 = 25. The sum formula works because pairing the first and last terms, the second and second to last, and so on gives equal totals.

Geometric sequences

In a geometric sequence you multiply by the same factor, the common ratio r, at every step. Starting at a₁ the terms are a₁, a₁r, a₁r², and so on.

aₙ = a₁ × r^(n−1)
Sₙ = a₁ × (1 − rⁿ) ÷ (1 − r), r ≠ 1

Worked example. Start at 1 with r = 2: 1, 2, 4, 8, 16, 32, 64, 128. The eighth term is 1 × 2⁷ = 128. The sum of the first three terms is 1 × (1 − 2³) ÷ (1 − 2) = 7. When r = 1 every term equals a₁, so the sum is simply n × a₁.

RatioBehavior
r > 1Terms grow without bound
0 < r < 1Terms shrink toward zero
r < 0Terms alternate in sign
r = 1Every term is the same

Fibonacci sequence

The Fibonacci sequence starts 1, 1 and then each new term is the sum of the two before it: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. (Some texts put an extra 0 in front.) The ratio between neighboring terms approaches the golden ratio, about 1.618. This calculator indexes the first term as F₁ = 1, so the tenth term is 55 and the first ten terms add up to 143. Because Fibonacci numbers get large quickly, the calculator uses exact big-integer arithmetic and shows every digit, even for n = 1,000.

A handy identity: the sum of the first n Fibonacci terms equals the term two places further along, minus one. For the first ten terms the sum is 88, which is 89 − 1.

Choosing the right type

  • Constant steps (a fixed amount added each time) point to an arithmetic sequence.
  • Constant growth factors (a fixed percentage each time) point to a geometric sequence.
  • Each term built from the previous two points to a Fibonacci style recurrence.

Common uses

Arithmetic sequences model steady savings deposits or evenly spaced seats in a stadium. Geometric sequences model compound interest, depreciation and the spread of a doubling process. Fibonacci numbers appear in sorting algorithms, spiral growth patterns in plants and financial retracement charts. Knowing which family a sequence belongs to lets you jump straight to any term without listing all the ones before it.

Limits and notes

Terms beyond the 50th are not listed individually, but the nth term and the sum are always computed for the n you enter, up to 1,000. For geometric sequences with a large ratio the values can exceed what a double precision number can hold exactly, so very large results are shown in scientific notation and are approximate.

Practice problems

Try these to test your understanding. First, a sequence starts at 10 and drops by 3 each step: the tenth term is 10 + 9 × (−3) = −17 and the first ten terms add up to 10 × (10 + (−17)) ÷ 2 = −35. Second, a savings jar starts with 5 dollars and each month the amount is multiplied by 1.1: after 12 months the balance is 5 × 1.1¹¹ ≈ 14.27 dollars at the start of the twelfth month. Third, in the Fibonacci sequence the seventh term is 8 and the first seven terms sum to 20, which is the ninth term (21) minus one.

Frequently asked questions

How do I find the nth term of an arithmetic sequence?
Use aₙ = a₁ + (n − 1) × d. For a₁ = 1, d = 2 and n = 5 you get 1 + 4 × 2 = 9.
How do I sum a geometric sequence?
For r not equal to 1, Sₙ = a₁ × (1 − rⁿ) ÷ (1 − r). With a₁ = 1 and r = 2, the first three terms sum to 7.
What are the first Fibonacci numbers?
1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Every term after the first two is the sum of the previous two.
Can the common ratio or difference be negative or a fraction?
Yes. A negative difference gives a decreasing sequence, a negative ratio gives alternating signs, and a fractional ratio gives terms that shrink.

Formulas and sample results on this page were checked against independent references. Page last reviewed or updated . How we verify calculators. Project led by Shaun Connell.