An arithmetic sequence (also called an arithmetic progression) is a list of numbers where each term is obtained from the previous one by adding a fixed value called the common difference. This calculator handles the four most common tasks: finding the n-th term and partial sum, solving for a missing common difference, solving for a missing number of terms, and recovering the common difference from a known sum. It shows full working, a number-line diagram and a copyable term list — all computed locally with no network requests.
How it works
Every arithmetic sequence is defined by two numbers:
- a₁ — the first term
- d — the common difference (the fixed amount added each step)
From these, any term is given by the general term formula:
a(n) = a1 + (n - 1) * d
The partial sum — the total of the first n terms — follows from the observation that the first and last terms always average to the same value as the middle terms:
S(n) = n/2 * (a1 + a(n)) = n/2 * (2 * a1 + (n - 1) * d)
The calculator also inverts these formulas. To find d from a₁, aₙ and n it rearranges the general term formula to d = (a(n) - a1) / (n - 1). To find n from a₁, d and aₙ it rearranges to n = (a(n) - a1) / d + 1 and checks that the answer is a positive whole number. To find d from a known sum it rearranges the sum formula to d = (2 * S(n) / n - 2 * a1) / (n - 1).
Worked example
Suppose a sequence starts at 3 with a common difference of 4. The terms are 3, 7, 11, 15, 19, 23, 27, 31, 35, 39.
Finding the 10th term:
a(10) = 3 + (10 - 1) * 4 = 3 + 36 = 39
Finding the sum of the first 10 terms:
S(10) = 10/2 * (3 + 39) = 5 * 42 = 210
A quick sanity check: Gauss’s pairing trick pairs the sequence front-to-back: (3 + 39) + (7 + 35) + (11 + 31) + (15 + 27) + (19 + 23) = 5 pairs each summing to 42, giving 210.
| a₁ | d | n | a(n) | S(n) |
|---|---|---|---|---|
| 3 | 4 | 10 | 39 | 210 |
| 1 | 2 | 8 | 15 | 64 |
| 10 | -3 | 5 | -2 | 20 |
| 0.5 | 0.5 | 6 | 3.0 | 10.5 |
Formula note
The sum formula S(n) = n/2 * (a1 + a(n)) is equivalent to S(n) = n/2 * (2 * a1 + (n - 1) * d). Both are exact and either can be used depending on which values are available. The calculator uses the first form when a(n) is already known and the second form when only a₁, d and n are given.
The general term formula a(n) = a1 + (n - 1) * d is a linear function of n (slope d, intercept a1 - d). Plotting a(n) against n always gives a straight line, which is why arithmetic sequences are the discrete counterpart of linear functions.