Sum of a Linear Number Sequence Calculator
Enter the first term, common difference, and number of terms to find the total sum of any linear (arithmetic) sequence. You also get the nth term, the final value, and a full step-by-step breakdown of the calculation. The sequence list and chart update as you type.
What is a linear number sequence?
A linear number sequence (also called an arithmetic sequence) is a list of numbers in which each term differs from the previous one by the same fixed amount, called the common difference. If you start at 3 and add 5 each time, you get 3, 8, 13, 18, and so on. The common difference can be positive (the sequence grows), negative (the sequence shrinks), or zero (every term is the same). Because consecutive differences are constant, the terms plot as a straight line when graphed against their index, which is why the word "linear" applies.
How to calculate the sum of an arithmetic sequence
The sum S of n terms of an arithmetic sequence with first term a and common difference d is given by the formula S = n/2 x (2a + (n - 1) x d). An equivalent and often easier form is S = n/2 x (a + L), where L is the last term. The last term is found with L = a + (n - 1) x d. For example, to sum the first 10 terms starting at 1 with difference 2 (giving 1, 3, 5, ..., 19): last term = 1 + 9 x 2 = 19; sum = 10/2 x (1 + 19) = 5 x 20 = 100. The calculator performs every step automatically and shows the working so you can follow along.
Gauss's trick and why the formula works
The formula S = n/2 x (a + L) was famously demonstrated by Carl Friedrich Gauss as a schoolboy when his teacher asked the class to add the integers from 1 to 100. Gauss paired each number with its mirror from the opposite end of the list: 1 + 100, 2 + 99, 3 + 98, and so on. Each pair sums to 101, and there are 50 pairs, giving 50 x 101 = 5,050. The general version of this pairing trick is exactly n/2 x (a + L): n/2 gives the number of pairs, and (a + L) is the fixed sum of each pair.
Negative and fractional common differences
The formula works equally well when the common difference is negative or a fraction. A negative difference means the sequence decreases: for example, 100, 90, 80, ..., 10 has a = 100, d = -10, and n = 10, giving L = 100 + 9 x (-10) = 10 and sum = 10/2 x (100 + 10) = 550. Fractional differences arise naturally in many practical settings, such as a bank balance that grows by 0.5 each period or a temperature reading that drops by 0.25 degrees per hour.
Classic arithmetic sequence examples
| Sequence name | a₁ | d | n | Sum formula result |
|---|---|---|---|---|
| First 10 natural numbers | 1 | 1 | 10 | 55 |
| First 100 natural numbers | 1 | 1 | 100 | 5,050 |
| First 10 even numbers | 2 | 2 | 10 | 110 |
| First 10 odd numbers | 1 | 2 | 10 | 100 |
| Decreasing by 3, 10 terms | 30 | -3 | 10 | 165 |
Well-known sequences and their sums, showing the formula in action.
Frequently asked questions
What is the difference between a linear sequence and an arithmetic sequence?
Nothing - they are two names for the same thing. Both describe a sequence in which every consecutive pair of terms differs by the same fixed amount (the common difference). "Arithmetic sequence" is the standard mathematical term; "linear sequence" is often used in schools to emphasise that the terms lie on a straight line when plotted.
How do I find the sum of the first n natural numbers?
Use a = 1, d = 1, and n equal to the count you want. The formula gives S = n/2 x (1 + n) = n(n + 1)/2. For n = 100, that is 100 x 101 / 2 = 5,050, the result famously calculated by Gauss.
Can the common difference be zero?
Yes. If d = 0, every term equals the first term and the sum is simply a x n. This is technically an arithmetic sequence with a constant common difference of zero.
Can the common difference be negative?
Yes. A negative common difference means each term is smaller than the one before it, so the sequence decreases. The formula S = n/2 x (a + L) still applies exactly.
What is the average (mean) of an arithmetic sequence?
The arithmetic mean of all n terms equals (a + L) / 2, where a is the first term and L is the last. This is the same as the sum divided by n, because S = n x (a + L)/2 so S/n = (a + L)/2. The mean always sits halfway between the first and last term.
How many terms can this calculator handle?
The compute logic supports up to 1,000 terms. The term-by-term schedule table is shown for sequences up to 200 terms. For larger n, the chart and summary outputs are the most useful way to read the results.