Arithmetic, Algebra & Number Theory Sequences, Series & Combinatorics Geometric progression, aₙ = a₁rⁿ⁻¹

Geometric Sequence Calculator

A geometric sequence multiplies by the same number every step. Give this calculator the first term and either the common ratio or any other term in the sequence, and it returns the nth term, the sum of the first n terms, and — when the ratio is smaller than 1 in size — the sum of the whole infinite series. It also lists the terms with a running total so you can see how quickly the sum settles down or runs away. Geometric progressions sit under compound growth, annuity valuation, radioactive decay, signal attenuation and the resolution of every repeating decimal.

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 of the term you are calling number 1. Every other term is measured from here.3
Term index nWhich term you want, counting the first term as n = 1.10
How do you know the ratio?Pick the second option when you have two terms of the sequence but not the multiplier between them.I know the common ratio r
Common ratio rThe number each term is multiplied by to reach the next. Enter 1.05 for 5% growth per step, 0.5 for halving.2
Value of a known later termAny other term of the same sequence, whose position you give below.162
Position of that termIts index k, counting the first term as 1. Must be at least 2, since a term cannot be its own reference.5

It returns

  • Term aₙ — a₁ multiplied by r raised to the power n − 1.
  • Common ratio r
  • Sum of the first n terms
  • Sum to infinity — Only exists when |r| < 1. Reads as a dash for any other ratio, because the series has no finite total.
  • Change per term — (r − 1) expressed as a percentage, so a ratio of 1.05 reads 5%.

The formula

an=a1rn1
Sn=a1(1rn)1r
S=a11r
r=(aka1)1k1

In plain text: aₙ = a₁ × rⁿ⁻¹; Sₙ = a₁(1 − rⁿ) ÷ (1 − r) for r ≠ 1; S∞ = a₁ ÷ (1 − r) when |r| < 1

  • aₙThe nth term of the sequence (same as a₁)
  • a₁First term (any)
  • rCommon ratio — the multiplier between consecutive terms (—)
  • nTerm index, counting the first term as 1 (—)
  • SₙSum of the first n terms (same as a₁)
  • S∞Sum of the whole infinite series, defined only for |r| < 1 (same as a₁)

The exponent is n − 1, not n, because the first term has been multiplied by r zero times. When r = 1 the partial-sum formula divides by zero, so that case is handled separately as Sₙ = n·a₁.

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

What makes a sequence geometric

A sequence is geometric when the ratio between consecutive terms is constant. Divide any term by the one before it and you get the same number every time: that number is the common ratio r. The sequence 3, 6, 12, 24, 48 is geometric with r = 2; the sequence 3, 6, 9, 12 is not, because 6 ÷ 3 = 2 but 9 ÷ 6 = 1.5. That second sequence has a constant difference instead, which makes it an arithmetic sequence.

The distinction decides which formula applies and how the sequence behaves at scale. An arithmetic sequence adds the same amount each step, so it climbs in a straight line. A geometric sequence multiplies, so it either explodes or collapses. That is why geometric progressions are the natural language for anything that compounds: a balance earning a fixed rate, a population with a fixed reproduction factor, a signal losing a fixed fraction of its power per kilometre of fibre, an isotope with a fixed half-life.

Three quantities pin a geometric sequence down completely: the first term a1, the common ratio r, and how many terms you want. If you do not know r but you do know two terms, switch this calculator to the second mode — the ratio is recovered by taking a root, since ak ÷ a1 = rk−1.

Why the formulas look the way they do

The nth term. an = a1rn−1. The exponent is n − 1 rather than n because the first term has been multiplied by r zero times. Getting this off by one is the single most common error in geometric-sequence homework, and it shows up as an answer that is either r times too big or r times too small. If you prefer to index from zero, write an = a0rn and be consistent about it.

The partial sum. The derivation is worth knowing because it takes one line. Write Sn = a1 + a1r + … + a1rn−1, multiply the whole thing by r, and subtract the second line from the first. Everything in the middle cancels and you are left with Sn(1 − r) = a1(1 − rn), so Sn = a1(1 − rn) ÷ (1 − r). The division fails at r = 1, which is exactly the case where all the terms are equal and the sum is simply na1.

The sum to infinity. Let n grow in the partial-sum formula. If |r| < 1 then rn shrinks towards zero, the numerator settles at a1, and S = a1 ÷ (1 − r). If |r| > 1 then rn grows without bound and there is no finite total. At |r| = 1 the terms never shrink at all: with r = 1 the sum climbs by a1 forever, and with r = −1 it oscillates between a1 and 0 without settling. All three of those cases return a dash rather than a number here.

Worked example: 3, 6, 12, 24, … out to ten terms

