Arithmetic Sequence Calculator

Give this calculator a first term and either the common difference or any other term of the sequence, and it returns the nth term, the sum of the first n terms and the average of those terms, along with the sequence itself and a running total. Working from two known terms is the more common real problem — you rarely get handed the difference — and the calculator recovers it by dividing the gap between the terms by the gap between their positions.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
First term a₁The value at position 1. Sequences here are indexed from 1, not 0.3
How the step is knownPick the second option when a problem gives you two terms rather than the step between them.I know the common difference d
Common difference dThe fixed amount added at each step. Negative values make the sequence descend.5
Position of the other known termAny position other than 1, since position 1 is already the first term.10
Value of that termThe value the sequence takes at the position above.48
Term index n to evaluateWhich term you want, and how many terms the sum covers.20

It returns

  • nth term aₙ — The value at the position you asked for.
  • Common difference d — Recovered from your two terms when you chose that mode.
  • Sum of the first n terms
  • Average of the first n terms — Equal to the average of the first and last terms, which is why the sum formula works.
  • The sequence — The opening terms, in order. Long sequences are truncated.

The formula

an=a1+(n1)d
Sn=n(a1+an)2
d=ama1m1

In plain text: aₙ = a₁ + (n − 1)d, Sₙ = n(a₁ + aₙ)/2 = n[2a₁ + (n − 1)d]/2

  • a₁First term of the sequence (any)
  • dCommon difference: the fixed amount added at each step (same as a₁)
  • nPosition of the term you want, counting from 1 (integer)
  • SₙSum of the first n terms (same as a₁)

The n − 1 is the whole subtlety: reaching the nth term takes one fewer step than its index, because the first term costs no steps at all.

Updated Category Sequences, Series & Combinatorics Verified against published test cases Reading time 11 min

What an arithmetic sequence is

An arithmetic sequence adds the same amount at every step. That fixed amount is the common difference, and it is what distinguishes this family from every other kind of sequence. 3, 8, 13, 18, 23 is arithmetic with difference 5; 3, 6, 12, 24 is not, because it multiplies rather than adds.

The test is direct: subtract each term from the one after it. If every gap is the same number, the sequence is arithmetic. If instead every ratio is the same number, it is geometric, and the geometric sequence calculator is the tool you want. That single distinction — adding versus multiplying — separates linear growth from exponential growth, and it is the most consequential difference in elementary sequence work.

Arithmetic sequences are exactly the discrete version of a straight line. Plot the terms against their positions and you get evenly spaced points on a line whose slope is d and whose value at position 1 is a1. Everything that is true of linear functions carries over: a positive difference climbs, a negative one falls, and a zero difference is a horizontal line, which is still a legitimate arithmetic sequence with every term equal.

They turn up whenever something changes by a fixed step. Simple interest adds the same amount each period, unlike compound interest. Seating rows that gain the same number of seats. A depreciation schedule on the straight-line method. Stair risers, drill sizes, tuning pegs, a countdown timer — all arithmetic.

The two formulas, and why they look the way they do

The nth term. Reaching position n from position 1 takes n − 1 steps, each adding d:

aₙ = a₁ + (n − 1)d

The n − 1 is where nearly every mistake happens. The tenth term is not a1 + 10d; the first term costs no steps, so it is a1 + 9d. Check it at n = 1: the formula gives a1 + 0, which is right, whereas the version without the minus one would give a1 + d.

The sum. Write the first n terms forwards, then write them again backwards underneath, and add the two rows column by column. Every column gives the same total, a1 + an, because as one row steps up by d the other steps down by d. There are n such columns, and you have counted the sum twice, so

Sₙ = n(a₁ + aₙ) / 2

Read that as “n terms, each worth the average of the first and last”, and it becomes obvious rather than memorised. The average of the terms of an arithmetic sequence really is the average of its two ends, which is a property no other common sequence family has. Substituting the nth-term formula gives the version in terms of d alone:

Sₙ = n[2a₁ + (n − 1)d] / 2

Use the first form when you know the last term and the second when you know the difference. They are the same expression.

Recovering the difference from two terms. The gap between terms at positions 1 and m is m − 1 steps, so

d = (aₘ − a₁) / (m − 1)

Between any two positions p and q the same reasoning gives d = (aₔ − aₚ)/(q − p). This is literally the slope formula from coordinate geometry, applied to points whose x-coordinates are positions.

Worked example: 3, 8, 13, … out to the twentieth term

Take a1 = 3 and d = 5, and find the twentieth term and the sum of the first twenty.

  1. Steps to reach term 20. 20 − 1 = 19.
  2. Total added. 19 × 5 = 95.
  3. Twentieth term. 3 + 95 = 98.
  4. Average of the ends. (3 + 98) ÷ 2 = 101 ÷ 2 = 50.5.
  5. Sum. 20 × 50.5 = 1,010.

