Skip to content
Math

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.

Your details

The starting value of the sequence.
The fixed amount added to each term to get the next. Use a negative number for a decreasing sequence.
How many terms to include in the sum. Must be a positive integer.
Sum of sequence
100

Total of all n terms in the sequence

Last term (aₙ)19
Average term10
Term range1.0000 to 19.0000
Total sum100
Last term19
Average term10
0501001610
Term index (n)
  • Cumulative sum
  • Term value

Sum of 10 terms: 100.0000

  • The sequence runs from 1 to 19.0000 across 10 terms, with each term increasing by 2.
  • The arithmetic mean of all terms is 10.0000, which equals half the sum of the first and last term.
  • For a quick sanity check: multiply the average (10.0000) by the count (10) to get the same sum.

Next stepTo find the sum of just a portion of the sequence, set the number of terms to the count you want. To extend the sequence, increase n.

Sequence terms and running sum

Term (n)Value (aₙ)Cumulative sum (Sₙ)
111
234
359
4716
5925
61136
71349
81564
91781
1019100

Each row shows the individual term value and the running total up to that term.

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 namea₁dnSum formula result
First 10 natural numbers111055
First 100 natural numbers111005,050
First 10 even numbers2210110
First 10 odd numbers1210100
Decreasing by 3, 10 terms30-310165

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.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…