Take a1 = 3 and r = 2, and ask for the tenth term and the sum of the first ten.

  1. Exponent. n − 1 = 10 − 1 = 9.
  2. Power. 29 = 512.
  3. Tenth term. a10 = 3 × 512 = 1,536.
  4. Power for the sum. 210 = 1,024.
  5. Partial sum. S10 = 3(1 − 1,024) ÷ (1 − 2) = 3 × (−1,023) ÷ (−1) = 3 × 1,023 = 3,069.
  6. Check by adding. 3 + 6 + 12 + 24 + 48 + 96 + 192 + 384 + 768 + 1,536, accumulating as 9, 21, 45, 93, 189, 381, 765, 1,533, 3,069. It matches.
  7. Change per term. (r − 1) × 100 = (2 − 1) × 100 = 100% per step.
  8. Sum to infinity. None. |r| = 2 is greater than 1, so the series diverges and that output stays blank.

Now change the ratio to 0.5 with a1 = 1. The tenth term becomes 0.59 = 1 ÷ 512 = 0.001953125, the partial sum becomes (1 − 0.0009765625) ÷ 0.5 = 1.998046875, and the sum to infinity is 1 ÷ (1 − 0.5) = 2. Ten terms have already covered 99.9023% of the eventual total — 1.998046875 ÷ 2 — which is what fast convergence looks like.

How to read the ratio and the sums

Start with the size of r, because it decides everything else. A ratio above 1 in size means the terms grow and the series diverges; a ratio below 1 in size means the terms shrink and the series has a finite total. The sign of r is a separate question: a negative ratio makes the terms alternate, so odd-numbered terms carry the sign of a1 and even-numbered terms carry the opposite sign. An alternating series can still converge — r = −0.5 converges perfectly well — because convergence depends on |r| alone.

The change-per-term output restates r in the language people actually use for growth. A ratio of 1.05 is 5% per step, 0.90 is −10% per step, and 2 is +100%. That makes the connection to exponential growth and decay explicit: a geometric sequence sampled at whole steps is the discrete version of the same exponential curve, and percentage change per period is the same quantity written differently.

When the series converges, look at how fast. The remainder after n terms is SSn = a1rn ÷ (1 − r), so the fraction of the total still outstanding is exactly rn. At r = 0.5 that is 0.510 = 0.098% left after ten terms; at r = 0.95 it is 0.9510 = 59.9% still to come. The ratio table below makes the gap between those two regimes concrete.

How the ratio changes the tenth term and the sums

Every row uses a first term of 1, so the entries are pure functions of the ratio. Multiply any figure by your own a1.
Ratio rChange per terma10 = r9S10S
0.50−50%0.0019531.9980472.000000
0.80−20%0.1342184.4631295.000000
0.90−10%0.3874206.51321610.000000
0.95−5%0.6302498.02526120.000000
1.000%1.00000010.000000diverges
1.05+5%1.55132812.577893diverges
1.10+10%2.35794815.937425diverges
1.20+20%5.15978025.958682diverges
2.00+100%512.0000001023.000000diverges

S₁₀ uses (1 − r¹⁰) ÷ (1 − r) except at r = 1, where it is 10 × 1 = 10. Notice the jump in S∞ between r = 0.90 and r = 0.95: halving the shortfall 1 − r doubles the total, because S∞ is 1 ÷ (1 − r).

Every repeating decimal is a geometric series

Write 0.7777… as 0.7 + 0.07 + 0.007 + … That is a geometric series with a1 = 0.7 and r = 0.1, so its total is 0.7 ÷ (1 − 0.1) = 0.7 ÷ 0.9 = 7/9. The same argument turns 0.999… into 0.9 ÷ 0.9 = 1, which is not a trick but a direct consequence of |r| < 1. Enter 0.7 and 0.1 above with a large term index and you will watch the running sum climb towards 0.7777…; the decimal to fraction calculator does the same conversion in one step.

Mistakes and limits worth knowing

  • Using rn instead of rn−1 for the term. The exponent counts multiplications, and the first term has had none. Check with n = 1: the formula must give back a1 exactly.
  • Applying the partial-sum formula at r = 1. It divides by 1 − r, which is zero there. The answer is n × a1, and this calculator switches to that branch automatically.
  • Claiming a sum to infinity for |r| ≥ 1. The formula a1 ÷ (1 − r) still returns a number for r = 2 — it gives −a1 — but that number is meaningless, because the derivation assumed rn tends to zero. This page returns a dash instead.
  • Forgetting the second root when deriving r. If the two terms you supply are an even number of steps apart, both +r and −r fit. The calculator reports the positive root and warns you; enter the ratio directly if you need the alternating one.
  • Reading a geometric sequence as a growth model past its domain. A ratio of 1.10 per year is fine for a decade and absurd for a century. The mathematics never runs out; the physical, biological or financial process behind it does.
  • Overflow at large ratios. Double-precision arithmetic tops out near 1.8 × 10308. At r = 10 that limit is passed before n = 310, and the term output becomes a dash with a warning rather than a wrong number.

Where geometric series show up, and what to use instead

Finance is the densest user. The present value of a level annuity is a geometric series with r = 1 ÷ (1 + i), and the standard annuity factor (1 − (1 + i)−n) ÷ i is the partial-sum formula rearranged. A perpetuity is that series taken to infinity, which is why its value is a single payment divided by the rate — the |r| < 1 case, with 1 − r = i ÷ (1 + i).

