HomeMath › Geometric Sequence Calculator

Geometric Sequence Calculator

Computes the n-th term and the sum of the first n terms of a geometric progression from the first term and common ratio, plus the sum to infinity when |r| < 1.

When to use

Each term is the previous one multiplied by a constant ratio (e.g. 3, 6, 12, …) and you need a term, a partial sum or the limit of the series.

Do not use when: Terms change by a constant difference (use arithmetic-sequence) or you need a money value with periodic deposits (use future-value / compound-interest).

Formula

aₙ = a₁·r^(n−1); Sₙ = a₁·(1 − rⁿ)/(1 − r) for r ≠ 1 (Sₙ = n·a₁ for r = 1); S∞ = a₁/(1 − r) for |r| < 1

Inputs

ParameterTypeUnitRequiredDescription
first_termnumberyesThe first term of the sequence.
common_rationumberyesFactor between consecutive terms (may be negative or fractional).
nintegeryesIndex of the term to compute and the number of terms to sum. Range: ≥ 1, ≤ 100000

Outputs

OutputTypeUnitDescription
nth_termnumbera₁ × r^(n − 1).
sumnumbera₁ × (1 − rⁿ) / (1 − r), or n × a₁ when r = 1.
infinite_sumnumbera₁ / (1 − r); only when |r| < 1 (the series converges).
convergesbooleantrue when |r| < 1, so the infinite sum exists.
first_termsnumber_listThe first min(n, 10) terms of the sequence.
explicit_formulastringThe formula for the general term with the given values.

Example

3, 6, 12, … (5 terms): {"first_term":3,"common_ratio":2,"n":5}{"nth_term":48,"sum":93,"converges":false,"first_terms":[3,6,12,24,48],"explicit_formula":"a_n = 3 × 2^(n − 1)"}

1, 1/2, 1/4, … (4 terms): {"first_term":1,"common_ratio":0.5,"n":4}{"nth_term":0.125,"sum":1.875,"infinite_sum":2,"converges":true}

GET https://tttkmbb.com/api/v1/calculate/geometric-sequence?first_term=3&common_ratio=2&n=5

Machine access

Sources

FAQ

When does the infinite sum exist?

Only when |r| < 1; then the terms shrink toward zero and the partial sums approach a₁ / (1 − r). For |r| ≥ 1 the series diverges and infinite_sum is omitted.

What if the ratio is negative?

Terms alternate in sign. The formulas still apply, and the series converges when |r| < 1 (e.g. r = −0.5 gives S∞ = a₁ / 1.5).

Related calculators