What is this calculator?
The Sum of First n Natural Numbers Calculator adds together every whole number from 1 up to a value you choose, n. Instead of typing 1 + 2 + 3 + ... by hand, it uses the famous closed-form formula \(S = n(n+1)/2\) to return the answer instantly, no matter how large n is.
How to use it
Enter the number of terms, n (for example 100 to add 1 through 100), then read the result. The calculator also reports how many terms were summed and the average value of those terms, which equals \((n+1)/2\).
The formula explained
The sum of an arithmetic series with first term 1, last term n, and n terms is the number of terms multiplied by the average of the first and last term: $$S = n \times (1 + n) / 2.$$ This simplifies to \(n(n+1)/2\). The trick — pairing the first and last terms, second and second-to-last, and so on — is often credited to a young Carl Friedrich Gauss.
Worked example
For n = 100: $$S = 100 \times (100 + 1) / 2 = 100 \times 101 / 2 = 10100 / 2 = 5050.$$ The average term is \((100 + 1) / 2 = 50.5\).
FAQ
Does this include 0? No. Natural numbers here start at 1, so the sum covers 1 through n.
Can n be a decimal? The formula works for any number, but a true count of natural numbers should be a positive whole number.
Why use the formula instead of adding? The formula runs in a single step even for n in the billions, while adding one at a time would take far longer.