Skip to main content

Consecutive Integers Calculator

Free Consecutive integers Calculator for arithmetic. Enter values to get step-by-step solutions with formulas and graphs.

Skip to calculator
Mathematics

Consecutive Integers Calculator

Find consecutive integers that sum to a target, generate sequences, and explore properties of consecutive integer sets including sums, products, and decompositions.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
Consecutive integers summing to 45
7, 8, 9, 10, 11
Starting at 7 with 5 terms
Sequence from 1 (5 terms)
1, 2, 3, 4, 5
Sum = 15
Sum
15
Average
3.00
Median
3
Product
120
Sum of Squares
55
Sum of Cubes
225
Range
1 to 5
Formula Verification
15 = 15

Ways to Express 45 as Consecutive Sum

2 terms starting at 2222 + 23
3 terms starting at 1414 + 15 + 16
5 terms starting at 77 + 8 + 9 + 10 + 11
6 terms starting at 55 + 6 + 7 + 8 + 9 + 10
9 terms starting at 11 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
10 terms starting at 00 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
15 terms starting at -4-4 + -3 + -2 + -1 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
18 terms starting at -6-6 + -5 + -4 + -3 + -2 + -1 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11
Your Result
Sequence from 1: [1, 2, 3, 4, 5] | Sum = 15
Share Your Result
Understand the Math

Formula

Sum = n * first + n(n-1)/2 * step

The sum of n consecutive integers (or consecutive even/odd integers) starting at the first term, with a step of 1 for consecutive or 2 for even/odd. The first term can be found from a target sum: first = (Sum - n(n-1)/2 * step) / n.

Last reviewed: December 2025

Worked Examples

Example 1: Find 5 Consecutive Integers Summing to 45

Find five consecutive integers whose sum equals 45.
Solution:
Let the integers be n, n+1, n+2, n+3, n+4. Sum = 5n + (0+1+2+3+4) = 5n + 10 = 45 5n = 35 n = 7 The integers are 7, 8, 9, 10, 11. Verification: 7 + 8 + 9 + 10 + 11 = 45. Correct. Alternative formula: first = (45 - 5*4/2) / 5 = 35/5 = 7.
Result: The five consecutive integers are 7, 8, 9, 10, 11.

Example 2: Sum of Consecutive Odd Integers

Find 4 consecutive odd integers whose sum equals 56.
Solution:
Let the integers be n, n+2, n+4, n+6 (step of 2 for odd). Sum = 4n + (0+2+4+6) = 4n + 12 = 56 4n = 44 n = 11 The integers are 11, 13, 15, 17. Verification: 11 + 13 + 15 + 17 = 56. Correct. Using the formula: first = (56 - 4*3/2 * 2) / 4 = (56 - 12) / 4 = 11.
Result: The four consecutive odd integers are 11, 13, 15, 17.
Expert Insights

Background & Theory

The Consecutive Integers Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Consecutive Integers Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

