---
slug: consecutive-integers-calculator
title: "Consecutive Integers Calculator"
category: math
updated: 2026-11-17
canonical: https://calcseed.com/c/math/consecutive-integers-calculator/
html: /c/math/consecutive-integers-calculator/
---

# Consecutive Integers Calculator

Find the sum of a run of consecutive integers. Free and instant.

## Quick answer

**Quick answer:** with the default inputs (1, 10), the sum is **55**. At these inputs: last integer = **10**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| First integer | 1 |  |
| Count | 10 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Sum | 55 |  |
| Last integer | 10 |  |

## Formula

```text
sum = count × (first + last) ÷ 2
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| First integer | number |  | 1 |
| Count | number |  | 10 |

## Outputs

| Result | Format |
| --- | --- |
| Sum | primary |
| Sum | number |
| Last integer | number |

## How it works

### What this calculator does

This calculator takes a starting integer and a count, then returns two numbers: the last integer in the run and the total of the whole run. At the defaults, a start of 1 with a count of 10 covers the integers 1 through 10 and adds up to 55. Because the arithmetic is a single closed formula, a run of ten integers and a run of a million integers cost exactly the same effort — no term-by-term adding is ever needed.

### The formula behind the sum

This is the standard arithmetic series sum. The **count** is the number of terms (n in textbooks), the **first** integer is the first term, and the **last** integer is the final term. You never type the last integer yourself — the calculator derives it as start + count − 1, because a run of 10 integers starting at 1 ends at 10, not 11. The division by 2 exists because the count × pair-sum product counts every term twice, once from each end of the run.

#### Why pairing works

Pair the first term with the last, the second with the second-to-last, and continue inward. In the run 1 through 10, the pairs are 1+10, 2+9, 3+8, 4+7 and 5+6, and every pair sums to 11. Five pairs at 11 each give 55. Each pair shares the same total because as one member rises by 1, the other falls by 1. Gauss famously used this trick as a schoolboy to add 1 through 100: 50 pairs of 101 give 5,050 without adding a hundred numbers one at a time.

### Worked example at the defaults

The calculator starts with a first integer of 1 and a count of 10. Here is the arithmetic it performs, step by step:

#### Step-by-step arithmetic

- Last integer: 1 + 10 − 1 = 10.
- Pair sum: first + last = 1 + 10 = 11.
- Multiply by the count: 10 × 11 = 110.
- Divide by 2: 110 ÷ 2 = 55.

You can confirm 55 by hand: 1+2+3+4+5 = 15, 6+7+8+9+10 = 40, and 15+40 = 55. The formula reached the same total in four short steps, and it would have reached it just as fast for a count of 10,000.

#### The average shortcut

The same formula reads another way: the sum equals the average of the run times its length. For 1 through 10 the midpoint value is (1 + 10) ÷ 2 = 5.5, and 5.5 × 10 = 55, matching the pairing result. This version is the fastest mental method for short runs — dates 12 through 25 average to 18.5 across 14 days, so the total is 18.5 × 14 = 259 without writing anything down.

### Sums of common runs

| Run | Count | Sum |
| --- | --- | --- |
| 1–10 | 10 | 55 |
| 1–20 | 20 | 210 |
| 1–100 | 100 | 5,050 |
| 1–500 | 500 | 125,250 |
| 1–1,000 | 1,000 | 500,500 |
| 50–99 | 50 | 3,725 |

Runs that start at 1 produce the triangular numbers, where the sum equals count × (count + 1) ÷ 2. The 10th triangular number is 55, the 100th is 5,050, and the 1,000th is 500,500. Runs that start elsewhere follow the same structure: the run 50–99 has 50 terms whose pair sum is 149, so 50 × 149 ÷ 2 = 3,725. Every row in the table is reproducible in the calculator with just two inputs.

### What moves the number

- The count is the dominant factor: doubling it roughly quadruples a run that starts at 1, because that sum grows with the square of the count (1–10 sums to 55 while 1–20 sums to 210).
- The start shifts the sum linearly: raising the start by 5 adds 5 × count to the total, so a start of 6 instead of 1 with a count of 10 adds 50, giving 105 instead of 55.
- A start near zero keeps the sum small even for long runs, because negative terms cancel positive ones term by term.
- Rounding is never an issue: the inputs are integers, so the output is always an exact integer with no decimals to manage.

### Negative starts and runs across zero

The formula handles negative values without modification. Set the start to −5 with a count of 13 and the run is −5 through 7. The last integer is −5 + 13 − 1 = 7, and the sum is 13 × (−5 + 7) ÷ 2 = 13 × 2 ÷ 2 = 13. The total is small because the terms −5 through 5 cancel to zero and only 6 + 7 = 13 survives. Any run symmetric around zero sums to exactly 0: from −3 to 3 the cancellation is complete.

Runs entirely below zero behave normally too. From −10 to −1, the count is 10, the pair sum is −11, and the sum is 10 × (−11) ÷ 2 = −55, the exact mirror of the run 1 through 10. The sign of the total always follows the sign of the midpoint of the run.

### Common mistakes

- Counting inclusively is the classic trap: 50 to 99 contains 99 − 50 + 1 = 50 integers, not 49. The + 1 matters whenever both endpoints are included.
- Confusing the count with the last value: a count of 10 starting at 1 ends at 10, but a count of 10 starting at 40 ends at 49.
- Off-by-one errors in page or seat ranges: pages 20 through 34 are 15 pages, because 34 − 20 + 1 = 15.
- Applying this formula to even or odd numbers only: those skip terms, so they form an arithmetic sequence with step 2 and belong in the arithmetic sequence calculator instead.

A quick sanity check catches most off-by-one mistakes: for a run starting at 1, the sum of the first n integers must equal n × (n + 1) ÷ 2. If your page count produces a total that fails this check, recount the endpoints before trusting the result.

### Where the sum shows up in practice

Three everyday situations reduce to this calculation. Adding the page numbers printed on a stack of scanned pages detects a missing sheet: a complete document of pages 1–120 sums to 7,260, and any missing page lowers the total by exactly its own page number. Seat-number sums verify ticket inventory in a blocked-off section the same way. Calendar arithmetic uses it too: the dates 12 through 25 of a month span 14 days and sum to 259, which matters when prorating — 14 days at $10 per day is $140, and the pair-sum structure lets you audit the proration in seconds.

For arbitrary lists of numbers rather than consecutive runs, the sum calculator adds anything you paste in, and the arithmetic sequence calculator covers runs with a fixed step other than 1.

## FAQ

### What is the sum of integers from 1 to 100?

5,050. Pair the terms into 50 pairs that each sum to 101, then compute 50 × 101 = 5,050. The calculator reproduces this with a start of 1 and a count of 100.

### What is the sum of the first 10 integers?

55. The run is 1 through 10, so the formula gives 10 × (1 + 10) ÷ 2 = 10 × 11 ÷ 2 = 55.

### How many integers are between two numbers, inclusive?

Subtract and add 1: count = last − first + 1. From 50 to 99 that is 99 − 50 + 1 = 50 integers; from 20 to 34 it is 15.

### Does the formula work for negative starting values?

Yes. From −5 to 7 the count is 13 and the sum is 13 × (−5 + 7) ÷ 2 = 13, because −5 through 5 cancel and only 6 + 7 remain.

### How do I find the last integer in the run?

Add the count and subtract 1: last = start + count − 1. A run of 10 starting at 40 ends at 49, not 50.

### Why does the formula divide by 2?

Multiplying the count by the pair sum counts every term twice, once from each end of the run. Dividing by 2 removes the double count, exactly as five pairs of 11 give 55 rather than 110.

### Can I use this for consecutive even or odd numbers?

Not directly, because even and odd numbers skip every other integer. They form an arithmetic sequence with step 2, so use an arithmetic sequence calculator; the pair-sum logic still works once the count and endpoints are correct.

### What if I only know the first and last integers?

Compute the count as last − first + 1, then apply the formula. For 1 through 100 the count is 100 and the sum is 100 × 101 ÷ 2 = 5,050.

### Is the sum always an integer?

Yes. If the count is odd, the first and last terms have the same parity, so their pair sum is even; if the count is even, the pairs are whole. Either way the division by 2 never leaves a remainder.

## Method and sources

Methodology: Results follow exact mathematical definitions; the arithmetic is deterministic and can be verified by hand from the steps shown.

Last updated: 2026-11-17.
- Arithmetic series: sum = n(a1 + an) / 2.
