Home / Math / Number Sequence Calculator

Number Sequence Calculator: Arithmetic and Geometric

Enter the first term and the common difference or ratio to get the nth term and the sum of the first n terms. Or paste a list of numbers and let the tool detect the pattern.

By Adzita Editorial Team · Updated 2026-11-03 · How we build and check our tools

At least three numbers separated by commas or spaces.
Also the number of terms added for the sum.

Arithmetic sequences

An arithmetic sequence adds the same amount, the common difference d, to get from each term to the next. Starting from the first term a, the nth term is a + (n − 1) × d. The sequence 3, 7, 11, 15 has a = 3 and d = 4, so its tenth term is 3 + 9 × 4 = 39.

The sum of the first n terms is n ÷ 2 × (2a + (n − 1) × d), which is also the number of terms times the average of the first and last. For the example this is 10 ÷ 2 × (6 + 36) = 210. The story of pairing first and last terms to sum 1 to 100 is a classic illustration of this formula.

Geometric sequences

A geometric sequence multiplies by a fixed common ratio r each step. The nth term is a × rn−1 and the sum of the first n terms is a × (1 − rn) ÷ (1 − r) when r is not 1. If r equals 1 every term equals a, so the sum is simply a × n.

When the ratio lies strictly between −1 and 1, the terms shrink toward zero and the sum converges to a ÷ (1 − r) as the number of terms grows without limit. The calculator shows this infinite sum whenever it applies. With a ratio of 1 or larger in size, the terms do not settle and there is no finite infinite sum. Geometric growth underlies compound interest, population models and repeated halving.

Detecting a pattern from a list

In detect mode the tool checks whether the gaps between consecutive terms are all equal (arithmetic) or the quotients are all equal (geometric). It needs at least three numbers, because two numbers fit infinitely many patterns. If the test passes, the sequence is treated exactly as if you had typed the first term and the difference or ratio.

Many familiar sequences are neither. The squares 1, 4, 9, 16 have growing differences, and the Fibonacci numbers add the two previous terms. Those return a message rather than a wrong guess. A short list can also be consistent with more than one rule, so treat the detected pattern as the simplest fit, not proof of the rule behind your data.

Reading the results and avoiding slips

Worked example

A geometric sequence starts at 2 and triples each time: 2, 6, 18, 54, 162. Find the fifth term and the sum of the first five.

Inputs

Sequence typeGeometric (multiply by a constant)
First term (a)2
Common ratio (r)3
Term number (n)5

Result

Term 5 = 162

Sum of the first 5 terms = 242

TypeGeometric, ratio r = 3
First term2
Term number 5162
Sum of the first 5 terms242
Formulaa(n) = a × r^(n − 1)

First 5 terms and running sum

nTermSum so far
122
268
31826
45480
5162242

Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.

Frequently asked questions

How do I find the nth term of an arithmetic sequence?

Take the first term and add (n − 1) times the common difference. For 3, 7, 11 with n = 10, that is 3 + 9 × 4 = 39.

What is the difference between a sequence and a series?

A sequence is the ordered list of terms, while a series is the sum of those terms. This calculator reports both the nth term and the sum of the first n terms.

How do I find the common ratio of a geometric sequence?

Divide any term by the term before it. In 2, 6, 18, 54 each division gives 3, so the ratio is 3. All such quotients must match for the sequence to be geometric.

When does a geometric series have a finite sum to infinity?

Only when the absolute value of the ratio is less than 1. Then the sum equals the first term divided by one minus the ratio.

Why does the detector ask for three terms?

Two numbers define one difference and one ratio, so they would always look like both patterns. A third term gives the minimum evidence needed to test consistency.

Fibonacci CalculatorExact nth Fibonacci number, sequence list with golden-ratio convergence, and a Fibonacci checker.Present Value CalculatorDiscount a future lump sum, plus optional yearly cash flows, back to today's value.Exponent CalculatorRaise a base to any power: whole, negative or fractional, with exact integers and scientific notation.Percentage CalculatorPercent of a number, percent change, and increase or decrease by a percent, with working.

References and sources

  1. Stewart, J. Calculus, chapter on sequences and series (standard formulas for arithmetic and geometric progressions).

Check primary sources for anything you rely on.