In short

The sum of the first n terms of an arithmetic progression with first term a, last term l, and common difference d is

S_n = \frac{n}{2}(a + l) = \frac{n}{2}[2a + (n-1)d].

The formula comes from pairing terms equidistant from the two ends — each pair sums to the same value a + l, and there are \frac{n}{2} such pairs. The sum of the first n natural numbers, 1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}, is the most important special case.

A school assembly hall has 20 rows of chairs. The front row has 15 chairs, and each row behind it has 2 more chairs than the row in front. The second row has 17, the third has 19, and so on, until the last row has 15 + 19 \times 2 = 53 chairs. The principal needs to know the total number of chairs in the hall.

You could add them up one by one: 15 + 17 + 19 + 21 + \dots + 53. Twenty terms, each computed from the last. That works, but it is slow and error-prone. There is a much faster way, and it rests on one observation: the first row and the last row together have 15 + 53 = 68 chairs. The second row and the second-to-last row together have 17 + 51 = 68 chairs. The third and the third-to-last: 19 + 49 = 68. Every such pair sums to exactly 68. There are 10 pairs (since 20 rows pair up into 10 couples), so the total is 10 \times 68 = 680 chairs.

That pairing trick is the entire idea behind the sum formula for an arithmetic progression. This article derives the formula, explores its most important special case (the sum of the first n natural numbers), and shows it in action.

Pairing rows of chairs in the assembly hallA schematic of the assembly hall viewed from above. The front row has a short bar labelled 15, and the back row has a long bar labelled 53. Curved arches connect the front row to the back row, the second row to the second-to-last row, and the third row to the third-to-last row. Each arch is labelled 68, showing that every pair sums to the same number. row 1 15 row 2 17 row 3 19 row 18 49 row 19 51 row 20 53 = 68 = 68 = 68 10 pairs × 68 = 680 chairs
Each pair of rows equidistant from the front and back sums to $15 + 53 = 68$. With $10$ such pairs, the total is $680$. The pairing works because the rows form an AP — the amounts that one row exceeds $15$ are exactly compensated by the amounts the paired row falls short of $53$.

The sum formula — derivation

Take an AP with first term a, common difference d, and n terms. Call the sum of the first n terms S_n:

S_n = a_1 + a_2 + a_3 + \dots + a_n

Write this sum out using the n-th term formula a_k = a + (k-1)d:

S_n = a + (a + d) + (a + 2d) + \dots + (a + (n-1)d)

Now write the same sum in reverse order. The last term is l = a + (n-1)d, the second-to-last is l - d, and so on:

S_n = l + (l - d) + (l - 2d) + \dots + (l - (n-1)d)

Add these two expressions term by term. The first terms give a + l. The second terms give (a + d) + (l - d) = a + l. The third terms give (a + 2d) + (l - 2d) = a + l. Every pair sums to a + l, and there are n such pairs:

2S_n = n(a + l)

Divide both sides by 2:

S_n = \frac{n}{2}(a + l)

That is the first form of the sum formula. It says: the sum of an AP is the number of terms times the average of the first and last terms.

Since l = a + (n-1)d, you can also write the formula entirely in terms of a, d, and n:

S_n = \frac{n}{2}[2a + (n-1)d]

Both forms are equivalent. Use whichever is more convenient — the first when you know the last term, the second when you don't.

Visual derivation of the AP sum formula using the reversal trickTwo rows of bars representing the AP sum. The top row shows the terms in order from a to l, with bars increasing in height. The bottom row shows the same terms in reverse order from l to a, with bars decreasing in height. When the two rows are stacked, every column has the same total height a plus l, forming a rectangle of width n and height a plus l. The sum is half the rectangle. Sₙ forward: a a+d a+2d ··· l Sₙ reversed: l l−d l−2d ··· a a + l (every column) 2Sₙ = n(a + l) Sₙ = n(a + l) / 2
Write the sum forwards (shaded bars, growing from $a$ to $l$) and backwards (unshaded bars, shrinking from $l$ to $a$). Stack them: every column has the same total height $a + l$. There are $n$ columns, so $2S_n = n(a + l)$ and $S_n = \frac{n(a+l)}{2}$.

