Example 1
- Mode: ends
- a₁ = 3
- aₙ = 21
- n = 7
84
What sum at 3 and 21, n = 7? 84.
Enter the first term, the last term or the common difference d, and the count n. The calculator computes Sₙ = n·(a₁+aₙ)/2. With 3 and 21 over seven terms the sum is 84. In step mode: 2, d = 3, n = 4 gives 26. This is not a geometric series sum, not an infinite AP, and not the mean of an arbitrary list without a fixed step.
Enter the fields for your mode to see the sum Sₙ.
A single nth term (without the sum) lives on the arithmetic sequence term page. For a sum with ratio q open the geometric series sum.
The calculator uses the numbers you enter: the first term a₁, the last term aₙ or the step d, and the term count n. The model is the classic finite sum of an arithmetic sequence: Sₙ = n·(a₁+aₙ)/2. Equivalently Sₙ = n/2·(2a₁+(n−1)d). For a₁ = 3, aₙ = 21 and n = 7 the end average is 12, and 12·7 = 84. For a₁ = 2, d = 3 and n = 4 the last term is 11 and the sum is 26. For a₁ = 20, aₙ = 5 and n = 4 the step is −5 and the sum is 50.
The term count n must be a whole number of at least 1 — parseTermCount rejects 7.5. Field ids stay a, b, c and d. The result is shown after locale formatting, with no artificial trim.
The step d may be negative: then the sequence decreases. At n = 1 the sum equals a₁ and the step is taken as 0.
The sibling arithmetic-sequence term page returns one aₙ = a₁+(n−1)r. A geometric series sum multiplies by a constant ratio q. This page adds terms with a constant difference and returns only Sₙ.
Check example 3, 21, 7 → 84 first. Then step mode 2, 3, 4 → 26 and the decreasing case 20, 5, 4 → 50. The panel also shows the end average, the equivalent form with d, and bars for the first terms.
For an arithmetic sequence with first term a₁, last term aₙ and term count n:
Sₙ = n·(a₁ + aₙ) / 2.
When you know the step d: aₙ = a₁ + (n − 1)·d, then Sₙ = n/2 · (2a₁ + (n − 1)·d).
Mathematical model: finite sum of an arithmetic series (arithmetic progression, common difference d). This is not a lone nth term and not a geometric sum with ratio q.
An arithmetic sequence is a sequence (aₖ) with constant common difference d (Polish school texts often use r): aₖ₊₁ = aₖ + d and aₖ = a₁ + (k−1)·d. The sum of the first n terms is Sₙ = a₁ + … + aₙ. For such a sequence Sₙ = n·(a₁ + aₙ)/2. After substituting aₙ = a₁+(n−1)d you get the equivalent form Sₙ = n/2·(2a₁+(n−1)d). Intuition: end pairs share the same sum; the end average times n is the total.
Ends mode reads a₁, aₙ, n and sets d = (aₙ−a₁)/(n−1) when n > 1 (at n = 1 it takes d = 0 and requires aₙ = a₁; any other aₙ gives an error message). Step mode reads a₁, d, n, builds aₙ, then the same sum. Assumption: the entered aₙ is the nth term of the same sequence as a₁.
Summing equal increments is among the oldest arithmetic patterns. A popular anecdote about young Carl Friedrich Gauss (1777–1855) summing 1…100 by pairing 1+100, 2+99, … illustrates S = n·(first+last)/2. Historians note that the end-average idea was known earlier (including in Indian traditions) — the Gauss story is a teaching illustration, not a claim of priority. In high school the arithmetic series sum sits beside the nth term and before the geometric sum. A sequence is the list a₁…aₙ; a series is their sum — this page returns Sₙ.
Domain: a₁, aₙ, d finite reals; n an integer ≥ 1. Operations are multiplication, addition and division by 2 — no exponentiation. With d = 0: Sₙ = n·a₁. With d > 0 the sequence increases; with d < 0 it decreases. The average (a₁+aₙ)/2 is also the mean of all n terms. The two formulas agree exactly when aₙ = a₁+(n−1)d; the panel shows both numbers. Sₙ₊₁ − Sₙ = aₙ₊₁.
Write Sₙ = a₁ + (a₁+d) + … + (a₁+(n−1)d). Reverse and add: 2Sₙ = n·(a₁+aₙ), hence Sₙ = n·(a₁+aₙ)/2. In ends mode set d from the ends; in step mode set aₙ = a₁+(n−1)d. Compute avg = (a₁+aₙ)/2, Sₙ = n·avg and alt = n/2·(2a₁+(n−1)d). Examples: 3, 21, 7 → 84; 2, d = 3, n = 4 → 26; 20, 5, 4 → 50.
3, 21, 7 → 84. 2, d = 3, n = 4 → 26. 20, 5, 4 → 50. 1, 10, 10 → 55. 10, d = 10, n = 4 → 100. 5, d = −2, n = 4 → 8. At n = 1 with a₁ = 7 the sum is 7. Extreme |a₁|, |d| and n may yield Infinity in floating-point arithmetic.
Computation: (n * (a1 + an)) / 2 and (n / 2) * (2 * a1 + (n - 1) * d) in the browser’s floating-point arithmetic. For school examples both paths agree; extremes may show floating-point rounding. n is validated by parseTermCount (integer ≥ 1). Bars show the first min(n, 8) terms; full Sₙ stays in the panel.
In ends mode the calculator does not check whether the entered aₙ “belongs” to another sequence — it assumes aₙ is the nth term of the same progression. When you know only a₁, d and n, use step mode: first aₙ = a₁ + (n − 1)·d, then the same sum Sₙ = n·(a₁ + aₙ)/2. When you know only a₁, aₙ and n, the step is d = (aₙ − a₁)/(n − 1) for n > 1. Both modes finish with the same end-average formula.
The arithmetic mean of all n terms of an arithmetic sequence equals the end average (a₁ + aₙ)/2. That is not the same page as a mean of an arbitrary list: here a constant step is part of the model. The sibling arithmetic-term page returns one aₙ; the geometric series sum multiplies by a constant ratio q instead of adding d. This page computes only the finite sum Sₙ.
Gauss pairing also works with negative d: the pairs (a₁ + aₙ), (a₂ + aₙ₋₁), … still share the same sum 2Sₙ/n. When n is odd the middle term equals the end average. At n = 1 there is no step to compute — the panel sets d = 0 and S₁ = a₁.
The term count n comes from parseTermCount: a finite whole number of at least 1. Entering 7.5 is rejected — unlike some nth-term pages, there is no floor here. Field IDs stay a, b, c and d. The result is shown without extra rounding, with no forced six-decimal trim on the primary sum.
Bars illustrate the first min(n, 8) terms aₖ = a₁ + (k−1)·d. When n > 8 the full Sₙ still sits in the result panel; the caption under the diagram states that the bars are a visual shortcut.
Related: arithmetic nth term, geometric series sum, arithmetic mean. An infinite series with d ≠ 0 diverges. Sources: Wikipedia — Arithmetic progression; MathWorld — Arithmetic Series; textbook Sₙ = n(a₁+aₙ)/2.
In school practice, list a few terms first, then check Sₙ with the closed formula. With 3, 21 and 7 the end average is 12, and 12·7 = 84. With 2, d = 3 and n = 4 the last term is 11 and the sum is 26. With 20, 5 and 4 the step is −5 and the sum is 50. An infinite series with d ≠ 0 diverges — this page always uses finite n. The tool is educational and does not replace a textbook.
With a₁ = 3, aₙ = 21 and n = 7 you get Sₙ = 84, because 7·(3+21)/2 = 84.
84
What sum at 3 and 21, n = 7? 84.
26
What sum at a₁=2, d=3, n=4? 26.
50
What sum at 20 and 5, n=4? 50.
55
What is 1+2+…+10? 55.
100
What is 10+20+30+40? 100.
8
What sum at a₁=5, d=−2, n=4? 8.
7
What at n = 1 and a₁ = 7? 7.
The finite sum Sₙ of an arithmetic sequence: Sₙ = n·(a₁+aₙ)/2 or n/2·(2a₁+(n−1)d). With a₁ = 3, aₙ = 21 and n = 7 the sum is 84. It does not return a lone nth term without the sum.
Sₙ = n·(a₁+aₙ)/2. Equivalently Sₙ = n/2·(2a₁+(n−1)d) when you know the step d. Both formulas give the same number for consistent inputs.
In ends mode you enter a₁, aₙ and n; the calculator finds d. In step mode you enter a₁, d and n; the calculator finds aₙ, then the sum.
No. The number of terms must be a whole number of at least 1. The value 7.5 fails validation.
Yes. The sequence then decreases. Example: a₁ = 5, d = −2, n = 4 gives 5, 3, 1, −1 and sum 8.
There the result is one term aₙ = a₁+(n−1)r. Here the result is the sum of all n terms Sₙ.
Here a fixed additive step d. There a fixed ratio q. Open the geometric series sum page for multiplication by a ratio.
No. A mean of any list lives on the arithmetic mean page. Here you assume an equal difference between consecutive terms.
With one term, S₁ = a₁. The step is taken as 0 because there is no neighbor pair.
No. The result depends only on a₁, aₙ or d, and n. The currency and unit settings in the page header do not affect this result.
The panel shows the end average, the step, the last term, the equivalent form n/2·(2a₁+(n−1)d), and a short list of up to eight terms with bars.
It does not compute an infinite sum, solve for n from a sum alone, or handle a geometric sequence with ratio q.
Use Sₙ = n·(a₁+aₙ)/2. When you know the step d instead of aₙ: aₙ = a₁+(n−1)d, or equivalently Sₙ = n/2·[2a₁+(n−1)d]. With 3 and 21 and n = 7: 7·24/2 = 84.
aₙ = 2+3·3 = 11, so Sₙ = 4·(2+11)/2 = 26. That is the second example on this page (step mode).
That is an arithmetic series with a₁ = 1, aₙ = 100, n = 100: Sₙ = 100·(1+100)/2 = 5050. Here enter ends 1 and 100 with n = 100.
No. Here the step is constant (d). A geometric sum with ratio q lives on a separate page.
The primary result is Sₙ. aₙ appears in the panel as an intermediate step. The n-th term alone without the sum is on the neighboring card.
The arithmetic series sum definition and the Sₙ formulas below come from recognized references.
Page updated November 3, 2026.