Consecutive Integer Sum Calculator
Sum all whole numbers from a start to an end.
Results update as you type.
How it works
Adding up a run of consecutive whole numbers, such as every integer from 1 to 100, is a classic arithmetic task with a famously elegant shortcut. Rather than adding each number one by one, you can use a closed-form formula that gives the total instantly. This consecutive integer sum calculator takes a start number and an end number, both integers, and returns the sum of every integer in that inclusive range along with how many numbers there are. It works by using the well-known result that the sum of all integers from 1 to any value n is n times n plus one, divided by two. To sum a range that does not begin at 1, the calculator computes the total up to the end value and subtracts the total up to just before the start, leaving exactly the numbers in between. For the range 1 to 10, the sum is 55 and the count is 10. The famous story attributes this trick to the young mathematician Gauss, who summed 1 to 100 in seconds by pairing numbers from both ends. Students, programmers, and puzzle-solvers use a consecutive integer sum calculator to total any range of whole numbers without tedious addition, provided the start is not greater than the end.
sum = [end × (end + 1) ÷ 2] − [(start − 1) × start ÷ 2]; count = end − start + 1
The sum of all integers from one up to any number n equals n times n plus one divided by two, a formula credited to Gauss. To sum a range that starts higher than one, you take the running total up to the end value and subtract the running total up to just before the start value. The difference leaves exactly the integers inside the range, and the count is simply the end minus the start plus one.
Source:Standard mathematics
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter start number and end number.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Sum updates instantly as you type — no button to press.
Frequently asked questions
How do you sum consecutive integers quickly?
Use the pairing shortcut: the sum of integers from 1 to n is n times n plus one, all divided by two. For a range that starts above 1, find the total up to the end and subtract the total up to just before the start. This avoids adding every number individually. For 1 to 10, the sum is 10 times 11 divided by 2, which is 55, computed instantly.
Why must the start and end be integers?
This calculator sums whole numbers, so both the start and the end must be integers for the range to be well defined. The formula counts and adds each whole number from the start to the end inclusive, which only makes sense for integers. If you enter a decimal, the calculator returns no result. To add a sequence of decimals with a fixed step, an arithmetic series calculator is the right tool.
What does the count tell me?
The count is how many integers lie in the range from the start to the end, inclusive of both endpoints. It equals the end minus the start plus one. For the range 1 to 10 the count is 10, and for 5 to 8 it is four. The plus one matters because both the first and last numbers are included, so a simple subtraction would undercount by one.
Can the numbers be negative?
Yes. The formula works for negative integers too, as long as the start is not greater than the end. For example, the sum from negative 3 to 3 is zero, because the negative and positive terms cancel, and the count is seven. The calculator handles ranges that cross zero or sit entirely below it, using the same subtraction of running totals to get the correct sum.
What happens if the start is greater than the end?
The range would be empty or run backwards, which the formula does not define here, so the calculator returns no result when the start exceeds the end. To sum a descending list, simply enter the smaller number as the start and the larger as the end, since addition gives the same total regardless of direction. Keeping the start less than or equal to the end ensures a valid answer.