ForHosting KIT · Math

Finite geometric series partial sum

Sum a geometric progression without adding term by term: first term 2, ratio 3 and five terms give 2 + 6 + 18 + 54 + 162 = 242, with 162 shown as the last term. A ratio of exactly 1 is handled too. 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
Sum
242
Last term
162
Max n
10,000

A finite geometric series is the running total of a geometric sequence: each term is the previous term multiplied by a fixed common ratio. Classic classroom examples include two plus six plus eighteen plus fifty-four, where the first term is two, the ratio is three, and four terms sum to eighty. Instead of adding every power by hand, the closed formula multiplies the first term by one minus the ratio raised to the number of terms, then divides by one minus the ratio—or simply multiplies the first term by n when the ratio is exactly one. This capability evaluates that partial-sum formula deterministically: send a, r, and n, and receive the sum, the last term, and the formula string used.

What a finite geometric series is and how the closed sum works

A geometric sequence starts at a first term a and multiplies by a common ratio r at every step, so the terms read a, a times r, a times r squared, up through a times r to the power n minus one. The finite geometric series is the partial sum of those first n terms.

Deriving the closed form is standard calculus and precalculus material: write S_n for the sum, multiply by r to shift indices, and subtract to cancel the middle terms, leaving S_n times one minus r equal to a times one minus r to the n. Dividing through yields S_n equals a times one minus r to the n, all over one minus r, whenever r is not one.

When r equals one every term is a, so the sum collapses to a times n—a special case the formula would divide by zero if applied naively. Classic checks include a equals two, r equals three, n equals five: the terms are two, six, eighteen, fifty-four, and one hundred sixty-two, and the closed sum is two hundred forty-two. Unlike an infinite geometric series, there is no convergence requirement on |r|; every finite n is well-defined when the arithmetic stays inside finite floating point.

Where a finite geometric series calculator earns its keep

Classrooms and tutoring platforms use a finite geometric series partial sum calculator so learners can verify S_n for arbitrary a, r, and n without sign errors when expanding powers by hand. Exam-prep generators need a deterministic oracle that marks wrong a term count of zero instead of silently returning empty success. Physics and engineering notes use geometric progressions for successive attenuation, sampling gains, or recursive filter envelopes; the closed form is exact within floating point and cheaper than iterating thousands of multiplies in a spreadsheet.

Sibling landings in this kit target different intents: the infinite geometric series sum requires absolute ratio strictly less than one, and the geometric sequence calculator emphasizes the n-th term together with the sum under sequence-oriented wording. This page is specifically for people searching for the finite partial-sum closed form in a calculus framing. Failed validation does not consume balance.

Keep n inside the published range, pin the rounded sum in tests, and you get reproducible partial sums for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.

Classroom and homework checks

Let students submit first term, common ratio, and term count; verify S_n against the closed formula without expanding every power by hand.

Exam and LMS auto-grading

Mark finite geometric series items with a deterministic oracle that rejects n below one and never invents an infinite-sum answer.

Finance and compound growth over fixed horizons

Sum geometric cash flows or multi-period compound factors for a known number of steps in scripts without a computer-algebra dependency.

How do I compute the sum of a finite geometric series?

Send finite numbers a (first term), r (common ratio), and integer n (term count ≥ 1).

What if the common ratio r equals 1?

Every term equals a, so the sum is a times n.

Does |r| need to be less than 1?

No. Finite partial sums are defined for any finite r. The |r| < 1 requirement applies only to infinite geometric series, which is a different capability.

What values of n are allowed?

n must be a whole integer from 1 through 10000.

What is the sum of 2 + 6 + 18 + 54 + 162?

It is 242. This is a geometric series with first term 2, ratio 3 and five terms; the formula multiplies 2 by 1 − 3^5 and divides by 1 − 3. The calculator also reports 162 as the last term.

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/calculus/geometric-series-sum-finite

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/calculus/geometric-series-sum-finite \
  -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": "calculus.geometric_series_sum_finite",
  "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.

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.

Students checking homework, tutors auto-grading geometric series items, finance scripts modeling compound growth over a fixed horizon, and engineers summing geometric loads get the same pure function in the free browser tool and the prepaid API, with hard invalid_input when the term count falls below one or inputs are non-finite.

What a finite geometric series is and how the closed sum works

Another check is a unit first term with ratio one half over four terms: one plus one half plus one quarter plus one eighth equals one and seven eighths. Because the algorithm uses iterative powers with overflow detection rather than Math.pow alone, large |r| or large n fail with a clear invalid_input instead of silently returning Infinity.

Input contract, response shape, and error behaviour

Use it from homework pipelines, contest validators, compound-growth checks over a fixed number of periods, or any workflow that needs a reproducible finite geometric partial sum without installing a computer-algebra package. POST a JSON body with three required fields. Field a is a finite number—the first term—with aliases first, first_term, and a1. Field r is a finite number—the common ratio—with aliases ratio and common_ratio; r may be negative, fractional, greater than one in absolute value, or exactly one. Field n is a whole integer from one through ten thousand—the number of terms in the partial sum—with aliases terms, count, and k. On success the response echoes a, r, and n as coerced numbers; sum equal to the closed partial sum rounded to twelve decimal places for stable goldens; last_term equal to a times r to the power n minus one, also rounded; formula equal to the string S_n equals a times open-paren one minus r to the n close-paren over one minus r, or the special-case string when r is one; and max_n equal to the published ceiling of ten thousand. Failed validation—missing any required field, a non-number for a or r, a non-integer or fraction for n, n above the maximum, n below one, or intermediate overflow—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item.

Where a finite geometric series calculator earns its keep

Finance and operations notebooks often sum geometric cash flows, depreciation schedules, or multi-period compound factors over a fixed horizon; calling a tiny parse API avoids pulling a full symbolic library for three coefficients.

What does the finite geometric series calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →