Arithmetic and geometric progression calculator with working
Type what you know (the first term, the common difference or ratio, any terms, a sum) and the solver finds the rest: the nth term, the sum, the number of terms, the sum to infinity, with every step explained.
a1 = 3, d = 4, find a20 and S20
a3 = 7, a8 = 22
b2 = 6, b5 = 162
b2 = 4, b4 = 16
1 + 3 + 5 + … + 99
a1 = 10, d = -2, Sn = 30
8, 4, 2, … infinite sum
a5 = 12, S9 = ?
Loading the solver…
What you can type
The notation is the usual school one: the terms of an arithmetic progression are $a_1, a_2, \ldots$, those of a geometric progression $b_1, b_2, \ldots$, the common difference is $d$, the common ratio $q$, and the sum of the first $n$ terms $S_n$. (English textbooks often write the ratio as $r$ and the first term of either kind as $a$; the solver uses the letters to tell the two kinds apart.) So a3 = 7, a8 = 22 is arithmetic and b2 = 6, b5 = 162 is geometric. Write what to find after the word “find” or with a question mark: S9 = ?. If you write nothing, the solver finds the first term, the difference or ratio, and the formula for the $n$th term.
You can also type the numbers themselves: for 2, 6, 18, … the solver checks which kind of progression it is, and 1 + 3 + 5 + … + 99 it adds up, working out along the way how many terms there are. Fractions take a slash (q = 1/3), decimals a point.
Which kind of progression is it?
If you’re given the numbers themselves, two calculations tell you the kind. Subtract each number from the next: if the differences are all equal, the progression is arithmetic, and that difference is $d$. Divide each number by the one before: if the ratios are all equal, the progression is geometric with ratio $q$. For $3, 7, 11, 15$ the differences are 4; for $3, 6, 12, 24$ the ratios are 2. But for $1, 2, 4, 7$ neither the differences (1, 2, 3) nor the ratios (2, 2, $\frac74$) agree, and it’s no progression at all, even though the first three numbers look geometric. That’s also why two numbers aren’t enough: 2 and 6 fit both “add 4” and “multiply by 3”.
The only sequence that is both arithmetic and geometric is a constant one: $5, 5, 5, \ldots$ with $d = 0$ and $q = 1$.
Arithmetic progressions: everything through $a_1$ and $d$
In an arithmetic progression each term is bigger than the one before by the same number $d$. So getting from the first term to the $n$th takes $n - 1$ equal steps:
The key idea behind all these problems: every term and every sum can be expressed in terms of two numbers, $a_1$ and $d$. So two independent conditions are enough to find everything. Given $a_3 = 7$ and $a_8 = 22$? Write $a_1 + 2d = 7$ and $a_1 + 7d = 22$, and subtract so that $a_1$ disappears: $5d = 15$, $d = 3$, $a_1 = 1$. The subtraction has a simple meaning: between the third and the eighth terms there are five steps, and together they add $22 - 7 = 15$.
The sum of the first $n$ terms is computed by the method credited to the young Gauss: add the first term to the last, the second to the second-to-last, and so on. Every pair gives the same total, because as you move in from the ends towards the middle, one term grows by $d$ and the other shrinks by the same amount.
The formula works for odd $n$ too: the middle term is then left without a partner, but it’s exactly half the sum of the end terms. Hence a favourite trick of olympiads and exams: $S_9 = 9 \cdot a_5$. If only the fifth term is known, you can’t find $a_1$ and $d$, but you can find the sum of the first nine.
Geometric progressions: everything through $b_1$ and $q$
Here each term is $q$ times the one before, and the steps become multiplications: $b_n = b_1 q^{n-1}$. From two terms the ratio is found by dividing, which cancels $b_1$: $\frac{b_5}{b_2} = q^3 = \frac{162}{6} = 27$, so $q = 3$ and $b_1 = \frac{6}{3} = 2$. Take care with an even power: if $\frac{b_4}{b_2} = q^2 = 4$, both $q = 2$ and $q = -2$ fit. These are two different progressions, $2, 4, 8, \ldots$ and $-2, 4, -8, \ldots$, and both belong in the answer.
If $|q| < 1$, the terms shrink quickly, $q^n$ tends to zero, and the progression acquires a sum of all its terms, the sum to infinity $S = \frac{b_1}{1 - q}$. So $8 + 4 + 2 + 1 + \ldots = \frac{8}{1 - 1/2} = 16$: each new partial sum covers half the remaining distance to 16. When $|q| \ge 1$ there’s no such sum, and the solver says so.
Worked examples
Example 1. The sum of the odd numbers up to 99
$1 + 3 + 5 + \ldots + 99$ is an arithmetic progression with $a_1 = 1$ and $d = 2$. First find how many terms there are: $99 = 1 + (n - 1) \cdot 2$, so $n - 1 = 49$, $n = 50$. Now the sum: $S_{50} = \frac{1 + 99}{2} \cdot 50 = 2500$. Notice that $2500 = 50^2$, and that’s no coincidence: the sum of the first $n$ odd numbers is always $n^2$.
Example 2. How many terms to add
$a_1 = 10$, $d = -2$; how many first terms add up to 30? Substitute into the sum formula: $\frac{20 + (n-1)(-2)}{2} \cdot n = 30$, that is, $n(11 - n) = 30$, or $n^2 - 11n + 30 = 0$. The roots $n = 5$ and $n = 6$ are both positive integers, and both are right: $10 + 8 + 6 + 4 + 2 = 30$, and the sixth term is zero and doesn’t change the sum.
Example 3. Two terms of a geometric progression
$b_2 = 4$, $b_4 = 16$. Divide: $q^2 = 4$, so $q = 2$ or $q = -2$. The first term is $b_1 = \frac{b_2}{q}$, that is, $2$ or $-2$. This gives the progressions $2, 4, 8, 16, \ldots$ and $-2, 4, -8, 16, \ldots$: both have second term 4 and fourth term 16. If the problem says the terms are positive, only the first remains.
Example 4. A sum to infinity
$8 + 4 + 2 + 1 + \ldots$ The ratio of neighbours is $\frac12$, so the progression is geometric with $|q| < 1$. The sum is $S = \frac{8}{1 - \frac12} = 16$. The partial sums 8, 12, 14, 15, $15\frac12$, … get ever closer to 16, and none of them ever reaches it.
Example 5. Only the fifth term is known
$a_5 = 12$. Find $S_9$. There aren’t two conditions, and neither $a_1$ nor $d$ can be found: both $12, 12, 12, \ldots$ and $4, 6, 8, \ldots$ fit. But all such progressions have the same sum. Write it in terms of $a_1$ and $d$: $S_9 = 9a_1 + 36d = 9(a_1 + 4d) = 9a_5 = 108$. A check on two progressions: $12 \cdot 9 = 108$ and $4 + 6 + \ldots + 20 = \frac{4 + 20}{2} \cdot 9 = 108$.
Common mistakes
- $a_n = a_1 + nd$ instead of $a_1 + (n-1)d$. There’s one step fewer than the term number. Checking with $n = 1$ catches the mistake at once.
- Losing a negative ratio. $q^2 = 4$ gives $q = \pm 2$, not just $q = 2$.
- The sum of $n$ terms instead of the $n$th term, or vice versa. $S_{10}$ is the sum of ten numbers; $a_{10}$ is one number.
- The wrong number of terms. The sum $2 + 5 + \ldots + 98$ has not $98 \div 3$ terms but $\frac{98 - 2}{3} + 1 = 33$.
- A sum to infinity when $|q| \ge 1$. With $q = 2$ the formula $\frac{b_1}{1 - q}$ gives a negative number for positive terms, a sure sign it was used where it doesn’t apply.
- A geometric progression with a zero. By definition $b_1 \ne 0$ and $q \ne 0$, or the terms couldn’t be divided by each other.
See also
Where progressions come from, how Gauss added the numbers from 1 to 100, and why Achilles does catch the tortoise after all are in the chapter “Sequences and induction”: arithmetic progressions in the section “A progression with a step”, geometric ones in “A progression with a factor”, and sums to infinity in “Achilles and the tortoise”. If the number of terms comes from a quadratic equation, the quadratic equation solver goes through it in detail, and problems about savings, where money grows as a geometric progression, go to the percentage calculator.
Where this is explained
Other solvers
- Quadratic equation
- Linear equation
- System of linear equations
- Higher-degree equations and factoring
- Inequalities by the interval method
- Derivative
- Integral
- Limit
- Curve sketching
- Fraction arithmetic
- GCD, LCM and Euclid's algorithm
- Prime factorisation
- Solving a triangle
- Matrices: determinant, inverse, rank, eigenvalues
- Trigonometric equation
- Exponential and logarithmic equations
- Percentages, compound interest, loans
- Permutations and combinations
- Number bases
- Complex numbers
- Congruences
- Probability: Bayes and Bernoulli trials
- Differential equation