Check the sum the other way: S20 = 20[2×3 + 19×5]/2 = 20[6 + 95]/2 = 20 × 101 ÷ 2 = 1,010. ✓ And the average term is 1,010 ÷ 20 = 50.5, which is exactly the average of the first and last terms, as the derivation requires.

The same sequence from two terms. Suppose instead you are told a1 = 3 and a10 = 48. Then

d = (48 − 3) / (10 − 1) = 45 / 9 = 5

and everything above follows unchanged. Note the denominator: 9, not 10. Dividing by 10 would give d = 4.5 and a twentieth term of 88.5, an error of 9.5 that looks entirely plausible.

Gauss's version. The classic story has a young Gauss asked to add the whole numbers from 1 to 100. That is an arithmetic sequence with a1 = 1, d = 1, a100 = 100, so the sum is 100 × (1 + 100) ÷ 2 = 100 × 50.5 = 5,050. The pairing he is said to have spotted — 1 with 100, 2 with 99, and so on, fifty pairs each totalling 101 — is precisely the forwards-and-backwards derivation above.

Reading the outputs and sanity-checking them

The sign of the common difference sets the direction. Positive climbs, negative falls, zero holds level. In a descending sequence the terms eventually go negative, and the calculator will happily report that; whether it makes sense is a question about your problem, not about the arithmetic. A stock count declining by 7 a week does not continue past zero, so check where the sequence crosses it: the term first reaching or passing zero is at position n = 1 − a1/d, rounded up when d is negative.

The average term is the quickest sanity check on the sum. It must lie exactly halfway between the first and last terms. If it does not, either the sum or the nth term is wrong. For the worked example, 50.5 sits midway between 3 and 98, and 1,010 ÷ 20 reproduces it.

The sum grows quadratically, not linearly. Doubling n roughly quadruples Sn when the terms start near zero, because the formula multiplies a term count by an average that is itself growing with n. That is why the sum of 1 to 100 is 5,050 rather than a few hundred, and why partial sums of arithmetic series overtake almost any linear estimate quickly.

Fractional differences are legitimate. Two terms whose positions differ by 9 and whose values differ by 45 give a whole-number difference, but the same terms nine positions apart differing by 46 give d = 5.111…, which is a perfectly valid sequence. The calculator flags a fractional difference only as a prompt to re-check the position you entered, since an off-by-one in the index is the usual cause.

Indexing from 1 is a convention, not a law. Some texts index from 0, in which case the formula becomes an = a0 + nd and every term index shifts by one. Check which convention a problem uses before comparing answers; this calculator indexes from 1 throughout.

Common arithmetic sequences and their closed forms

Each row is generated by aₙ = a₁ + (n − 1)d. The closed form for Sₙ comes from n[2a₁ + (n − 1)d]/2 with the numbers substituted and simplified.
Sequencea₁da₁₀S₁₀Closed form for Sₙ
1, 2, 3, 4, …111055n(n + 1)/2
1, 3, 5, 7, …1219100
2, 4, 6, 8, …2220110n(n + 1)
5, 10, 15, 20, …55502755n(n + 1)/2
3, 8, 13, 18, …3548255n(5n + 1)/2
100, 93, 86, …100−737685n(207 − 7n)/2
7, 7, 7, 7, …707707n

The odd-number row is the classic identity that the first n odd numbers sum to n², visible geometrically as a square built from L-shaped layers. The descending row shows a closed form that turns negative once 7n exceeds 207, at n = 30.

Mistakes that produce a wrong term or sum

  • Using nd instead of (n − 1)d. The commonest error in the topic. Test your formula at n = 1: it must return a₁ exactly.
  • Dividing by the wrong gap when recovering d. From a₁ to a₁₀ is nine steps, not ten. In general the gap between positions p and q is q − p.
  • Confusing the sequence with the series. The sequence is the list of terms; the series is their sum. “Find the 20th term” and “find the sum to 20 terms” are different questions with very different answers — 98 against 1,010 in the worked example.
  • Applying arithmetic formulas to a geometric sequence. If the ratios rather than the differences are constant, none of this applies. Check the differences before you start.
  • Assuming the middle term equals the average. It does, but only when n is odd. For an even count there is no middle term, and the average falls between the two central ones.
  • Extending a descending sequence past a physical floor. The arithmetic keeps going below zero; inventories, populations and distances usually do not.

Arithmetic sequences among the other progressions