Physics and engineering use the decay side. Each half-life multiplies the remaining quantity by 0.5, so activity after n half-lives is a geometric term. Each identical filter stage multiplies signal power by the same fraction. Each bounce of a ball returns the same fraction of the previous height, and the total distance travelled is a convergent geometric series — which is how a ball that bounces infinitely often still comes to rest in finite time.

Use a different tool when the pattern is not multiplicative. Constant differences call for an arithmetic sequence; additive recurrences that look back two terms call for the Fibonacci sequence calculator, whose terms grow geometrically at 1.618 without being a geometric sequence. If you need the ratio itself from awkward data, the exponent calculator and the logarithm calculator handle the root and the solve-for-n step: rearranging an = a1rn−1 gives n = 1 + log(an ÷ a1) ÷ log r.

Key terms

Common ratio
The constant multiplier between consecutive terms, r = an+1 ÷ an. It is the defining quantity of a geometric progression.
Partial sum
The total of the first n terms, written Sn. It exists for every ratio, including ratios that make the infinite series diverge.
Convergent series
A series whose partial sums approach a finite limit. A geometric series converges exactly when |r| < 1.
Geometric progression
Another name for a geometric sequence, common in British and actuarial texts and usually abbreviated GP.
Perpetuity
A payment stream with no end date. Its value is the sum to infinity of a convergent geometric series, which is why it is finite despite the payments never stopping.

Frequently asked questions

How do I find the common ratio if I only have two terms?

Divide the later term by the earlier one and take the root matching the number of steps between them. If a1 = 2 and a5 = 162, the gap is four steps, so r = (162 ÷ 2)1/4 = 810.25 = 3. Switch this calculator to Work it out from another term and it does exactly that. Be aware that an even gap admits both +3 and −3, since both raised to the fourth power give 81.

When does a geometric series have a sum to infinity?

Only when the common ratio is smaller than 1 in absolute value, so −1 < r < 1. Then rn shrinks towards zero as n grows and the partial sums close on a1 ÷ (1 − r). At r = 1 the sum climbs by a1 forever; at r = −1 it flips between a1 and 0 without settling; beyond ±1 the terms themselves grow. This calculator leaves the sum-to-infinity output blank in all three of those cases.

What is the difference between a geometric sequence and a geometric series?

The sequence is the list of terms; the series is their sum. 3, 6, 12, 24 is a sequence, while 3 + 6 + 12 + 24 = 45 is the corresponding series. This page gives you both: the nth term and the term list describe the sequence, while the partial sum and the sum to infinity describe the series. The same distinction applies to arithmetic sequences and arithmetic series.

Can the common ratio be negative or a fraction?

Yes to both, and the formulas need no modification. A fractional ratio between −1 and 1 makes the terms shrink, which is the convergent case. A negative ratio makes the signs alternate, so with a1 = 1 and r = −0.5 the sequence runs 1, −0.5, 0.25, −0.125. Its sum to infinity is 1 ÷ (1 − (−0.5)) = 1 ÷ 1.5 = 0.6667, which is smaller than a1 because the negative terms subtract.

Why is the exponent n &minus; 1 and not n?

Because the first term has not been multiplied by the ratio at all. a1 = a1r0, a2 = a1r1, and so on, so reaching term n takes n − 1 multiplications. The quick check is to substitute n = 1: the formula must return a1 unchanged, and a1r1 would not. Some textbooks index from a0 instead, in which case the exponent genuinely is n — the arithmetic is identical, only the labelling differs.

How many terms do I need before the partial sum is close enough?

The fraction of the infinite total still missing after n terms is exactly rn, so solve rn = your tolerance. At r = 0.5, ten terms leave 0.098% outstanding and twenty leave less than one part per million. At r = 0.95, ten terms still leave 59.9% to come and you need 90 terms to get within 1%. Convergence speed is set entirely by how far |r| sits below 1.

Is compound interest a geometric sequence?

Yes. A balance earning 5% a year is the sequence a1, 1.05a1, 1.05²a1, …, which is geometric with r = 1.05. The balance after n years of growth is the (n+1)th term, a1 × 1.05n, and the off-by-one is the usual source of confusion — year zero is term one. A stream of level deposits is the corresponding series, which is where the annuity formula comes from.

What does the calculator do when the terms get too large?

It returns a dash and raises a warning rather than printing a wrong figure. Double-precision arithmetic overflows above roughly 1.8 × 10308, and a ratio of 2 reaches that at around n = 1,025. The term index is capped at 200 here, so overflow only bites at large ratios — r = 100 with n = 160 is already past the limit. Reduce n or the ratio and the outputs return.

References

  • Calculus, 4th ed. (Chapter 22, Infinite Series) — Michael Spivak, Publish or Perish
  • Concrete Mathematics: A Foundation for Computer Science, 2nd ed. (Chapter 2, Sums) — Ronald Graham, Donald Knuth and Oren Patashnik, Addison-Wesley
  • NIST Digital Library of Mathematical Functions, §1.9 Infinite Sequences and SeriesNational Institute of Standards and Technology
  • IEEE Standard for Floating-Point Arithmetic, IEEE 754-2019 — IEEE