The derivation is clean: no induction, no advanced algebra, just the observation that reversing an AP and adding it to itself creates a rectangle. The formula is a direct consequence of the pairing property of APs.

Sum of the first n natural numbers

The simplest AP is 1, 2, 3, 4, \dots, n — the first n positive integers. Here a = 1, d = 1, and l = n. Plug into the formula:

S_n = \frac{n}{2}(1 + n) = \frac{n(n+1)}{2}

This is one of the most frequently used formulas in all of mathematics. A few values:

n 1 + 2 + \dots + n \frac{n(n+1)}{2}
1 1 1
5 15 15
10 55 55
100 5050 5050

The n = 100 case — 1 + 2 + 3 + \dots + 100 = 5050 — is a classic. A young student, asked to add the numbers from 1 to 100, noticed the pairing: 1 + 100 = 101, 2 + 99 = 101, ..., 50 + 51 = 101. Fifty pairs, each summing to 101: 50 \times 101 = 5050.

Staircase proof that 1 plus 2 plus 3 plus 4 plus 5 equals 15A staircase of unit squares on the left: column 1 has 1 square, column 2 has 2, column 3 has 3, column 4 has 4, column 5 has 5. Total 15 squares. A flipped copy is placed next to it forming a 5 by 6 rectangle of 30 squares. The sum is half the rectangle: 30 divided by 2 equals 15. + 1 2 3 4 5 5 4 3 2 1 5 × 6 = 30 squares Sum = 30 / 2 = 15
A staircase of $1 + 2 + 3 + 4 + 5 = 15$ squares (shaded) fits with a flipped copy (unshaded) to form a $5 \times 6$ rectangle. The sum is half the rectangle: $\frac{5 \times 6}{2} = 15$. For $n$ steps, the rectangle is $n \times (n+1)$ and the sum is $\frac{n(n+1)}{2}$.

The staircase picture is a geometric proof. A staircase with columns of height 1, 2, 3, \dots, n has area S_n. Flip a copy and fit it next to the original — the two staircases together form an n \times (n+1) rectangle of area n(n+1). The staircase is half the rectangle, so S_n = \frac{n(n+1)}{2}.

You can also verify this formula by mathematical induction. The base case n = 1 gives S_1 = \frac{1 \times 2}{2} = 1, which is correct. For the inductive step, assume 1 + 2 + \dots + k = \frac{k(k+1)}{2}. Then 1 + 2 + \dots + k + (k+1) = \frac{k(k+1)}{2} + (k+1) = \frac{k(k+1) + 2(k+1)}{2} = \frac{(k+1)(k+2)}{2}. That is the formula with n = k+1. Done.

Applications

The sum formula is a tool, and its value lies in what it lets you do. Here are three standard types of problems.

Type 1: Find the sum given a, d, and n.

Salary example: a starting salary of ₹30,000 per month with an annual raise of ₹2,000. The salaries over 10 years form the AP 30000, 32000, 34000, \dots with a = 30000, d = 2000, n = 10. The total earned over 10 years is S_{10} = \frac{10}{2}[2(30000) + 9(2000)] = 5[60000 + 18000] = 5 \times 78000 = 3{,}90{,}000 — that is, ₹3,90,000 in monthly salary payments (before taxes, and ignoring that each payment repeats for 12 months — the AP here counts the yearly salary, not the total income).

Type 2: Find n given the sum.

How many terms of the AP 5, 8, 11, 14, \dots are needed for the sum to reach 1000?

