Sequence formulas

Arithmetic sequence

Calculate the nth term or the sum of the first n terms of an arithmetic sequence, or work backwards to the first term, the common difference, or the index.

Formula

an=a1+(n−1)r aₙ = a₁ + (n - 1) × r; Sₙ = n × (a₁ + aₙ) / 2

In an arithmetic sequence every term differs from the previous one by the same value r, so the nth term grows linearly and the partial sum is the number of terms times the average of the first and the last term.

Arithmetic sequence calculator

What do you want to calculate?

Known values

The result updates automatically. You may use a decimal point.

Result

aₙ =38

Term aₙ
38
Sum Sₙ
258

Formula

aₙ = a₁ + (n − 1) × r

Sequence: 5, 8, 11, ...

Symbols and units

SymbolQuantitySISupported units
a₁first termValue of the term with index 1, from which the whole sequence is generated.11
rcommon differenceConstant difference between two consecutive terms: r = aₙ₊₁ - aₙ. It may be negative or zero.11
nterm indexPosition of the term in the sequence; a natural number greater than or equal to 1.11
aₙnth termValue of the term with index n, calculated from the explicit formula.11
Sₙsum of the first n termsSum a₁ + a₂ + ... + aₙ of the first n terms of the sequence.11

Formula rearrangements

Calculate the nth term

aₙ = a₁ + (n - 1) × r

Calculate the sum of n terms

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

Calculate the first term

a₁ = aₙ - (n - 1) × r

Calculate the common difference

r = (aₙ - a₁) / (n - 1)

Calculate the term index

n = (aₙ - a₁) / r + 1

Worked examples

Twelfth term of a sequence

An arithmetic sequence starts with a₁ = 5 and has a common difference r = 3. Calculate a₁₂.

  1. 1Step 1: Use the explicit formula aₙ = a₁ + (n - 1) × r.
  2. 2Step 2: Substitute a₁ = 5, r = 3 and n = 12: a₁₂ = 5 + 11 × 3.
  3. 3Step 3: Multiply 11 × 3 = 33 and add 5 to obtain a₁₂ = 38.

Result: a₁₂ = 38

Sum of the first twenty terms

An arithmetic sequence has a₁ = 2 and r = 4. Calculate the sum of its first 20 terms.

  1. 1Step 1: First find the last term: a₂₀ = 2 + 19 × 4 = 78.
  2. 2Step 2: Use the sum formula Sₙ = n × (a₁ + aₙ) / 2.
  3. 3Step 3: Substitute: S₂₀ = 20 × (2 + 78) / 2 = 10 × 80 = 800.

Result: S₂₀ = 800 (a₂₀ = 78)

Sources and review