ForHosting KIT · Math

Arithmetic series sum calculator

The numbers from 1 to 10 add up to 55, and the even numbers from 2 to 20 add up to 110. Enter the first term, the last term and how many terms there are, and get the total without adding them one by one. 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
A1
1
Last
10
N
10
You get
Sum
55
Common difference
1

An arithmetic series is the running total of an arithmetic sequence—numbers that grow by a constant common difference, such as one through ten or two, five, eight, eleven. Instead of adding every term by hand, the closed formula multiplies the number of terms n by the sum of the first term a1 and the last term an, then divides by two. This capability evaluates that formula deterministically: send a1, an, and n, and receive the sum, the formula string, and the implied common difference.

What an arithmetic series is and how the sum formula works

An arithmetic sequence is defined by a first term a1 and a constant common difference d, so the k-th term is a1 plus k minus one times d. The partial sum of the first n terms is the arithmetic series. Pairing the first term with the last, the second with the second-to-last, and so on yields n over two pairs that each total a1 plus an, which is exactly why the closed product formula reads n times a1 plus an, all over two.

Classic classroom examples include the sum of the first ten positive integers: a1 equals one, an equals ten, n equals ten, and the sum is fifty-five. Even numbers from two to twenty give a1 equals two, an equals twenty, n equals ten, and sum one hundred ten. Because the formula never iterates term by term, it is stable for large n within the published limits and does not depend on wall-clock time or random seeds.

When you only know the first term, the common difference, and n, first compute an equals a1 plus n minus one times d, then call this capability; the response also echoes the common difference recovered from a1, an, and n so you can double-check consistency by hand.

Practical tips, limits, and related searches

When teaching, prefer paired examples: one through ten yields fifty-five; two through twenty in steps of two yields one hundred ten; and n equals zero demonstrates the hard rejection path. Because the formula is symmetric in a1 and an, swapping first and last with the same n leaves the sum unchanged and only flips the sign of the common difference—useful for grading sign-of-d mistakes.

Sibling number-theory and figurate landings in this kit target other intents such as triangular numbers or divisor sums; this page is specifically for people searching for an arithmetic series sum calculator or the n times a1 plus an over two shortcut. Prefer sending a1, an, and n over inventing a mode that expands every term: one closed-form contract covers classroom sums and large-n checks without shipping huge arrays.

Programming contest and interview prep validators

Assert candidate solutions for classic arithmetic-series problems without reimplementing n(a1+an)/2 in every language harness.

Finance and ops: level totals over fixed periods

Sum evenly spaced installment amounts or inclusive integer ranges in pipelines where a closed form is safer than looping every row.

What is the formula for the sum of an arithmetic series?

S = n × (a1 + an) / 2, where a1 is the first term, an is the last term, and n is the number of terms (n ≥ 1).

What if I know a1, the common difference d, and n instead of an?

First compute an = a1 + (n − 1) × d, then call this calculator with a1, an, and n. The response also returns the recovered common difference for a consistency check.

Why is n below 1 rejected?

A series sum needs at least one term.

Are decimals allowed for a1 and an?

Yes. a1 and an may be any finite numbers. n must be a whole integer from 1 to 100,000,000.

Is the arithmetic series sum calculator free?

The browser tool is free and runs locally.

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/arithmetic-series-sum

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/arithmetic-series-sum \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a1":1,"an":10,"n":10}'
{
  "a1": 1,
  "an": 10,
  "n": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.arithmetic_series_sum",
  "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, teachers, finance analysts tallying level payment schedules, and engineers checking inclusive ranges get the same pure function in the free browser tool and the prepaid API, with no computer-algebra system, no floating-point sampling loops, and a hard invalid_input when the term count falls below one.

How to call the API and what comes back

Use it from homework pipelines, programming-contest validators, spreadsheet enrichment jobs, level-payment finance checks, or any workflow that needs a reproducible series sum without installing specialized math packages on every machine. Send a JSON body with three required fields. Field a1 is a finite number—the first term—with aliases first and first_term. Field an is a finite number—the last or n-th term—with aliases last and last_term. Field n is a whole integer from one through one hundred million—the number of terms—with aliases terms and count. On success the response includes a1, an, and n as coerced numbers, sum equal to n times a1 plus an over two, formula equal to the string n times open-paren a1 plus an close-paren over two, and common_difference equal to zero when n is one or an minus a1 over n minus one otherwise. Failed validation—missing any required field, a non-number for a1 or an, a non-integer or fraction for n, n above the published maximum, or n below one—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.

Practical tips, limits, and related searches

Keep n inside the published safe-integer range so interactive Worker and browser paths stay exact for ordinary teaching and business sizes. Do not treat the sum alone as a black box—pair it with common_difference and the echoed inputs when checking student work so wrong last-term formulas are easy to diagnose. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when users type bad term counts while learning the contract.

Homework: sum 1..n and other arithmetic ranges

Give students first term, last term, and count; check their hand-computed series total against a deterministic API or free browser result.

Read the full KIT documentation →