Sum of Consecutive Numbers Calculator

Enter the starting and ending numbers to quickly calculate the sum of consecutive numbers (integers, odd numbers, or even numbers) in the range.

Calculate the Sum of Consecutive Numbers

Result

How to Calculate the Sum of Consecutive Numbers?

In daily life, there are times when we need to calculate the sum of a series of consecutive numbers, whether they are integers, odd numbers, or even numbers. While it's possible to add them manually one by one, using mathematical formulas can make the calculation faster and more accurate. Below are detailed explanations for each case.

1. Sum of Consecutive Integers

Formula

For consecutive integers from the starting number \( a \) to the ending number \( b \), the sum can be calculated using the following formula:

\( S = \frac{(b - a + 1) \times (a + b)}{2} \)

This formula is derived from the arithmetic series sum formula, which quickly computes the sum of all integers in the range.

For example: Calculate the sum of consecutive integers from 1 to 100.

Solution:

\( S = \frac{(b - a + 1) \times (a + b)}{2} = \frac{(100 - 1 + 1) \times (1 + 100)}{2} = \frac{100 \times 101}{2} = 5050 \)

2. Sum of Consecutive Odd Numbers

Formula

For all odd numbers from the starting odd number \( a \) to the ending odd number \( b \), the sum can be calculated using the following formula:

\( S = \frac{n \times (a + b)}{2} \)

where \( n \) is the number of odd numbers in the range, calculated as \( n = \frac{(b - a)}{2} + 1 \).

Example: Calculate the sum of consecutive odd numbers from 1 to 19.

Solution:

First, calculate the number of odd numbers:

\( n = \frac{(b - a)}{2} + 1 = \frac{(19 - 1)}{2} + 1 = 10 \)

Then, calculate the sum:

\( S = \frac{n \times (a + b)}{2} = \frac{10 \times (1 + 19)}{2} = \frac{10 \times 20}{2} = 100 \)

Verification:

The consecutive odd numbers from 1 to 19 are: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19. Their sum is:

\( S = 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 + 19 = 100 \).

Therefore, the sum of odd numbers from 1 to 19 is 100.

3. Sum of Consecutive Even Numbers

Formula

For all even numbers from the starting even number \( a \) to the ending even number \( b \), the sum can be calculated using a similar formula:

\( S = \frac{n \times (a + b)}{2} \)

where \( n \) is the number of even numbers in the range, calculated as \( n = \frac{(b - a)}{2} + 1 \).

For example: Calculate the sum of consecutive even numbers from 2 to 10.

Solution:

First, calculate the number of even numbers:

\( n = \frac{(b - a)}{2} + 1 = \frac{(10 - 2)}{2} + 1 = 5 \)

Then, calculate the sum:

\( S = \frac{5 \times (2 + 10)}{2} = \frac{5 \times 12}{2} = 30 \)

Verification:

The consecutive even numbers from 2 to 10 are: 2, 4, 6, 8, 10. Their sum is:

\( S = 2 + 4 + 6 + 8 + 10 = 30 \)