Sum of the first n integers calculator
Sum the consecutive integers from 1 through n with a closed-form formula. Enter n to calculate the sum and review the method.
Related calculators
These tools cover neighboring sequence questions.
How to use the Sum of the first n integers calculator
Sum the consecutive integers from 1 through n with a closed-form formula. The input is a whole-number term count or endpoint, and the method avoids adding each term individually.
Input and result
Enter n as a nonnegative whole number. The output is a dimensionless sum of integer values; there are no measurement units.
Formula
S = 1 + 2 + … + n = n(n + 1) / 2
Worked example
For n = 100, the sum is 100×101/2 = 5,050.
Assumptions and limits
This formula applies to consecutive positive integers beginning at 1. For n = 0, the sum is 0. The displayed result is rounded for readability; large integer results can exceed the exact precision available in a browser number.
Frequently asked questions
Frequently asked questions
Does n include the last number?
Yes. The calculation includes every integer from 1 to n.
What is the sum when n is zero?
Zero, because there are no terms to add.
Can this sum start at a number other than 1?
Not directly. Use an arithmetic-series formula with the desired first and last terms.
How do I use the Sum of the first n integers calculator?
Enter n as a nonnegative whole number. The output is a dimensionless sum of integer values; there are no measurement units.
What is a worked example of Sum of the first n integers?
For n = 100, the sum is 100×101/2 = 5,050.
See the calculation methodology and privacy policy.