Geometric Sequence Calculator

Compute nth term, sum of first N terms, infinite sum (if convergent), common ratio, and visualize the geometric progression.

Enter first term (any real), common ratio (any real), and n (positive integer). For infinite sum, convergence requires |r| < 1.
? Exponential Growth: a₁=2, r=3, n=6
? Exponential Decay: a₁=100, r=0.5, n=8
? Alternating: a₁=1, r=-2, n=7
⚖️ Constant: a₁=5, r=1, n=5
? Convergent: a₁=10, r=0.2, n=10
? Fractional ratio: a₁=3, r=1/3, n=6
Privacy first: All calculations are performed locally in your browser. No data is transmitted or stored. All formulas and visualizations use client‑side double‑precision IEEE 754 arithmetic — fully auditable via browser developer tools.

What is a Geometric Sequence?

A geometric sequence (or geometric progression) is a sequence of numbers where each term after the first is found by multiplying the previous term by a fixed, non‑zero number called the common ratio (r). Formally: aₙ = a₁ · rⁿ⁻¹. It models exponential growth, radioactive decay, financial compound interest, and many natural phenomena. The sum of the first n terms is Sₙ = a₁(1−rⁿ)/(1−r) for r ≠ 1, and Sₙ = n·a₁ if r = 1. When |r| < 1, the infinite geometric series converges to S∞ = a₁/(1−r).

✨ Key formulas:
aₙ = a₁·rⁿ⁻¹
Sₙ = a₁·(1−rⁿ)/(1−r) , r ≠ 1
S∞ = a₁/(1−r) , if |r| < 1

Why Use an Interactive Geometric Sequence Calculator?

  • Visual Learning: See how terms evolve – explosive growth, decay, or alternation – directly on the graph.
  • Financial & STEM Utility: Model investment portfolios (compound interest), population forecasts, or half‑life in physics.
  • Error‑Free & Fast: Instantly verify homework, detect convergence, and avoid manual formula mistakes.
  • Deep Understanding: Explore the effect of r: |r|>1 diverges, |r|<1 converges, r negative alternates signs.

Step-by-Step Derivation & Algorithm

The tool uses high‑precision arithmetic to compute exact results:

  1. Validate inputs: Ensure a₁ and r are numeric, n is a positive integer. If n ≤ 0, default to n=1.
  2. Compute nth term: aₙ = a₁ * rⁿ⁻¹ using Math.pow.
  3. Compute partial sum: if |r-1| < 1e-12 (r ≈ 1) ⇒ Sₙ = n * a₁; else Sₙ = a₁*(1−rⁿ)/(1−r). Check for overflow (rⁿ large) and display warning.
  4. Infinite sum: if |r| < 1 ⇒ a₁/(1−r) else "divergent (|r| ≥ 1)" or r=1 non‑convergent infinite.
  5. Graphing: Draw first up to min(n, 15) terms in a canvas with adaptive y‑scaling – handles positive/negative large values.
Real‑World Case Study: Compound Interest

Suppose you invest $1,000 at an annual interest rate of 5% compounded yearly. The account balance follows a geometric sequence with a₁ = 1000 and r = 1.05. After 10 years, the balance = 1000 × (1.05)⁹ ≈ $1,551.33. Use our calculator with a₁=1000, r=1.05, n=10 to quickly verify. Moreover, the sum of contributions (if you add fixed amounts) diverges, but here the growth factor demonstrates exponential compounding – a core principle in personal finance.

Common Ratio Effects & Convergence Insights

Condition on r Behavior of Sequence Convergence of Series (S∞)
r > 1 Exponential growth (diverges to ±∞) Divergent (infinite sum → ∞ or -∞)
r = 1 Constant sequence (all terms equal) Divergent (Sₙ = n·a₁ → ±∞ unless a₁=0)
0 < r < 1 Exponential decay (approaches 0) Convergent to a₁/(1−r)
-1 < r < 0 Alternating decaying to 0 Convergent (alternating series sum converges)
r = -1 Alternates between a₁ and -a₁ Oscillating, no convergence
r < -1 Alternating growth (magnitude increases) Divergent

The Infinite Geometric Series: Gateway to Calculus

The infinite sum Σ a₁·rⁿ⁻¹ = a₁/(1−r) for |r|<1 is one of the most fundamental series in mathematics. It appears in fractal geometry (Koch snowflake perimeter), Zeno's paradox, and the computation of repeating decimals. Our calculator instantly evaluates whether the series converges and gives the exact sum – a powerful feature for calculus students and engineers.

Frequently Asked Questions

Arithmetic sequences add a constant difference; geometric sequences multiply by a constant ratio. For example, 2,5,8 (arithmetic) vs 2,6,18 (geometric).

Yes. If r = 0, then all terms after the first are zero. Negative r causes alternation between positive and negative values.

Our calculator detects overflow and displays a warning. For large |r|>1, the terms become extremely large; the graph will show a truncated range and sum may be marked as overflow.

If r=1, the partial sum Sₙ = n·a₁ diverges to ±∞ unless a₁=0, therefore no finite infinite sum exists. The calculator shows "Divergent".

Compound interest, radioactive decay, population growth (in ideal conditions), depreciation of assets, and even the pattern of a bouncing ball (height ratio).
Mathematical foundation & transparency – This calculator implements classical geometric sequence formulas as taught in accredited curricula (e.g., Common Core State Standards, OpenStax Algebra). The code uses standard JavaScript arithmetic and is fully client‑side, allowing anyone to inspect the logic via browser developer tools. For rigorous verification, every result can be cross‑checked against authoritative references such as Stewart's Calculus (8th ed., 2015) or the Khan Academy Sequences module. No user data is collected nor external dependencies required.