Number Sequence Calculator

Generate arithmetic and geometric sequences from a first term and a common difference or ratio. The calculator returns the nth term, the partial sum, the list of terms, and (where it exists) the infinite geometric sum.

#math#sequence#arithmetic#geometric#series

The starting value of the sequence.

Arithmetic: amount added each step. Geometric: factor each term is multiplied by.

Up to 1000 terms.

nth term (a₁₀)

29

Sum of 10 terms (Sₙ)
155
First term (a₁)
2
Terms
2, 5, 8, 11, 14, 17, 20, 23, 26, 29

aₙ = a₁ + (n − 1) d, where d is the common difference. The partial sum is Sₙ = n/2 × (a₁ + aₙ).

How to use this calculator

Pick the sequence type — arithmetic adds a fixed amount between terms, geometric multiplies by a fixed factor. Enter the first term, the common difference (arithmetic) or common ratio (geometric), and how many terms you want. The calculator returns the nth term as the headline, plus the partial sum, the full list of terms (up to twelve are shown inline), and for geometric sequences with |r| < 1 the infinite sum the series converges to.

How the calculation works

An arithmetic sequence has the form aₙ = a₁ + (n − 1) d, where d is the common difference between consecutive terms. The partial sum is Sₙ = n/2 × (a₁ + aₙ). A geometric sequence has the form aₙ = a₁ × r^(n − 1), where r is the common ratio. The partial sum is Sₙ = a₁ × (1 − rⁿ) / (1 − r) when r ≠ 1, and simply n × a₁ when r = 1. When |r| < 1, the infinite series converges to a₁ / (1 − r); otherwise it diverges. Negative ratios produce an alternating sequence.

Worked example

Arithmetic: first term 2, common difference 3, 10 terms. The sequence is 2, 5, 8, 11, 14, 17, 20, 23, 26, 29. The 10th term is 2 + (10 − 1) × 3 = 29. The sum is 10/2 × (2 + 29) = 155. Geometric: first term 3, common ratio 2, 8 terms. The sequence is 3, 6, 12, 24, 48, 96, 192, 384. The 8th term is 3 × 2^7 = 384. The sum is 3 × (1 − 2^8) / (1 − 2) = 3 × 255 = 765. With ratio 0.5 instead, the infinite sum converges to 3 / (1 − 0.5) = 6.

Frequently asked questions

What is the difference between an arithmetic and a geometric sequence?

An arithmetic sequence increases (or decreases) by adding the same number — the common difference — between each pair of consecutive terms. A geometric sequence increases (or decreases) by multiplying by the same factor — the common ratio. 2, 4, 6, 8 is arithmetic (d = 2). 2, 4, 8, 16 is geometric (r = 2). Arithmetic sequences plot as a straight line; geometric sequences plot as an exponential curve.

When does a geometric series have a finite infinite sum?

Only when the common ratio r satisfies |r| < 1. In that case the series converges to a₁ / (1 − r). If |r| ≥ 1 the partial sums grow without bound (or oscillate) and the infinite sum is said to diverge. Classic convergent example: 1, 1/2, 1/4, 1/8, … sums to 2.

Can the common difference or ratio be negative?

Yes. A negative common difference produces a decreasing arithmetic sequence (10, 7, 4, 1, −2, …). A negative common ratio produces an alternating geometric sequence with signs flipping each term (2, −4, 8, −16, …). Both are handled normally — the same formulas apply.

What if my common ratio is 1 or 0?

A geometric sequence with r = 1 is constant: every term equals a₁, and the partial sum is n × a₁. With r = 0, every term after the first is zero, so the sum equals a₁. Both are valid, if not very interesting, and the calculator handles them without dividing by zero.

How large can the number of terms be?

Up to 1000 terms. Beyond that, very large geometric sequences can overflow JavaScript’s double-precision range — Number.MAX_VALUE is roughly 1.8 × 10^308. If the nth term exceeds that, the result becomes Infinity. For arithmetic sequences the limit is purely computational; for geometric you may hit overflow with large |r| and high n long before 1000.

How do I find a missing term if I know other terms?

For an arithmetic sequence, the common difference d = (aₙ − a₁) / (n − 1). For a geometric sequence, the common ratio r = (aₙ / a₁)^(1/(n−1)). Once you have d or r, plug them into this calculator with a₁ and n to regenerate the full sequence. A dedicated solver for missing terms is a future addition.