Arithmetico-geometric series sum
With a first term of 1, a difference of 1, a ratio of 0.5 and 5 terms, the sum is 3.5625. Enter the arithmetic start and step, the geometric ratio and how many terms you want, and get the finite sum from its closed formula. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 1
- Diff
- 1
- Resistance (Ω)
- 0.5
- N
- 5
- Decimal places
- 6
- Sum
- 3.5625
Finite sum Σ(a+(k)d)r^k closed form. Search intent: arithmetico geometric series. No network calls or random seeds are required. Failed jobs are not billed.
What an arithmetico-geometric series is
An arithmetico-geometric series multiplies two familiar patterns term by term. The first factor grows like an arithmetic sequence: a, then a plus d, then a plus two d. The second factor grows like a geometric sequence: 1, then r, then r squared. Put together, the terms are a, then (a + d) times r, then (a + 2d) times r squared, and the series adds the first n of them. With a first term of 1, a difference of 1, a ratio of 0.5 and 5 terms, the arithmetic parts 1 to 5 are multiplied by successive powers of 0.5, and the total is 3.5625.
How the closed formula works, and the usual slips
Adding term by term is fine for five terms but slow for many. The classic trick is to multiply the whole sum by r and subtract it from the original: the arithmetic parts collapse, leaving a plain geometric series with a known total. That is the closed formula this calculator applies. It breaks down when the ratio is exactly 1, because every geometric factor is then 1, so that case is handled on its own as an ordinary arithmetic sum. Common slips are treating the first term as already multiplied by r, which shifts every power by one, and confusing this finite sum with the limit of an infinite series.
What you can do with it
Teaching
Pinned goldens.
FAQ
What is an arithmetico-geometric series?
It is a sum whose terms multiply an arithmetic sequence by a geometric one: a, then (a + d) times r, then (a + 2d) times r squared, and so on. The calculator adds the first n of those terms.
What happens when the ratio is exactly 1?
Then every geometric factor is 1 and the series becomes an ordinary arithmetic sum. The usual closed formula does not apply in that case, so the calculator handles it separately and still returns the correct total.
Does it compute the sum of an infinite series?
No. It adds a finite number of terms, the count you enter, using a closed formula. It does not work out the limit that an infinite series might approach as the number of terms keeps growing.
Can I choose how many decimals the result has?
Yes. If you ask for a number of decimals, the sum is rounded once, at the very end, with halves rounded up. Without that choice you get the full computed value, as in the 3.5625 of the example.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/arithmetico-geometric-series \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":1,"diff":1,"r":0.5,"n":5}'const res = await fetch("https://api.kit.forhosting.com/math/arithmetico-geometric-series", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 1,
"diff": 1,
"r": 0.5,
"n": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/arithmetico-geometric-series",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 1,
"diff": 1,
"r": 0.5,
"n": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/arithmetico-geometric-series", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":1,"diff":1,"r":0.5,"n":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":1,"diff":1,"r":0.5,"n":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/arithmetico-geometric-series", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 1,
"diff": 1,
"r": 0.5,
"n": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.arithmetico_geometric_series",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
How it works
Finite sum Σ(a+(k)d)r^k closed form. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. Standard AG series formula for |r|≠1 and r=1 case. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
Inputs, limits and rounding
Optional decimals use half-up once. Outputs echo inputs. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. Provide required JSON fields. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
When to use it
Use when search intent matches. Finite sum Σ(a+(k)d)r^k closed form. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS, automation, or teaching demos.
Integration use cases
Quick check
Free widget.
Automation
Same JSON via API.
Technical questions
Free?
Yes tier A.
Network?
No.
Bad input?
invalid_input.
API?
Yes.
Locales?
EN-only; Nitro hydrates.