Geometric sequences multiply by a fixed ratio instead of adding a fixed difference. The nth term is a1rn−1, and the sum has a completely different shape. The practical distinction is enormous over long horizons: an arithmetic sequence starting at 100 with d = 10 reaches 1,090 at term 100, while a geometric one with r = 1.1 reaches about 1.25 million. Interest is the everyday example — simple interest is arithmetic and compound interest is geometric, which is why the exponential growth calculator handles the second and this one the first.

The Fibonacci sequence is neither: each term is the sum of the two before it, so neither the differences nor the ratios are constant, although the ratios converge on the golden ratio. The Fibonacci calculator covers that recursion.

Arithmetic series in the wild. Straight-line depreciation over n years produces an arithmetic sequence of book values, and the total depreciation is the arithmetic sum. Simple interest produces an arithmetic sequence of balances. The sum-of-years-digits depreciation method takes the arithmetic series n(n+1)/2 as its denominator, which is the first row of the reference table above.

Two useful identities. The sum of the first n whole numbers, n(n+1)/2, is the number of ways to choose 2 items from n+1, so triangular numbers and pairwise counts are the same thing; the combinations calculator makes that explicit. And the sum of the first n odd numbers is exactly n², which you can see by building a square out of L-shaped layers of 1, 3, 5, 7 tiles.

If the pattern you are looking at is not constant in either its differences or its ratios, take the differences of the differences. When those are constant the sequence is quadratic, generated by a second-degree polynomial in n, and the partial sums of an arithmetic series are exactly that kind of sequence — which is another way of saying that summing an arithmetic sequence raises its degree by one.

Frequently asked questions

What is the formula for the nth term of an arithmetic sequence?

aₙ = a₁ + (n − 1)d, where a₁ is the first term and d the common difference. The minus one matters: reaching the nth term takes one fewer step than its index, because the first term costs no steps. For 3, 8, 13, … the twentieth term is 3 + 19×5 = 98, not 3 + 20×5 = 103. Testing the formula at n = 1 is the quickest way to confirm you have it right.

How do I find the common difference from two terms?

Divide the difference in their values by the difference in their positions: d = (a_q − a_p)/(q − p). If a₁ = 3 and a₁₀ = 48, then d = 45/9 = 5. The denominator is 9, not 10, because there are nine steps from position 1 to position 10. This is the slope formula from coordinate geometry with positions on the horizontal axis.

What is the difference between an arithmetic sequence and a series?

The sequence is the ordered list of terms; the series is what you get by adding them. For 3, 8, 13, 18, 23 the sequence's fifth term is 23 while the series to five terms is 65. Exam questions distinguish them carefully, and the two answers diverge quickly — at twenty terms the sequence gives 98 and the series 1,010.

Can the common difference be negative or zero?

Both. A negative difference makes the sequence descend, as in 100, 93, 86, …, and the terms eventually pass below zero, which the formulas handle without complaint. A difference of zero gives a constant sequence in which every term equals the first, and the sum is simply n times that value. Neither case needs a special formula.

Why is the sum n times the average of the first and last terms?

Write the terms forwards and again backwards, then add the two rows column by column. Every column totals a₁ + aₙ, because as one row rises by d the other falls by d. There are n columns and you have counted each term twice, so the sum is n(a₁ + aₙ)/2. It is the pairing trick attributed to Gauss, and it works for any arithmetic sequence, of any length, ascending or descending.

How do I find how many terms a sequence has?

Rearrange the nth-term formula: n = (aₙ − a₁)/d + 1. For 3, 8, 13, …, 98 that gives (98 − 3)/5 + 1 = 19 + 1 = 20 terms. If the division does not come out to a whole number, the value you supplied is not actually a term of the sequence — a useful check in itself.

Is an arithmetic sequence the same as linear growth?

Yes, in discrete form. Plotting the terms against their positions gives evenly spaced points on a straight line of slope d and intercept a₁ − d. Everything true of linear functions applies: constant rate of change, no compounding, and a total that grows with the square of the number of steps. Geometric sequences are the discrete form of exponential growth instead, and the two diverge dramatically over long horizons.

What is the sum of the first n odd numbers?

Exactly n². The odd numbers form an arithmetic sequence with a₁ = 1 and d = 2, so aₙ = 2n − 1 and the sum is n(1 + 2n − 1)/2 = n². For n = 12 that is 144, with the last term 23. The identity has a picture: adding L-shaped layers of 1, 3, 5, 7 tiles builds a perfect square, one row and column at a time.

References

  • Precalculus: Mathematics for Calculus, 7th edition (sequences and series) — Cengage Learning (Stewart, Redlin and Watson)
  • Concrete Mathematics: A Foundation for Computer Science, 2nd edition (sums and closed forms) — Addison-Wesley (Graham, Knuth and Patashnik)
  • The Art of Problem Solving, Volume 1: The Basics (arithmetic series) — AoPS Incorporated (Lehoczky and Rusczyk)