Integers are whole numbers without fractional or decimal components. If a math problem requires you to sum a certain number of integers from 1 to a given value N, it's not necessary to add each and every value by hand. Instead, use the equation (N(N + 1))/2, where N is the highest number in your series, to save time, effort, and sanity.

Ad

Steps

1

Define the largest integer to be summed as N. Summing integers from 1 to any given number N requires you to define N as a positive integer itself. As a reminder, integers are whole numbers, so N cannot be a decimal or fraction. N also cannot be negative.

As an example, let's say we want to sum up all the integers from 1 to 100. In this case, we'll use 100 as our value for N because it's the final number in our series, or, in other words, the biggest number to be summed.

Ad

2

Multiply N by (N+1) and divide by 2. When you've defined the integer value of N, plug it into the equation (N(N + 1))/2. This equation finds the sum of all the integers between 1 and N.

Solve for your answer. The final value you obtain from this equation represents the sum of all the numbers between 1 and your value for N.

Let's solve our example problem.

(100(100 + 1))/2 =

(100(101))/2 =

(10100)/2 =

5,050. The sum of all integers from 1 to 100 is 5,050.

4

Understand how the equation (N(N + 1))/2 is derived. Let's look at our example problem one more time. Mentally split the series 1 + 2 + 3 + 4 ... + 99 + 100 into two groups - one from 1 to 50 and one from 51 to 100. If you add the first number in the first group (1) to the last number in the second group (100), you get 101. You also get 101 if you add 2 to 99, 3 to 98, 4 to 97, and so on. If we assign each number in the first group to the corresponding number in the second group in this way, we end up with 50 pairs of numbers that all add to the same thing - 101. So, 50 × 101 = 5,050, our sum for the integers from 1 - 100. Notice that 50 is half of 100 and that 101 is 100 + 1. In fact, this observation holds true for the sum of any positive integer - its component addition operations can be broken into two groups, then, the numbers in these groups can be assigned to each other in such a way that each pair adds to the same value. Note that odd integers will have one number left over - this doesn't affect the final answer.

In general terms, we can say that for any number N, the sum of the numbers from 1 to N is equal to (N/2)(N + 1). The simplified form of this equation is (N(N + 1))/2, our integer sum equation.

Using Sums from 1 to N to Find the Sum of Integers Between Two Numbers

1

Decide whether you're summing inclusively or exclusively. Often, rather than being asked to find the sum of a range of integers from 1 to a given number, you'll be asked to find the sum of a range of integers between two integers N1 and N2, where N1 > N2 and both are > 1. The process that finds this sum is relatively simple, but, before undertaking it, you must determine whether the sum is to be inclusive or exclusive - in other words, whether it includes N1 and N2 or just the integers between them, as the process changes slightly based on this distinction.

2

To find the sum of the integers between two numbers N1 and N2, find the sum for each value of N separately and subtract. Generally, all you need to do is subtract the sum of the smaller N value from the sum of the larger N value to find your answer. However, as noted above, it's important to know whether you're summing inclusively or exclusively. Inclusive summing requires you to subtract 1 from your value of N2 before plugging it into its equation, while summing exclusively requires you to subtract 1 from your value of N.1

Let's say that we're asked to inclusively find the sum of the integers between N1 = 100 and N2 = 75. In other words, we need to find 75 + 76 + 77 ... + 99 + 100. To do this, we would find the sum of the integers from 1 to N1, then subtract the sum of the integers from 1 to N2 - 1 (remember, when summing inclusively, we subtract 1 from N2), solving as follows:

(N1(N1 + 1))/2 - ((N2-1)((N2-1) + 1))/2 =

(100(100 + 1))/2 - (74(74 + 1))/2 =

5,050 - (74(75))/2 =

5,050 - 5,550/2 =

5,050 - 2,775 = 2,275. The inclusive sum of the integers between 75 and 100 is 2,275.

Now, let's try summing exclusively. Our equation is the same, except in this case we subtract 1 from N1 rather than N2:

((N1-1)((N1-1) + 1))/2 - (N2(N2 + 1))/2 =

(99(99 +1))/2 - (75(75 + 1))/2 =

(99(100))/2 - (75(76))/2 =

9,900/2 - 5,700/2 =

4,950 - 2,850 = 2,100. The exclusive sum of the integers between 75 and 100 is 2,100.

3

Understand why this process works. Think of the sum of the integers from 1 to 100 as 1 + 2 + 3 ... + 98 + 99 + 100 and the sum of the integers from 1 to 75 as 1 + 2 + 3 ... + 73 + 74 + 75. Finding the sum of the integers between 75 and 100 inclusively means finding 75 + 76 + 77 ... + 99 + 100. The sums from 1 - 75 and 1 - 100 are the same up to 75 - at that point, the sum from 1 - 75 "stops" and the sum from 1 - 100 "keeps on going", with ... 75 + 76 + 77 ... + 99 + 100. Because of this, subtracting the sum of the integers from 1 - 75 from the sum of the integers from 1 - 100 allows us to "isolate" the sum of the integers from 75 - 100.

However, if we're summing inclusively, we must use the sum of 1 - 74, rather than the sum of 1 - 75, to ensure we include the number 75 itself in our final sum.

Similarly, if we're summing exclusively, we have to use the sum of 1 - 99, rather than the sum of 1 - 100, to ensure that the number 100 isn't included in the sum. We can use the sum of 1 - 75, because subtracting this from the sum of 1 - 99 excludes the number 75 from our final sum.

Ad

We could really use your help!

Can you tell us abouttrapping large animals?

Yes

No

trapping large animals

how to catch or trap a deer

Can you tell us aboutcats?

Yes

No

cats

how to teach cats to like dogs

Can you tell us aboutdogs?

Yes

No

dogs

how to calm a dog with natural remedies

Can you tell us aboutMinecraft?

Yes

No

Minecraft

how to make a subway system in Minecraft

Thanks for helping! Please tell us everything you know about

...

Tell us everything you know here. Remember, more detail is better.

Tips

Provide Details.

Please be as detailed as possible in your explanation. Don't worry about formatting! We'll take care of it.
For example:Don't say: Eat more fats.Do say: Add fats with some nutritional value to the foods you already eat. Try olive oil, butter, avocado, and mayonnaise.

Share

Featured Articles

Meet a Community Member

Meet Chris, a wikiHowian from the US who has been on the site over 4 years and is a Featured Author and New Article Booster. He has started 855 articles and made over 53,000 contributions to wikiHow. While he's enjoyed researching and writing how-tos on all sorts of topics, his favorite article he has started is How to Listen to Free Disney Parks Music Online on Live365. He is very proud of the work he's done adding great screenshots for articles throughout the site. He enjoys sharing his knowledge with others and appreciates the loving, caring, and nurturing relationship that everyone in the community has with one another. His advice to new editors is to ask for help whenever you need it; there are plenty of friendly wikiHowians waiting to help answer your editing questions!