Consecutive integers are whole numbers that follow each other in order, with each number exactly 1 more than the previous one. Examples include 1, 2, 3, 4, 5 or -3, -2, -1, 0, 1. Any set of consecutive integers can be represented algebraically as n, n+1, n+2, n+3, and so on, where n is the first integer in the sequence. Consecutive integers are fundamental in number theory and appear frequently in mathematical problem-solving, especially in algebra word problems. The concept extends to consecutive even integers (like 2, 4, 6, 8) and consecutive odd integers (like 1, 3, 5, 7), where the step between terms is 2 instead of 1.
To find n consecutive integers that sum to a target S, use the formula: first integer = (S - n(n-1)/2) / n. This works because the sum of n consecutive integers starting at a is na + n(n-1)/2. Rearranging for a gives the starting integer. For example, to find 5 consecutive integers summing to 45: a = (45 - 5*4/2) / 5 = (45 - 10) / 5 = 7. So the integers are 7, 8, 9, 10, 11, and indeed 7+8+9+10+11 = 45. The solution exists as integers only when (S - n(n-1)/2) is divisible by n. Not every combination of target sum and count produces an integer solution.
The Gauss formula states that the sum of the first n positive integers is n(n+1)/2. Legend has it that young Carl Friedrich Gauss discovered this when his teacher asked the class to add numbers from 1 to 100. Gauss noticed that pairing numbers from opposite ends (1+100, 2+99, 3+98, etc.) each gives 101, and there are 50 such pairs, so the sum is 50 times 101 = 5,050. More generally, the sum of consecutive integers from a to b is (b-a+1)(a+b)/2, which equals the count of terms times the average of the first and last terms. This formula is one of the most frequently used results in mathematics and computer science.
Almost every positive integer can be written as a sum of two or more consecutive positive integers, with the sole exceptions being powers of 2. Numbers like 1, 2, 4, 8, 16, 32, and 64 cannot be expressed as sums of consecutive positive integers. This is because if n consecutive integers starting at a sum to S, then S = n(2a + n - 1)/2, which means S has an odd factor. Powers of 2 have no odd factors greater than 1. Every odd number greater than 1 can be written as a sum of two consecutive integers. For composite odd numbers, there are usually multiple ways to decompose them. The number of representations relates to the number of odd divisors of the target sum.
Consecutive integer problems are among the most common algebra word problems. The typical setup describes unknown integers with a relationship between them. For three consecutive integers, set them as x, x+1, x+2. For consecutive even or odd integers, use x, x+2, x+4. Then translate the word problem into an equation. For example, if three consecutive integers sum to 78, the equation is x + (x+1) + (x+2) = 78, giving 3x + 3 = 78, so x = 25, and the integers are 25, 26, 27. These problems teach students to translate verbal descriptions into algebraic expressions and develop systematic problem-solving skills that apply to more complex mathematical situations.
The sum of squares of the first n positive integers has a closed-form formula: n(n+1)(2n+1)/6. For example, the sum 1 squared plus 2 squared plus 3 squared plus 4 squared plus 5 squared equals 1+4+9+16+25 = 55, which matches 5(6)(11)/6 = 55. For consecutive integers from a to b, the sum of squares equals the sum from 1 to b minus the sum from 1 to a-1. This formula appears frequently in statistics (variance calculations), physics (moment of inertia), and computer science (algorithm analysis). The sum of cubes of the first n integers is [n(n+1)/2] squared, which is remarkably the square of the sum formula, a beautiful identity known as Nicomachus theorem.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Sum = n * first + n(n-1)/2 * step

The sum of n consecutive integers (or consecutive even/odd integers) starting at the first term, with a step of 1 for consecutive or 2 for even/odd. The first term can be found from a target sum: first = (Sum - n(n-1)/2 * step) / n.

Worked Examples

Example 1: Find 5 Consecutive Integers Summing to 45

Problem: Find five consecutive integers whose sum equals 45.

Solution: Let the integers be n, n+1, n+2, n+3, n+4.\nSum = 5n + (0+1+2+3+4) = 5n + 10 = 45\n5n = 35\nn = 7\nThe integers are 7, 8, 9, 10, 11.\nVerification: 7 + 8 + 9 + 10 + 11 = 45. Correct.\nAlternative formula: first = (45 - 5*4/2) / 5 = 35/5 = 7.

Result: The five consecutive integers are 7, 8, 9, 10, 11.

Example 2: Sum of Consecutive Odd Integers

Problem: Find 4 consecutive odd integers whose sum equals 56.

Solution: Let the integers be n, n+2, n+4, n+6 (step of 2 for odd).\nSum = 4n + (0+2+4+6) = 4n + 12 = 56\n4n = 44\nn = 11\nThe integers are 11, 13, 15, 17.\nVerification: 11 + 13 + 15 + 17 = 56. Correct.\nUsing the formula: first = (56 - 4*3/2 * 2) / 4 = (56 - 12) / 4 = 11.

