The sum to n formula gives the total of the first n terms of a sequence. For an arithmetic sequence, it is Sn = n/2 × [2a + (n−1)d]; for a geometric sequence, it is Sn = a(1−rn)/(1−r). You enter the first term, the common difference or ratio, and the number of terms, and the calculator returns the cumulative total.
Formula
Two main formulas cover most sum-to-n problems. The arithmetic series sums a sequence where each term increases by a constant amount d:
Sn = n/2 × [2a + (n−1)d]
- Sn = sum of the first n terms (no unit, same as the terms)
- a = first term (any real number)
- d = common difference (any real number)
- n = number of terms (positive integer)
The geometric series sums a sequence where each term is multiplied by a constant ratio r:
Sn = a(1 − rn) / (1 − r) for r ≠ 1
- a = first term
- r = common ratio (r ≠ 1)
- n = number of terms
When r = 1, the geometric sum simplifies to Sn = n × a. The calculator above uses the arithmetic formula for the headline result and shows the geometric sum for the same inputs as a secondary output (using r = 3 as a placeholder – replace it with your actual ratio in your own calculation).
Worked Example
Using the default values: a = 2, d = 3, n = 5.
Arithmetic sum:
S5 = 5/2 × [2×2 + (5−1)×3] = 2.5 × [4 + 12] = 2.5 × 16 = 40
Geometric sum (with r = 3):
S5 = 2 × (1 − 35) / (1 − 3) = 2 × (1 − 243) / (−2) = 2 × (−242) / (−2) = 242
The calculator shows 40 for the arithmetic sum and 242 for the geometric sum (with the placeholder ratio). The arithmetic result matches the step-by-step calculation exactly.
Assumptions
- n is a positive integer (you cannot sum a fractional number of terms).
- For the geometric formula, r ≠ 1. If r = 1, use Sn = n × a.
- The sequence is infinite in definition but you only sum the first n terms.
- Terms are real numbers; no rounding is applied in the formula itself.
When to Use Which Formula
Identify the type of sequence first. An arithmetic sequence has a constant difference between consecutive terms: 2, 5, 8, 11, … (add 3 each time). A geometric sequence has a constant ratio: 2, 6, 18, 54, … (multiply by 3 each time).
Use the arithmetic sum when you are adding up things that change by a fixed amount – for example, total seats in an auditorium with rows increasing by 2 seats, or cumulative savings if you add the same amount each month. Use the geometric sum when the change is multiplicative – for example, total bacteria after n generations if each divides into two, or the total distance a bouncing ball travels if each bounce reaches half the previous height.
If the problem gives you the last term l instead of the common difference, use the equivalent arithmetic form: Sn = n/2 × (a + l). This is just the average of first and last terms times the count.
Common Mistakes
- Mixing up d and r: Adding vs. multiplying. Check whether you subtract consecutive terms (arithmetic) or divide them (geometric).
- Using n−1 vs. n: The nth term is a + (n−1)d, but the sum uses n/2 and (n−1) inside the bracket. The number of gaps between n terms is n−1.
- Forgetting the 1−r denominator sign: If r > 1, the formula still works, but the numerator and denominator are both negative, giving a positive sum. Do not flip signs arbitrarily.
- Rounding intermediate steps: Keep full precision until the final answer. Rounding d or a early can shift the sum noticeably for large n.
- Assuming r = 1 is handled: The geometric formula divides by zero. If r = 1, the sum is simply n × a. This is a common exam trap.
Infinite Series and Convergence
The sum to n formula is finite. But if you let n grow without bound, you get an infinite series. For arithmetic series, the infinite sum diverges (goes to ±∞) unless a = 0 and d = 0. For geometric series, the infinite sum converges only when |r| < 1, and the limit is S∞ = a / (1 − r). This is used in finance for present value of perpetuities, in physics for summing reflected light intensities, and in probability for geometric distributions.
For example, 1 + 1/2 + 1/4 + 1/8 + … = 2. The finite formula with a = 1, r = 0.5, n = 10 gives S10 = 1(1−0.510)/(1−0.5) = 1.998. As n increases, it approaches 2 but never exceeds it. This distinction between finite and infinite sums is a common source of confusion – the finite formula always works, but the infinite limit only exists under the convergence condition.
Real-World Applications
Arithmetic sums appear in:
- Salary calculations with annual fixed raises
- Total distance traveled when speed increases by a constant amount each second
- Stacking objects in rows with one more each level (e.g., a pyramid of cans)
Geometric sums appear in:
- Compound interest: total value after n periods with a fixed interest rate
- Radioactive decay: total remaining after n half-lives (though this is usually modeled continuously)
- Depreciation with a constant percentage loss each year
- Signal processing and digital filters
In chemistry, geometric sums can model the total amount of a reagent after repeated dilutions where each step removes a fixed fraction. Arithmetic sums appear in titration calculations when adding equal volumes of titrant and summing the total added.
Frequently Asked Questions
What is the difference between a sequence and a series?
A sequence is an ordered list of numbers (2, 5, 8, 11). A series is the sum of those numbers (2 + 5 + 8 + 11 = 26). The sum to n formula gives the series total for the first n terms of a sequence.
Can n be zero or negative?
No. The sum of zero terms is 0 by convention, but the formula with n = 0 gives 0 for arithmetic (0/2 × anything = 0) and 0 for geometric (a(1−1)/(1−r) = 0). Negative n has no physical meaning – you cannot sum −3 terms. The calculator enforces n ≥ 1.
What if the common difference or ratio is negative?
That is fine. An arithmetic sequence with d = −2 goes 10, 8, 6, … and the sum can decrease or even become negative. A geometric sequence with r = −2 alternates sign: 1, −2, 4, −8, … The formulas handle negative values correctly; just be careful with signs when computing rn for even and odd n.
How do I find n if I know the sum?
Rearrange the formula. For arithmetic, solve the quadratic n/2 × [2a + (n−1)d] = S. For geometric, solve a(1−rn)/(1−r) = S, which gives rn = 1 − S(1−r)/a, then take the logarithm: n = ln(1 − S(1−r)/a) / ln(r). This only works if the argument of the log is positive and r > 0.
Why does the geometric formula have (1−rn) and not (rn−1)?
Both are algebraically equivalent if you also flip the denominator: a(rn−1)/(r−1) gives the same result. The (1−rn)/(1−r) form is conventional because it works cleanly for |r| < 1 and avoids sign confusion when r is between 0 and 1.
Is the sum to n the same as the nth term?
No. The nth term is the single value at position n (a + (n−1)d for arithmetic, arn−1 for geometric). The sum to n is the total of all terms from position 1 through n. For example, in 2, 5, 8, the 3rd term is 8, but the sum to 3 is 2+5+8 = 15.
Limits and Extensions
The formulas assume the sequence is perfectly arithmetic or geometric for all n. Real-world data rarely follows a single pattern forever – growth rates change, interest compounds differently, or measurement errors exist. The sum to n formula gives the exact total only for a perfect mathematical sequence. For real data, you might need regression to find the best-fit d or r, and then the sum is an approximation.
Also note that the geometric formula requires r ≠ 1. If r is very close to 1 (like 1.001), the formula works but can suffer from catastrophic cancellation in floating-point arithmetic because 1−rn and 1−r are both tiny. In such cases, use the alternative form Sn = a(rn−1)/(r−1) or a series expansion for better numerical stability.
For sequences that are neither arithmetic nor geometric, you may need other methods: telescoping sums, integral approximation, or specialized formulas for polynomial sequences (e.g., sum of squares: n(n+1)(2n+1)/6). The sum to n formula here only covers the two most common types, which appear in most introductory algebra and precalculus courses.
Related
Formula used
in a | First term a | - | 2 | -999999 in d | Common difference d | - | 3 | -999999 in n | Number of terms n | - | 5 | 1 out s_arith | Arithmetic sum S_n | - | n/2 * (2*a + (n-1)*d) | 4 out s_geom | Geometric sum S_n (r≠1) | - | a * (1 - 3^n) / (1 - 3) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- NOAA Magnetic Declination Calculator: Use & Accuracy0.00 °
- Enthalpy of Vaporization of Water Equation41.508 kJ/mol
- Enthalpy of Reaction: Definition & Calculation
- Enthalpy Reaction: Meaning & Calculation
- NOAA Magnetic Field Calculator: How to Use It
- Enthalpy of Vaporization Table & How to Use It40.650 kJ