Consecutive Integers Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter the sum, how many consecutive numbers you want and whether they go up by 1 or by 2 (even or odd numbers).
Result
First (smallest) number
Last (largest) number
- Is there a whole-number answer?
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Sum of the numbers: enter a number.
- How many consecutive numbers: enter 1 or more.
- Kind: choose Consecutive integers (step 1) or Consecutive even or odd integers (step 2).
- Read the result: First (smallest) number; the panel also shows Last (largest) number and Is there a whole-number answer?.
How this calculator works
n consecutive numbers that start at x and go up by a step d are x, x + d, …, x + (n − 1)d. Their sum is an arithmetic series: S = n·x + d·n(n − 1) ÷ 2. Solving for x gives x = (S − d·n(n − 1) ÷ 2) ÷ n, and the last number is x + (n − 1)d.
A whole-number answer exists only when x is an integer. With step 2, x even gives consecutive even integers and x odd gives consecutive odd integers.
The formula
| Symbol | Meaning |
|---|---|
| Sum of the numbers | |
| How many consecutive numbers | |
| Kind | |
| First (smallest) number |
Worked example
| Sum of the numbers | 72 |
|---|---|
| How many consecutive numbers | 3 |
| Kind | Consecutive integers (step 1) |
| Last (largest) number | 25 |
|---|---|
| Is there a whole-number answer? | Yes |
First (smallest) number 23
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
Which three consecutive integers add up to 72?
23, 24 and 25: x = (72 − 3) ÷ 3 = 23.
Which four consecutive odd integers add up to 72?
15, 17, 19 and 21: x = (72 − 2 × 6) ÷ 4 = 15.