S_n = \frac{n}{2}[2(5) + (n-1)(3)] = \frac{n}{2}(10 + 3n - 3) = \frac{n(3n + 7)}{2}. Set this equal to 1000: n(3n + 7) = 2000, so 3n^2 + 7n - 2000 = 0. By the quadratic formula, n = \frac{-7 + \sqrt{49 + 24000}}{6} = \frac{-7 + \sqrt{24049}}{6} \approx \frac{-7 + 155.08}{6} \approx 24.68. Since n must be a positive integer and S_{24} < 1000 < S_{25}, you need 25 terms to reach or exceed 1000.

Type 3: Find the sum of a specific set of integers.

Sum of all two-digit multiples of 7: the multiples are 14, 21, 28, \dots, 98. This is an AP with a = 14, l = 98, d = 7. How many terms? 98 = 14 + (n-1) \times 7, so n - 1 = 12, n = 13. The sum is \frac{13}{2}(14 + 98) = \frac{13 \times 112}{2} = 728.

Worked examples

Example 1: Find the sum of the first $15$ terms of the AP $4, 9, 14, 19, \dots$

Step 1. Identify a and d.

a = 4, d = 9 - 4 = 5.

Why: the first term and the common difference are all you need for the sum formula when the last term is not given.

Step 2. Find the last term l = a_{15}.

a_{15} = 4 + 14 \times 5 = 4 + 70 = 74.

Why: computing l lets you use the simpler form of the sum formula and also gives you a number to verify against.

Step 3. Apply the sum formula.

S_{15} = \frac{15}{2}(4 + 74) = \frac{15}{2} \times 78 = 15 \times 39 = 585

Why: \frac{n}{2}(a + l) is the most direct route when you know both endpoints.

Step 4. Quick sanity check.

The average term is \frac{a + l}{2} = \frac{78}{2} = 39. Multiplied by 15 terms: 39 \times 15 = 585. Consistent.

Why: the sum of an AP equals the number of terms times the average of the first and last terms — checking this way uses the formula from a different angle.

Result: S_{15} = 585.

Bar chart of partial sums S1 through S15 for the AP 4, 9, 14, 19, ...A bar chart with 15 bars. Each bar represents the cumulative sum after that many terms. The bars grow in a curved (quadratic) pattern, starting at 4 for S1 and reaching 585 for S15. The bar at S15 is highlighted in red. A dashed curve through the bar tops shows the quadratic growth. n Sₙ 1 4 7 10 13 15 585
The partial sums $S_1, S_2, \dots, S_{15}$ of the AP $4, 9, 14, 19, \dots$ The bars grow in a curved pattern — the sum of a linear sequence is quadratic. The red bar at $n = 15$ reaches $585$.

The curved growth of the bars reflects the quadratic nature of S_n = \frac{5n^2 + 3n}{2} — even though the terms themselves increase linearly, their cumulative sum increases quadratically.

Example 2: A well is being dug. The cost of digging the first metre is ₹500, and the cost increases by ₹100 for every subsequent metre (₹600 for the second metre, ₹700 for the third, and so on). Find the total cost of digging a 30-metre well.

Step 1. Model the costs as an AP.

The cost per metre forms the AP: 500, 600, 700, \dots with a = 500, d = 100, n = 30.

Why: the cost increases by a constant ₹100 per metre — the defining property of an AP.

Step 2. Find the cost of the last metre.

a_{30} = 500 + 29 \times 100 = 500 + 2900 = 3400.

Why: knowing the last term lets you use the simpler sum formula and also tells you the actual cost of the deepest metre.

Step 3. Compute the total cost.

S_{30} = \frac{30}{2}(500 + 3400) = 15 \times 3900 = 58{,}500

Why: the sum of all per-metre costs gives the total cost of the well.

Step 4. Interpret.

The total cost of digging a 30-metre well is ₹58,500. The average cost per metre is \frac{58500}{30} = 1950, which is the average of the first and last costs: \frac{500 + 3400}{2} = 1950.

Why: for an AP, the average term always equals the average of the endpoints — a built-in consistency check.

Result: The total cost is ₹58,500.

