Summation Calculator
Type the expression, name the index, give it a lower bound, an upper bound and a step, and this adds the terms up. The number of terms, the first term and the last term sit next to the total, so a bound that is off by one is something you can see rather than something you find out later. The method is named as well: an arithmetic sequence is closed-form summed as n(first + last)/2, whole-number terms are added in exact integer arithmetic, and everything else uses a compensated running total that keeps a long float sum from drifting. Up to 5,000 terms it sums as you type, and a longer range, up to the cap of 100,000 terms, waits for one press and can be cancelled while it runs. It works in your browser, with no account and nothing uploaded.
1 + 2 + 3 + 4 + 5 + 6 + ... + 100
Arithmetic sequence, so the closed form n(first + last)/2 gives it in one step: 100 × (1 + 100) / 2. The terms are whole numbers, so the total is exact.
Write powers with ^, multiply with * or by writing 2i, and use brackets freely. Functions: abs, acos, asin, atan, cbrt, ceil, comb, cos, cosh, exp, fact, floor, ln, log, log10, log2, max, min, mod, pow, round, sign, sin, sinh, sqrt, tan, tanh, plus the constants pi and e. Here log is base 10 and ln is natural.
Common questions
- How do I write a summation here?
- Read the sigma notation onto the four fields. What follows the sigma goes in Expression, the letter under it goes in Index, and the two bounds go in From and To. Step is 1 unless you are skipping values. Powers use ^, so i^2 from 1 to 10 gives 385, and multiplication can be written 2*i or just 2i. Brackets work as you expect, pi and e are available, and the named functions are abs, acos, asin, atan, cbrt, ceil, comb, cos, cosh, exp, fact, floor, ln, log, log10, log2, max, min, mod, pow, round, sign, sin, sinh, sqrt, tan and tanh. Here log is base 10 and ln is natural. A factorial can be written i! or fact(i), and comb(10, i) is the binomial coefficient, so summing comb(10, i) from 0 to 10 gives 1,024.
- What is the sum of the numbers from 1 to 100?
- 5,050. That is the opening sum on the page: i from 1 to 100 with a step of 1. Because the terms rise by the same amount every time, the page uses the closed form rather than adding one hundred numbers, and it prints the working next to the answer: 100 × (1 + 100) / 2. The same shortcut covers any arithmetic sequence you type, so 2*i - 1 from 1 to 10 comes back as 100 with 10 × (1 + 19) / 2 beside it.
- Can it sum an infinite series?
- No, and it does not pretend to. It adds a finite number of terms between the bounds you give, and an upper bound of inf or infinity is refused rather than guessed at. What it will do is a partial sum, which is often what the question really is: 1/i^2 from 1 to 1,000 comes back as 1.64393456668 after 1,000 terms. That figure is the total of the terms it added, and the page makes no claim about what the series does past them.
- Why does my sum say the range is empty?
- Because a positive step can never walk from the lower bound down to a smaller upper bound, so there are no terms at all. That is a result rather than an error: the page reports an empty range and a sum of 0, and says which way the index was trying to go. If you meant to count down, set the step to -1. From 5 to 1 with a step of -1 is 5 + 4 + 3 + 2 + 1, which is 15.
- Is the answer exact?
- For whole-number terms, yes, and past the point where an ordinary calculator stops being exact. The cubes from 1 to 100,000 come to 25,000,500,002,500,000,000 here; a plain floating-point loop over the same terms returns 25,000,500,002,500,145,000, which is 145,000 adrift. When the terms are not whole numbers the total is a compensated running sum, which keeps the rounding of each addition from building up over tens of thousands of terms, and it is shown to twelve significant digits. The line under the readout always says which of the three methods produced the number you are looking at.
- How many terms will it add?
- Up to 100,000 in one sum. Up to 5,000 terms the total updates as you type; past that the stage shows the term count and waits for you to press Sum, and a Cancel button stops a long run while it is going. Ask for more than 100,000 terms and it says how many the range needs rather than quietly summing part of it. The step is how you cover a wider range: i from 1 to 1,000,000 in steps of 10 is 100,000 terms and runs, though it adds only the values the step lands on, which is a different sum from every whole number in that range.
- Does it show the terms it added?
- Yes, under the readout. Eight terms or fewer are printed in full, so 1 + 3 + 5 + 7 + 9 is there to check; a longer sum prints the first six and the last one, so i^2 from 1 to 10 reads 1 + 4 + 9 + 16 + 25 + 36 + ... + 100. The first and last terms also have their own cells in the readout, which is the quickest way to catch a bound that is one out.
Exact for integer terms, and a compensated running sum keeps a long float sum from drifting. It evaluates a finite number of terms, capped at 100,000 with a cancel button, and the closed form is used where the sequence is arithmetic. It makes no claim about whether an infinite series converges.