Geometric Series Sum Calculator Formula

Understand the math behind the geometric series sum calculator. Each variable explained with a worked example.

Formulas Used

Finite Sum

finite_sum = r != 1 ? a * (1 - pow(r, n)) / (1 - r) : a * n

Infinite Sum

infinite_sum = abs(r) < 1 ? a / (1 - r) : 0

Last Term

last_term = a * pow(r, n - 1)

Variables

VariableDescriptionDefault
aFirst Term (a)1
rCommon Ratio (r)0.5
nNumber of Terms (n)10

How It Works

Geometric Series Sum

Finite Sum

Sₙ = a × (1 - r^n) / (1 - r) (when r ≠ 1)

Infinite Sum (converges only when |r| < 1)

S∞ = a / (1 - r)

Example

1 + 1/2 + 1/4 + 1/8 + ... = 1 / (1 - 0.5) = 2

The infinite sum converges to a finite value when the common ratio has absolute value less than 1.

Worked Example

1 + 0.5 + 0.25 + 0.125 + ... (10 terms and infinite).

a = 1r = 0.5n = 10
  1. 01Finite sum (10 terms) = 1 × (1 - 0.5¹⁰)/(1 - 0.5) = (1 - 0.000977)/0.5 ≈ 1.998047
  2. 02Infinite sum = 1/(1-0.5) = 2
  3. 03Last term = 1 × 0.5⁹ = 0.001953

Ready to run the numbers?

Open Geometric Series Sum Calculator