Cross-section of the well with costs per metreA vertical cross-section of a well. The well is divided into horizontal layers, each representing one metre. The top layer is labelled 500 rupees, the second is 600, and so on. Three layers are shown in detail at the top and three at the bottom. A bracket on the right shows the total depth is 30 metres and the total cost is 58500 rupees. ₹500 1 m ₹600 2 m ₹700 3 m ₹3200 28 m ₹3300 29 m ₹3400 30 m 30 m Total = ₹58,500
Each metre of the well costs ₹100 more than the metre above it. The first metre costs ₹500 and the thirtieth costs ₹3,400. The total — the sum of this AP — is ₹58,500.

The well diagram shows the cost stacking up layer by layer. The deeper you go, the more each metre costs — and the total is the sum of all those layers, which is exactly what the AP sum formula computes.

Common confusions

Going deeper

If you came here to derive the sum formula, see the sum of natural numbers, and apply it to problems, you have everything you need. The rest of this section is for readers who want to see the formula from different angles and understand why the sum is quadratic.

Why S_n is a quadratic in n

Expand the sum formula:

S_n = \frac{n}{2}[2a + (n-1)d] = \frac{d}{2}n^2 + \left(a - \frac{d}{2}\right)n

This is a quadratic expression in n — the sum of a linear sequence is always quadratic. The coefficient of n^2 is \frac{d}{2}, so the parabola opens upward when d > 0 and downward when d < 0.

This has a practical consequence. When d < 0, the parabola opens downward, and S_n reaches a maximum at some value of n. Beyond that point, adding more (now negative) terms pulls the sum back down. The maximum occurs near n = -\frac{a - d/2}{d} = \frac{2a - d}{-2d}. In the AP 10, 7, 4, 1, -2, \dots with a = 10 and d = -3, the maximum sum occurs around n = \frac{20 + 3}{6} \approx 3.83, so S_3 = 21 or S_4 = 22 is the maximum — and indeed S_4 = \frac{4}{2}(10 + 1) = 22, after which the sum starts to decrease.

Telescoping view

There is another way to see the sum formula. Write each term as a difference:

a + (n-1)d = \frac{1}{d}\left[\frac{d}{2}(2a + (2n-1)d) - \frac{d}{2}(2a + (2n-3)d)\right]

This telescoping approach is messier for APs but becomes essential when you study sums of sequences with more complex terms. The pairing method used above is cleaner for APs, but the telescoping viewpoint connects to a much larger family of summation techniques.

Connection to integration

If you plot the AP terms as a bar chart — one bar of width 1 and height a_n for each n — the sum S_n is the total area of the bars. Now imagine shrinking the width of each bar and adding more bars. In the limit, the bar chart becomes a smooth curve f(x) = a + (x-1)d, and the sum becomes the integral \int_1^{n} [a + (x-1)d] \, dx. Evaluating:

\int_1^n [a + (x-1)d] \, dx = \left[ax + \frac{d}{2}(x-1)^2\right]_1^n = a(n-1) + \frac{d}{2}(n-1)^2

This is close to S_n = \frac{d}{2}n^2 + (a - \frac{d}{2})n but not exactly the same — the discrete sum and the continuous integral differ by terms that depend on the step size. The connection becomes precise in the Euler-Maclaurin formula, which bridges discrete sums and continuous integrals. That bridge is one of the central ideas in analysis, and it starts right here, with the humble AP.

Interactive: drag to change the number of terms and watch the sum growA coordinate plane showing the AP 4, 9, 14, 19, ... as red dots. A draggable point controls how many terms are included. The readout shows the current number of terms and the sum S sub n computed by the formula. n aₙ 5 10 15 ↔ drag to change n
Drag the red point along the AP $4, 9, 14, 19, \dots$ to see how the sum $S_n$ changes with the number of terms. As you add more terms, the sum grows quadratically — each new term contributes more than the last.

Where this leads next