Home · Everyday · Sequences & Series · Consecutive Integers Calculator

Consecutive Integers Calculator

Find the run of consecutive integers (or just even, or just odd) that adds to your target sum.

Your figures

Example result — edit the figures to make it yours

23, 24, 25

The 3 integers

They sum to 72: the average term must be the middle of the run, which fixes the first term at 23. The headline figure is that first term.

First term23
Last term25
Check sum72

What this calculator does

Find the run of consecutive integers (or just even, or just odd) that adds to your target sum. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

First term = sum ÷ count − (count − 1) × step ÷ 2

Terms are counted from the first term a₁ (for Fibonacci, F₀ = 0 and F₁ = 1).

Closed-form formulas are used where they exist, so large indices stay fast and exact.

A geometric ratio of exactly 1 is handled as the constant-sequence special case.

Worked example

With the example inputs this page opens with (how many integers 3, their sum 72), the result is 23, 24, 25 — the 3 integers. They sum to 72: the average term must be the middle of the run, which fixes the first term at 23. The headline figure is that first term.

Quick reference

Quick reference — the worked example in full
FigureValue
The 3 integers23, 24, 25
First term23
Last term25
Check sum72

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does the Consecutive Integers Calculator work?

Find the run of consecutive integers (or just even, or just odd) that adds to your target sum. Count · Sum · Kind → The integers. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Consecutive Integers Calculator need?

Count · Sum · Kind → The integers. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Consecutive Integers Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.