Consecutive Integers Calculator - Sequences, Sums & Analysis

Generate consecutive integer sequences, find a sequence with a given target sum, or analyse an existing list. Returns the sequence, sum, average, and count.

Pick a mode, enter the inputs, and the calculator returns the consecutive integer sequence together with its sum, average, and count.

Consecutive Integers Calculator - Sequences, Sums & Analysis
Generate consecutive integer sequences, find a sequence with a given target sum, or analyse an existing list. Returns the sequence, sum, average, and count.

About the consecutive integers calculator

Consecutive integers are whole numbers that follow one after another with no gaps — for example 7, 8, 9, 10. They appear in countless word problems in algebra, in identities of number theory (the sum of the first n positive integers, Gauss's famous schoolboy formula), in combinatorics (choosing k consecutive items from a row), and in everyday situations such as scheduling, page numbering, and labelling. This calculator supports three closely related problems that cover almost every practical question you might ask about a run of consecutive integers. The Generate mode takes a starting integer s and a count n and returns the sequence s, s+1, …, s+n−1, together with its sum and average. The sum follows directly from the arithmetic-series formula: sum = n·(2s + n − 1) / 2. The average is simply s + (n − 1)/2, which is also the midpoint of the sequence. Use this mode when you know where you want to start and how many terms you need. The Find by Target Sum mode reverses the question. Given a target sum T and a count n, the starting integer is s = T/n − (n − 1)/2, which is the average of the sequence shifted back to the first term. The sequence exists with integer terms if and only if s is itself a whole number; this happens exactly when 2T is divisible by n and T/n − (n − 1)/2 is an integer. Use this mode when you have a target — for instance, you want three consecutive integers that add up to 33 — and you need to find the sequence that produces it. The Analyze mode accepts a comma- or space-separated list of integers and checks whether they form a consecutive sequence. It does so by sorting them, computing successive differences, and confirming that every difference equals 1. It also reports the sum, the average, and the count, regardless of whether the sequence is consecutive. Use this mode to validate data, to check a student's answer, or to summarise a list of numbers that you suspect are sequential. A few subtleties are worth noting. Consecutive integers are not the same as consecutive even or consecutive odd integers, which step by two instead of one. The sum of n consecutive integers starting from s is always equal to n times the middle term (or the average of the two middle terms when n is even); this gives an elegant manual shortcut that avoids the full formula. Finally, although the calculator allows negative starting values, every property above still holds without modification, since the arithmetic-series identities are symmetric under sign changes.

Worked examples

Three quick scenarios covering each mode of the calculator.

InputResultNotes
Generate: start = 5, count = 45, 6, 7, 8 (sum 26, average 6.5)Use the arithmetic series formula: sum = 4·(2·5 + 4 − 1)/2 = 4·13/2 = 26. The middle of the sequence is 6.5.
Find by sum: target = 33, count = 310, 11, 12 (start 10)Solve s = 33/3 − (3 − 1)/2 = 11 − 1 = 10. The three integers 10, 11, 12 indeed sum to 33.
Analyze: 4, 5, 6, 7, 8Consecutive (sum 30, average 6, count 5)Successive differences are all 1, so the input is a run of five consecutive integers starting at 4.
Find by sum: target = 22, count = 44, 5, 6, 7 (start 4, sum 22)Solve s = 22/4 − (4 − 1)/2 = 5.5 − 1.5 = 4. The four integers 4, 5, 6, 7 sum to 22. A no-solution result occurs only when s is not a whole number.

How to use the consecutive integers calculator

  1. Choose a mode: Generate Sequence, Find by Target Sum, or Analyze Sequence.
  2. Fill in the inputs that the chosen mode requires: starting integer and count, target sum and count, or a list of integers separated by commas or spaces.
  3. Click Calculate. The result panel shows the sequence (when applicable) along with the sum, average, and count.
  4. Switch modes at any time to ask a related question — for example, generate a sequence and then analyse a modified version of it.
  5. Click Reset to clear all inputs and start fresh.

Consecutive integers FAQ

What are consecutive integers?
Consecutive integers are whole numbers that follow each other in order with a difference of one between each pair. Examples include 3, 4, 5 and −2, −1, 0. They differ from consecutive even or consecutive odd integers, which step by two.
How do I find the sum of n consecutive integers starting from s?
Use the arithmetic series formula sum = n·(2s + n − 1) / 2. Equivalently, the sum equals n times the average of the sequence, which is s + (n − 1)/2.
How do I find the starting integer from a target sum?
Rearrange the sum formula to s = T/n − (n − 1)/2, where T is the target sum and n is the number of terms. The sequence exists in integers only when s comes out to a whole number.
Why does Find by Target Sum sometimes report no solution?
A run of n consecutive integers with sum T exists only when T/n − (n − 1)/2 is itself an integer. If it is not, no consecutive sequence of that length produces the requested sum, and the calculator reports no solution.
Does the calculator work with negative integers?
Yes. Negative integers and zero are perfectly valid starting values, and the same formulas for sum and average apply unchanged. For example, the sequence −3, −2, −1, 0, 1 sums to −5.
How does the Analyze mode parse input?
It splits the input on commas and whitespace, discards empty entries, and parses each remaining token as an integer. The list is then sorted and checked for a constant difference of one between consecutive elements.