Result: The four consecutive odd integers are 11, 13, 15, 17.

Frequently Asked Questions

What are consecutive integers?

Consecutive integers are whole numbers that follow each other in order, with each number exactly 1 more than the previous one. Examples include 1, 2, 3, 4, 5 or -3, -2, -1, 0, 1. Any set of consecutive integers can be represented algebraically as n, n+1, n+2, n+3, and so on, where n is the first integer in the sequence. Consecutive integers are fundamental in number theory and appear frequently in mathematical problem-solving, especially in algebra word problems. The concept extends to consecutive even integers (like 2, 4, 6, 8) and consecutive odd integers (like 1, 3, 5, 7), where the step between terms is 2 instead of 1.

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

To find n consecutive integers that sum to a target S, use the formula: first integer = (S - n(n-1)/2) / n. This works because the sum of n consecutive integers starting at a is na + n(n-1)/2. Rearranging for a gives the starting integer. For example, to find 5 consecutive integers summing to 45: a = (45 - 5*4/2) / 5 = (45 - 10) / 5 = 7. So the integers are 7, 8, 9, 10, 11, and indeed 7+8+9+10+11 = 45. The solution exists as integers only when (S - n(n-1)/2) is divisible by n. Not every combination of target sum and count produces an integer solution.

What is the Gauss formula for summing consecutive integers?

The Gauss formula states that the sum of the first n positive integers is n(n+1)/2. Legend has it that young Carl Friedrich Gauss discovered this when his teacher asked the class to add numbers from 1 to 100. Gauss noticed that pairing numbers from opposite ends (1+100, 2+99, 3+98, etc.) each gives 101, and there are 50 such pairs, so the sum is 50 times 101 = 5,050. More generally, the sum of consecutive integers from a to b is (b-a+1)(a+b)/2, which equals the count of terms times the average of the first and last terms. This formula is one of the most frequently used results in mathematics and computer science.

Can every positive integer be written as a sum of consecutive integers?

Almost every positive integer can be written as a sum of two or more consecutive positive integers, with the sole exceptions being powers of 2. Numbers like 1, 2, 4, 8, 16, 32, and 64 cannot be expressed as sums of consecutive positive integers. This is because if n consecutive integers starting at a sum to S, then S = n(2a + n - 1)/2, which means S has an odd factor. Powers of 2 have no odd factors greater than 1. Every odd number greater than 1 can be written as a sum of two consecutive integers. For composite odd numbers, there are usually multiple ways to decompose them. The number of representations relates to the number of odd divisors of the target sum.

How are consecutive integers used in algebra word problems?

Consecutive integer problems are among the most common algebra word problems. The typical setup describes unknown integers with a relationship between them. For three consecutive integers, set them as x, x+1, x+2. For consecutive even or odd integers, use x, x+2, x+4. Then translate the word problem into an equation. For example, if three consecutive integers sum to 78, the equation is x + (x+1) + (x+2) = 78, giving 3x + 3 = 78, so x = 25, and the integers are 25, 26, 27. These problems teach students to translate verbal descriptions into algebraic expressions and develop systematic problem-solving skills that apply to more complex mathematical situations.

What is the sum of squares of consecutive integers?

The sum of squares of the first n positive integers has a closed-form formula: n(n+1)(2n+1)/6. For example, the sum 1 squared plus 2 squared plus 3 squared plus 4 squared plus 5 squared equals 1+4+9+16+25 = 55, which matches 5(6)(11)/6 = 55. For consecutive integers from a to b, the sum of squares equals the sum from 1 to b minus the sum from 1 to a-1. This formula appears frequently in statistics (variance calculations), physics (moment of inertia), and computer science (algorithm analysis). The sum of cubes of the first n integers is [n(n+1)/2] squared, which is remarkably the square of the sum formula, a beautiful identity known as Nicomachus theorem.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy