ForHosting KIT · Math

Geometric sequence calculator

With a first term of 2 and a ratio of 3, the 5th term is 162 and the first five terms add up to 242. Enter the first term, the ratio and how many terms you want, up to 10,000, and get both answers at once. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
2
Resistance (Ω)
3
N
5
You get
Term
162
Sum
242
Formula term
a_n = a * r^(n-1)
Formula sum
S_n = a * (1 - r^n) / (1 - r)

The geometric sequence calculator returns the n-th term and the finite sum of a geometric progression from three values: the first term a, the common ratio r, and a positive integer n. Each term multiplies the previous term by the same ratio, so the sequence is a, a·r, a·r², …, a·r^(n-1). Give a, r, and n ≥ 1 and you receive the term, the sum, the formulas used, and the published maximum n so clients can validate batches before they send them. Results are deterministic floating-point arithmetic with no random sampling and no network call.

What a geometric sequence is and what you get

A geometric sequence (also called a geometric progression) is a list of numbers in which each term after the first is found by multiplying the previous term by a fixed common ratio. If the first term is a and the ratio is r, the terms are a, ar, ar², ar³, and so on. This calculator answers two standard classroom and engineering questions at once: what is the n-th term, and what is the sum of the first n terms.

The response includes the normalized inputs a, r, and n, the computed term and sum as finite numbers, the formula strings that were applied so students can cross-check by hand, and the documented maximum supported n. The contract is intentionally strict. Missing a or r, non-finite values, and results that overflow the floating-point range are also rejected with a clear message.

Infinite geometric series (when |r| < 1 and n goes to infinity) are out of scope on purpose: this page is the finite geometric progression tool only. If you need arithmetic sequences, Fibonacci-style recurrences, or Collatz orbits, use those dedicated tools; here the search intent is geometric term and partial sum from a, r, and n.

How a, r, and n are read and how the formulas are applied

Optional leading plus signs on integers for n are allowed; embedded spaces, hex prefixes, and empty strings are rejected so a bad cell does not become a wrong term. Zero is a valid first term or ratio, but n must never drop below one because there is no zero-th term under the standard one-based indexing used in school and most textbooks. Computation multiplies iteratively for powers of r so overflow is detected before a silent Infinity is returned.

When r equals exactly one, every term is a and the sum is simply a times n, which is the correct closed form and avoids dividing by zero in the general formula. When r is not one, the engine uses S_n equals a times (one minus r to the n) divided by (one minus r).

Where geometric progressions fit in study, finance, and code

Students meet geometric sequences when a textbook asks for the tenth term of a population that doubles each generation, when a worksheet wants the sum of a series of compound growth factors, or when they verify that the sum formula collapses correctly for r equals one. Teachers can pre-generate answer keys for problem sets without trusting opaque calculator apps that hide intermediate steps.

Developers call the same contract from scripts to seed deterministic test vectors for growth models, to illustrate closed-form versus iterative implementations, or to satisfy programming-challenge statements that demand exact term and sum for given a, r, and n. Finance and product teams sketch simple geometric growth of fees, seats, or inventory units with a fixed multiplier before they move to a full spreadsheet model. Science communicators use short geometric sequences as a clean example of exponential change with integer steps, which pairs well with plots of term size against n.

Homework and exam preparation

Look up exact n-th terms and finite sums for textbook geometric progression exercises with known a, r, and n.

Growth sketches and teaching demos

Illustrate compound growth with a fixed ratio, and show how the closed sum formula behaves when r is one versus not one.

What does the geometric sequence calculator cost?

It is free in your browser on this page.

How is the finite sum computed when r equals 1?

When the common ratio is exactly 1, every term equals a and S_n = a · n. The general division formula is not used, so there is no divide-by-zero.

Can I send n below 1?

No. n must be an integer greater than or equal to 1.

Does this compute the infinite geometric series?

No. This tool returns only the finite sum of the first n terms. Infinite-series limits when |r| < 1 are out of scope.

How do I find the 5th term of a geometric sequence?

Multiply the first term by the ratio raised to one less than the position: a × r^(n−1). With a first term of 2 and a ratio of 3, the 5th term is 2 × 3^4, which is 162.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/geometric-sequence

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/geometric-sequence \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":2,"r":3,"n":5}'
{
  "a": 2,
  "r": 3,
  "n": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.geometric_sequence",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_n10000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The engine applies the closed formulas a_n = a · r^(n-1) and S_n = a · (1 − r^n) / (1 − r) when r is not one, or S_n = a · n when the ratio is exactly one.

What a geometric sequence is and what the response contains

The index n must be an integer at least one and at most ten thousand; zero, negatives, fractions, and scientific notation on n are rejected with invalid_input rather than silently coerced.

How a, r, and n are read and how the formulas are applied

The preferred fields are a, r, and n as JSON numbers, but decimal strings are accepted for form and spreadsheet callers. Aliases first, first_term, and a1 map to the first term; ratio and common_ratio map to r; terms, index, and k map to n. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the formulas yourself.

Where geometric progressions fit in study, finance, and code

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with arithmetic-sequence tools when you need constant differences, with Lucas or square-number calculators when you need other ranked sequences, and with unit converters when you are building a small lab of free, deterministic endpoints.

Deterministic test fixtures

Generate reproducible term and sum values for unit tests, property checks, and CI assertions without hand-rolled formulas.

What formula is used for the n-th term?

The n-th term is a_n = a · r^(n-1), with n counted from 1. For example a=2, r=3, n=5 yields 162.

Read the full KIT documentation →