Skip to content
Math

Consecutive Integers Calculator

Choose forward mode to list a sequence of consecutive integers starting from any integer and see its sum, product, and average, or switch to reverse-solve to find the consecutive integers whose sum or product equals a value you supply. Works for any consecutive integers, even-only, or odd-only sequences. Step-by-step workings update as you type.

Your details

Forward mode lists the sequence; reverse-solve modes find integers given a sum or product target.
Any: 5, 6, 7 ... Even: 4, 6, 8 ... Odd: 3, 5, 7 ...
The number of terms in the sequence (2 to 20).
The first integer in the sequence.
Consecutive integers
4, 5, 6

The list of consecutive integers

Sum15
Product120
Average (mean)5
Smallest integer4
Largest integer6
First integer4
Mean5
Last integer6
Sum15

The sequence of 3 consecutive integers is 4, 5, 6.

  • Their sum is 15.
  • The middle integer (5) equals the mean - a property of any odd-count sequence of consecutive integers.
  • Their product is 120.

Next stepSwitch to reverse-solve mode to find consecutive integers that add up to or multiply to a specific target.

Formula

S=nx+n(n1)2,x=Sn(n1)2n,P=x(x+1)(x+2)(x+n1)S = n \cdot x + \frac{n(n-1)}{2}, \quad x = \frac{S - \frac{n(n-1)}{2}}{n}, \quad P = x(x+1)(x+2)\cdots(x+n-1)

Worked example

Find 3 consecutive integers whose sum is 42: Let them be x, x+1, x+2. Sum = 3x + 3 = 42, so 3x = 39, x = 13. The integers are 13, 14, 15. Check: 13 + 14 + 15 = 42.

What are consecutive integers?

Consecutive integers are whole numbers that follow each other in order, each differing from the next by exactly 1 - for example 5, 6, 7 or -2, -1, 0, 1. Consecutive even integers differ by 2 and are both even (4, 6, 8), and consecutive odd integers also differ by 2 and are both odd (3, 5, 7). These patterns appear throughout algebra, number theory, and everyday word problems about ages, scores, and seat numbers.

How to find consecutive integers with a given sum

Let the n consecutive integers be x, x+1, ..., x+(n-1). Their sum is S = n*x + n*(n-1)/2. Solving for x: x = (S - n*(n-1)/2) / n. If x is an integer the problem has a whole-number solution; otherwise no solution exists. For even consecutive integers represented as 2k, 2k+2, ..., the formula becomes x = (S - n*(n-1)) / (2n). For odd consecutive integers represented as 2k+1, 2k+3, ..., use x = (S - n*n) / (2n). This calculator applies all three formulas automatically depending on which integer type you select.

How to find consecutive integers with a given product

For two consecutive integers x and x+1 with product P, set up x*(x+1) = P, expand to x^2 + x - P = 0, and solve with the quadratic formula: x = (-1 + sqrt(1 + 4P)) / 2. A negative discriminant means no real solution; a non-integer result means no whole-number solution. For two consecutive even integers 2k and 2k+2: 4k^2 + 4k = P. For three or more terms the product equation becomes a polynomial of degree n that is generally solved by testing integer candidates near the nth root of the target. This calculator handles all of these cases automatically.

Useful properties of consecutive integer sequences

A sequence of n consecutive integers always has n unique residues modulo n (every remainder 0 through n-1 appears exactly once), so their product is always divisible by n factorial (n!). The average of any odd-count sequence of consecutive integers equals the middle term exactly. The sum of an odd-count sequence of consecutive integers is always divisible by n - a fact widely used in divisibility and competition problems. These properties make consecutive integers central to number theory proofs and combinatorics.

Quick reference - consecutive integers formulas

TypeSequence termsSum formulaAverage
Anyx, x+1, x+2, ...n*x + n*(n-1)/2x + (n-1)/2
Even2k, 2k+2, 2k+4, ...2n*k + n*(n-1)2k + (n-1)
Odd2k+1, 2k+3, 2k+5, ...2n*k + n^22k + n

Formulas for n consecutive integers starting at x (step = 1 for any, 2 for even/odd).

Frequently asked questions

What are consecutive integers?

Consecutive integers are whole numbers in order, each one exactly 1 greater than the previous one, for example 7, 8, 9. Consecutive even integers step by 2 and are both even (10, 12, 14); consecutive odd integers also step by 2 and are both odd (9, 11, 13).

How do you find consecutive integers that add up to a given sum?

Let the n consecutive integers start at x. Their sum is n*x + n*(n-1)/2 = S. Solving gives x = (S - n*(n-1)/2) / n. If x is an integer the sequence exists; if it is not, there is no whole-number solution for that combination of n and S.

Can three consecutive integers have an odd sum?

Yes. Three consecutive integers always have a sum equal to 3 times the middle integer, which can be any multiple of 3 - odd or even. For example 4 + 5 + 6 = 15 (odd) and 3 + 4 + 5 = 12 (even).

What is the product of two consecutive integers?

The product of two consecutive integers x and x+1 is always even because one of any two consecutive integers must be even. It equals x^2 + x, and can be found by solving the quadratic x^2 + x - P = 0 when working backwards from a known product P.

Is there always a solution when reverse-solving by product?

No. Not every integer can be expressed as the product of two or more consecutive integers. For example, 7 is prime and cannot be written as a product of two consecutive integers. When no integer solution exists this calculator displays "No integer solution exists."

Why do consecutive even and odd integers differ by 2?

Consecutive even integers are every other integer on the even integers (0, 2, 4, ...), so the gap is 2. The same applies to consecutive odd integers (1, 3, 5, ...). They are not consecutive integers in the strict sense (those differ by 1), but they are consecutive within the subset of even or odd numbers.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…