Enter the first term (the first number of the sequence), the common difference (how much each term goes up) and the number of terms (how far to go), then press "Calculate". You get the first few terms, the nth term and the sum of the first n terms at once. The formula below is linked to the input fields, so you can also edit the first term, common difference and number of terms right inside the formula.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formulas and graphs
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter just three values, the first term, the common difference (how much each term goes up) and the number of terms, to get the \(n\)th term and the sum of the first \(n\) terms at once
- Works directly for problems like "The sequence 2, 7, 12, 17, … goes up by 5 each time. What is the 20th number? What do the first 20 numbers add up to?"
- The first term and the common difference can be decimals or negative numbers (for a decreasing sequence, make the common difference negative)
- Along with the result, a graph shows how the terms line up on a straight line (the common difference is how fast they rise)
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
A savings plan of "save $50 the first month, then $25 more each month" is an arithmetic sequence with first term 50 and common difference 25. In month 12 you save \(50 + 11 \times 25 = 325\) dollars, and the total for the year is \(12 \times (50 + 325) \div 2 = 2250\) dollars. Two formulas let you see far ahead.
Any plan that goes up (or down) by the same amount each time, and the questions "How much is it the kth time?" and "What is the total?", are arithmetic sequence calculations.
Halls with seats that fan out often have rows like "20 seats in row 1, and 2 more seats in each row behind it". With 30 rows, the last row has \(20 + 29 \times 2 = 78\) seats, and the whole hall has \(30 \times (20 + 78) \div 2 = 1470\) seats.
Without counting row by row, the sum formula quickly gives the total number of seats and the most tickets you can sell.
"What do you get when you add all the whole numbers from 1 to 100?" The famous story says the mathematician Gauss, as a child, answered at once: \(100 \times (1 + 100) \div 2 = 5050\). This is exactly the sum of the arithmetic sequence with first term 1, common difference 1 and 100 terms.
Totals of consecutive numbers, such as adding up the numbers on a run of invoices or stacking "1 on day 1, 2 on day 2, …", are instant with this formula.
If you plan your runs as "2 miles in week 1, then 0.5 mile more each week", in week 12 you run \(2 + 11 \times 0.5 = 7.5\) miles, and the total over 12 weeks is \(12 \times (2 + 7.5) \div 2 = 57\) miles.
Before you start, you can check in numbers where a "a little more each time" plan takes you and how much it adds up to.
With simple interest, where interest is paid only on the original amount (the principal), the balance grows by the same amount every year, so it forms an arithmetic sequence. With $10,000 at 3% simple interest per year, it grows by $300 a year, and after 5 years the balance is \(10000 + 5 \times 300 = 11500\) dollars.
With compound interest, where interest also earns interest, the balance forms a geometric sequence (a sequence that grows by multiplying). The difference between simple and compound interest is "grow by adding, or grow by multiplying". Seeing it in terms of sequences makes financial products much easier to understand.
Formulas and graphs
Symbols and terms
Symbols
| \(a_1\) | a sub one | The first term. The very first term (number) of the sequence. For the sequence 2, 7, 12, 17, …, it is 2. |
| \(d\) | dee | The common difference. The difference between neighboring terms (how much each term goes up). For 2, 7, 12, 17, … it is 5. The letter comes from "difference", and it can be a negative number. |
| \(n\) | en | The number of terms. A positive whole number that says how far along the sequence you go. "Up to term 20" is \(n = 20\). |
| \(a_n\) | a sub n | The \(n\)th term. The \(n\)th number of the sequence. The small letter at the lower right (the subscript) tells which position it is. The \(n\)th term written as a formula in \(n\) is called the general term. |
| \(n-1\) | n minus one | The number of steps from term 1 to term \(n\), which is how many times you add the common difference. It is one fewer than the number of terms \(n\) (from term 1 to term 3 is 2 steps). |
| \(S_n\) | S sub n | The sum of terms 1 through \(n\). A short way to write \(a_1 + a_2 + \cdots + a_n\). The letter S comes from "sum". |
| \(\cdots\) | dot dot dot (ellipsis) | A symbol that says the pattern continues the same way. Writing 2, 7, 12, 17, … says the numbers keep going up by 5. |
Terms
| sequence | A list of numbers in a set order. Each number in the list is called a term. |
| arithmetic sequence | A sequence where the difference between neighboring terms is always the same, such as 2, 7, 12, 17, … (the difference is always 5). It is also called an arithmetic progression. |
| term | Each single number in a sequence. From the start, they are called term 1, term 2, and so on. |
| first term | The very first term of a sequence, that is, term 1. It is written \(a_1\). |
| common difference | In an arithmetic sequence, the difference between neighboring terms. You get the same value whichever neighboring pair you subtract. It can be negative (for a decreasing sequence) or a decimal. |
| last term | The very last term in the range you are looking at. For the sum of terms 1 through \(n\), the last term is \(a_n\). |
| general term | The \(n\)th term written as a formula in \(n\), also called the explicit formula. For an arithmetic sequence it is \(a_n = a_1 + (n-1)d\). Put a position number in for \(n\) and you get that term right away. |
| geometric sequence | A sequence where the ratio between neighboring terms is always the same, such as 2, 6, 18, 54, … (multiply by 3 each time). It grows differently from an arithmetic sequence, which adds the same number, so the formulas on this page do not apply. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to review these topics is the fastest way forward.
| Number patterns (Grades 4–5) |
|
| Negative numbers (Grade 7) |
|
| Variables and expressions (Grade 6) |
|
| Order of operations (Grade 5) |
|
How to calculate it in Excel
| First term a1 | 2 |
| Common difference d | 5 |
| Number of terms n | 20 |
| nth term | =B1+(B3-1)*B2 |
| First term a1 | 2 |
| Common difference d | 5 |
| Number of terms n | 20 |
| nth term | =B1+(B3-1)*B2 |
| Sum of terms 1 through n | =B3*(B1+B4)/2 |
| First term a1 | 2 |
| Common difference d | 5 |
| Number of terms n | 20 |
| Sum of terms 1 through n | =B3*(2*B1+(B3-1)*B2)/2 |
In the formulas, "B1" and "B3" say "use the number in that cell", "*" is multiplication and "/" is division. "=B1+(B3-1)*B2" is the formula itself: "first term plus (number of terms − 1) × common difference".
For example, the first table shows 97 (term 20) in B4, and the second table shows 990 (the sum) in B5. Just replace B1 to B3 with your own numbers.
How to calculate it in Google Sheets
| First term a1 | 2 |
| Common difference d | 5 |
| Number of terms n | 20 |
| nth term | =B1+(B3-1)*B2 |
| First term a1 | 2 |
| Common difference d | 5 |
| Number of terms n | 20 |
| nth term | =B1+(B3-1)*B2 |
| Sum of terms 1 through n | =B3*(B1+B4)/2 |
| First term a1 | 2 |
| Common difference d | 5 |
| Number of terms n | 20 |
| Sum of terms 1 through n | =B3*(2*B1+(B3-1)*B2)/2 |
How to calculate it in Python
first_term = 2 # first term
common_difference = 5 # common difference
number_of_terms = 20 # number of terms
# nth term = first term + (n - 1) * common difference
nth_term = first_term + (number_of_terms - 1) * common_difference
# sum of terms 1 through n = n * (first term + nth term) / 2
sum_of_terms = number_of_terms * (first_term + nth_term) / 2
# first 10 terms of the sequence (for checking)
sequence = [first_term + k * common_difference for k in range(min(number_of_terms, 10))]
print(f"First terms: {sequence}")
print(f"Term {number_of_terms}: {nth_term}")
print(f"Sum of terms 1 through {number_of_terms}: {sum_of_terms}")
How to write it in LaTeX and other math languages (copy and paste)
aₙ = a₁ + (n − 1)d
a_n = a_1 + (n-1)d
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>a</mi><mi>n</mi></msub>
<mo>=</mo>
<msub><mi>a</mi><mn>1</mn></msub>
<mo>+</mo>
<mrow><mo>(</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo>)</mo></mrow>
<mi>d</mi>
</mrow>
</math>
a_n = a_1 + (n-1) d
a1 + (n - 1)*d
an := a1 + (n - 1)*d;
a_n = a1 + (n - 1)*d;
a_n = a_1 + (n - 1)d
Sₙ = n(a₁ + aₙ) ÷ 2
S_n = \dfrac{n(a_1 + a_n)}{2}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>S</mi><mi>n</mi></msub>
<mo>=</mo>
<mfrac>
<mrow>
<mi>n</mi>
<mo>(</mo>
<msub><mi>a</mi><mn>1</mn></msub>
<mo>+</mo>
<msub><mi>a</mi><mi>n</mi></msub>
<mo>)</mo>
</mrow>
<mn>2</mn>
</mfrac>
</mrow>
</math>
S_n = (n(a_1 + a_n))/2
n*(a1 + an)/2
Sn := n*(a1 + an)/2;
S_n = n*(a1 + a_n)/2;
S_n = n(a_1 + a_n)/2
Sₙ = n{2a₁ + (n − 1)d} ÷ 2
S_n = \dfrac{n\{2a_1 + (n-1)d\}}{2}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>S</mi><mi>n</mi></msub>
<mo>=</mo>
<mfrac>
<mrow>
<mi>n</mi>
<mo>{</mo>
<mn>2</mn>
<msub><mi>a</mi><mn>1</mn></msub>
<mo>+</mo>
<mrow><mo>(</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo>)</mo></mrow>
<mi>d</mi>
<mo>}</mo>
</mrow>
<mn>2</mn>
</mfrac>
</mrow>
</math>
S_n = (n(2 a_1 + (n-1) d))/2
n*(2*a1 + (n - 1)*d)/2
Sn := n*(2*a1 + (n - 1)*d)/2;
S_n = n*(2*a1 + (n - 1)*d)/2;
S_n = n(2a_1 + (n - 1)d)/2
How to have ChatGPT do the calculation
You are an assistant for arithmetic sequence calculations. Do the following calculations by actually running Python code, and base your answer only on the numbers from the output (do not answer from mental math or guesses). Find the nth term with a_n = a_1 + (n-1)d and the sum with S_n = n(a_1 + a_n)/2. 1. Term 20 and the sum of terms 1 through 20 of the arithmetic sequence with first term 2 and common difference 5 2. Term 10 and the sum of terms 1 through 10 of the arithmetic sequence with first term -3 and common difference 4 3. Term 15 and the sum of terms 1 through 15 of the arithmetic sequence with first term 100 and common difference -7 Show the formulas you used and the numbers from the output.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
