Education & Research Tools

Arithmetic Sequence Calculator

Find the nth term, the sum of the first n terms and the common difference of an arithmetic sequence, solve for any missing value, and list the terms - with geometric sequences supported on the same page.

  • nth term and sum
  • Listed terms
  • Formula with substitution
Runs in your browser

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics.

Sequences workspace

1 Describe the sequence

Try it:
Type of sequence
What do you know?

Fractions such as 1/2 are fine.

2 Answer

Enter the first term and the difference (or two terms, or a few terms in a row) to get the nth term, the sum and the formula.

What the Arithmetic Sequence Calculator does

This calculator finds the nth term and the sum of the first n terms of an arithmetic sequence, shows the formula with your numbers substituted, and lists the terms. For 2, 5, 8, 11, ... the 10th term is 29 and the first ten terms add up to 155.

You can start from whatever you have: the first term and the common difference, any two terms ("the 3rd term is 7 and the 8th is 22"), or a few terms in a row, in which case the page works out the pattern. Geometric sequences - where each term is multiplied by a fixed ratio, such as 3, 6, 12, 24 - work on the same page, including the sum to infinity when it exists.

How to use it

  1. Choose Arithmetic (add the same amount each time) or Geometric (multiply by the same amount each time).
  2. Say what you know: the first term and the difference or ratio, two terms and their positions, or several terms in a row separated by commas.
  3. Set n, the number of terms you want. The nth term and the sum update as you type; fractions such as 1/2 are accepted.
  4. Optionally type a number in Is this number a term? to find its position, or to learn that it falls between terms.
  5. Read the working underneath the answer - each formula is written out with your values - then copy it, download the terms as CSV or print the page.

Reading the results

The headline is the nth term, a with a small n, and the sum of the first n terms, S with a small n. The explicit formula, such as aₙ = 3n − 1, lets you find any term without listing the ones before it.

For two known terms, the common difference is the change in value divided by the change in position. With geometric sequences, if the two terms are an even number of places apart, both a positive and a negative ratio fit; the page flags that and shows the positive one.

When you paste terms, two terms always fit both patterns, so the page asks for a third to be sure. If the numbers are neither arithmetic nor geometric (1, 4, 9, 16, for example), it shows the differences so you can see why.

A geometric sum to infinity exists only when the ratio is between −1 and 1; otherwise the terms do not shrink and the total grows without limit.

Worked example: the 20th term from two known terms

Suppose the 3rd term is 7 and the 8th term is 22. The value rises by 22 − 7 = 15 over 8 − 3 = 5 steps, so d = 15 ÷ 5 = 3.

Going back two steps from the 3rd term gives the first term: a₁ = 7 − 2 × 3 = 1. The explicit formula is aₙ = 1 + (n − 1) × 3 = 3n − 2.

The 20th term is 1 + 19 × 3 = 58, and the sum of the first 20 terms is 20/2 × (2 × 1 + 19 × 3) = 10 × 59 = 590. Check: 20 × (1 + 58) / 2 = 590.

Formulas and scoring rules

Arithmetic nth term
aₙ = a₁ + (n − 1) × d
Arithmetic sum of n terms
Sₙ = n/2 × (2a₁ + (n − 1)d) = n × (a₁ + aₙ) / 2
Common difference from two terms
d = (aⱼ − aᵢ) / (j − i); a₁ = aᵢ − (i − 1) × d
Geometric nth term
aₙ = a₁ × r^(n − 1)
Geometric sum of n terms
Sₙ = a₁ × (1 − rⁿ) / (1 − r), or n × a₁ when r = 1
Geometric sum to infinity
S∞ = a₁ / (1 − r), only when −1 < r < 1
Position of a value x
arithmetic: n = (x − a₁)/d + 1; geometric: n = log(x/a₁)/log(r) + 1x is a term only if n comes out as a whole number of 1 or more. Results are shown to 12 significant figures, so 0.1 + 0.2 displays as 0.3.

Why the sum formula works

Write the sum forwards and backwards and add the two lines: 1 + 2 + ... + 100 and 100 + 99 + ... + 1. Every column adds to 101, there are 100 columns, and the total counts the sum twice, so the sum is 100 × 101 / 2 = 5,050 - the result associated with the young Carl Friedrich Gauss. The same pairing works for any arithmetic sequence: n pairs, each worth a₁ + aₙ, halved.

For a geometric sequence, multiply the sum by r and subtract it from the original: everything cancels except the first and last pieces, leaving Sₙ(1 − r) = a₁(1 − rⁿ).

Limitations: what the result does not prove

  • Results use ordinary double-precision numbers rounded to 12 significant figures for display. Very large n or ratio can overflow, and the page says so rather than showing Infinity.
  • Only the first 100 terms are listed; the nth term and the sum are still calculated exactly from the formulas for any n up to one million.
  • Pattern detection only recognises arithmetic and geometric sequences. Quadratic sequences, Fibonacci-style sequences and others are reported as neither.
  • With two geometric terms an even number of places apart, the sign of the ratio cannot be known; the positive ratio is shown and the alternative is flagged.

Privacy: where your data goes

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.

Standards and sources

Frequently asked questions

How do you find the nth term of an arithmetic sequence?

Use aₙ = a₁ + (n − 1)d, where a₁ is the first term and d the common difference. For 4, 7, 10, ... the 25th term is 4 + 24 × 3 = 76. Simplifying gives an explicit rule, here aₙ = 3n + 1, which the calculator writes out for you.

What is the formula for the sum of an arithmetic series?

Sₙ = n/2 × (2a₁ + (n − 1)d), or more simply n times the average of the first and last terms: n × (a₁ + aₙ) / 2. The first 50 odd numbers, 1 + 3 + ... + 99, add up to 50 × (1 + 99) / 2 = 2,500.

How do I find the common difference from two terms?

Subtract the earlier term from the later one and divide by how many places apart they are. If a₄ = 10 and a₉ = 30, d = (30 − 10) / (9 − 4) = 4. Choose Two terms on the calculator and it also finds the first term and the formula.

How can I tell if a sequence is arithmetic or geometric?

Look at consecutive terms. If the differences are all equal it is arithmetic; if the ratios are all equal it is geometric. 5, 10, 15 adds 5 each time; 5, 10, 20 doubles. Paste three or more terms and the calculator checks both for you.

What is the sum to infinity of a geometric series?

If the ratio r is between −1 and 1, the terms shrink fast enough for the total to settle at a₁ / (1 − r). For 1 + 1/2 + 1/4 + ... that is 1 / (1 − 0.5) = 2. With any other ratio the sum has no finite limit.

How do I check whether a number belongs to an arithmetic sequence?

Solve n = (x − a₁)/d + 1. If n is a whole number of 1 or more, x is that term; otherwise it falls between terms. For 2, 5, 8, ... the number 302 gives n = 101, so it is the 101st term; 300 gives 100.33, so it is not a term.

What did Gauss do with 1 + 2 + 3 + ... + 100?

The story is that he paired the numbers from opposite ends - 1 + 100, 2 + 99 and so on - making 50 pairs that each total 101, so the sum is 5,050. That pairing is exactly the arithmetic series formula, n × (first + last) / 2.

Last reviewed by the A2Z.Tools team against the sources listed above.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.

Advertisement