Sum of First n Integers

Add all integers from 1 to n using the formula n(n+1)2\frac{n(n+1)}{2} instead of manually summing—much faster for large numbers.

k=1nk=n(n+1)2\sum_{k=1}^{n} k = \frac{n(n+1)}{2}

Solve a problem with Sum of First n Integers

Type the problem. The solver will use Sum of First n Integers where Sum of First n Integers is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Sum of First n Integers takes
nn
kk
Sum of First n Integers
SymbolMeaning
nnThe positive integer that marks the end of your sequence; if nn is zero or negative, the formula does not apply.
kkA counting variable that represents each individual integer in the sequence from 1 to nn; in the formula itself you don't substitute k directly, but it reminds you that you are summing all integer values from k=1k=1 to k=nk=n.

When to use it

Reach for this formula whenever you need to find the sum of consecutive integers starting from 1.

Level

Usually taught in: Algebra II

Worked examples

1. Sum of integers 1 through 5

Problem

Find 1+2+3+4+51 + 2 + 3 + 4 + 5.
  1. n=5n = 5

    We identify that this is the sum of consecutive integers from 1 to 5, so n=5n = 5.

  2. n(n+1)2=5(5+1)2\frac{n(n+1)}{2} = \frac{5(5+1)}{2}

    Substitute n=5n = 5 into the formula.

  3. 562=302=15\frac{5 \cdot 6}{2} = \frac{30}{2} = 15

    Calculate 5×6=305 \times 6 = 30, then divide by 2 to get 15.

Answer: 1515

We recognise this as a sum of consecutive integers starting from 1, so we apply the formula directly with n=5n = 5. We can verify: adding manually gives 1+2+3+4+5=151 + 2 + 3 + 4 + 5 = 15, confirming our answer.

2. Sum of integers 1 through 50

Problem

Find the sum 1+2+3++501 + 2 + 3 + \cdots + 50 without adding each number individually.
  1. n=50n = 50

    We have consecutive integers from 1 to 50, so n=50n = 50.

  2. n(n+1)2=50(50+1)2\frac{n(n+1)}{2} = \frac{50(50+1)}{2}

    Substitute n=50n = 50 into the formula.

  3. 50512=25502=1275\frac{50 \cdot 51}{2} = \frac{2550}{2} = 1275

    Calculate 50×51=255050 \times 51 = 2550, then divide by 2. Since one of nn or n+1n+1 is always even, the division is always exact.

Answer: 12751275

For larger values of nn, the formula becomes essential—manually adding 50 numbers would be tedious and error-prone. The formula handles it in one step, and the key insight is that one of nn or n+1n+1 is always even, so the product n(n+1)n(n+1) is always divisible by 2.

3. Coffee shop daily sales over 30 days

Problem

A coffee shop tracks daily sales. On day 1 they earned $1, day 2 they earned $2, day 3 they earned $3, and so on. If this pattern continues for 30 days, what is the total revenue over the month?
  1. Total=1+2+3++30\text{Total} = 1 + 2 + 3 + \cdots + 30

    The coffee shop's earnings follow the pattern of consecutive integers from 1 to 30.

  2. n=30n = 30

    Identify the endpoint of our sequence.

  3. 30(30+1)2=30312\frac{30(30+1)}{2} = \frac{30 \cdot 31}{2}

    Apply the formula with n=30n = 30.

  4. 9302=465\frac{930}{2} = 465

    Calculate 30×31=93030 \times 31 = 930, then divide by 2.

Answer: $465\$465

The coffee shop's sales follow the pattern of consecutive integers, making this formula perfect for the problem. Computing the sum this way avoids having to add 30 separate daily figures, and in any scenario that generates consecutive integer patterns, this formula provides an instant answer.

Common mistakes

Where Sum of First n Integers usually goes wrong
Answer came out wrong
Writing k=1nk=n(n+1)\sum_{k=1}^{n} k = n(n+1) and forgetting to divide by 2.
Always include the division: the correct formula is n(n+1)2\frac{n(n+1)}{2}, never n(n+1)n(n+1).
Using the formula for a sequence that does not start at 1, such as 2+3+4++102 + 3 + 4 + \cdots + 10, and writing 10112\frac{10 \cdot 11}{2}.
For a sequence from aa to nn, compute n(n+1)2(a1)a2\frac{n(n+1)}{2} - \frac{(a-1)a}{2}, or use the Arithmetic Series formula instead.
Trying to use the formula when nn is zero, negative, or non-integer.
Always verify that nn is a positive whole number before applying the formula.
The mistakeWhy it is wrongThe fix
Writing k=1nk=n(n+1)\sum_{k=1}^{n} k = n(n+1) and forgetting to divide by 2.The division by 2 is essential: when you pair terms like (1+n)(1 + n) and (2+(n1))(2 + (n-1)), each pair sums to n+1n+1, and there are n/2n/2 pairs, giving n(n+1)2\frac{n(n+1)}{2}.Always include the division: the correct formula is n(n+1)2\frac{n(n+1)}{2}, never n(n+1)n(n+1).
Using the formula for a sequence that does not start at 1, such as 2+3+4++102 + 3 + 4 + \cdots + 10, and writing 10112\frac{10 \cdot 11}{2}.This formula is specific to sequences starting at 1; applying it directly to a sequence starting at 2 gives the sum from 1 to 10 instead, including the 1 that was not part of the original problem.For a sequence from aa to nn, compute n(n+1)2(a1)a2\frac{n(n+1)}{2} - \frac{(a-1)a}{2}, or use the Arithmetic Series formula instead.
Trying to use the formula when nn is zero, negative, or non-integer.The formula is derived for positive integers; the reasoning behind it (pairing terms and counting pairs) breaks down outside this domain.Always verify that nn is a positive whole number before applying the formula.

Tips and when to use something else

  • This formula is a special case of the Arithmetic Series formula S=n(a1+an)2S = \frac{n(a_1 + a_n)}{2}, where a1=1a_1 = 1 and an=na_n = n; understanding the general formula helps you work with any arithmetic sequence.
  • For very large nn, compute n2(n+1)\frac{n}{2} \cdot (n+1) instead of n(n+1)2\frac{n(n+1)}{2} to avoid overflow in calculators—divide first, then multiply.
  • If the integers start at a number other than 1, use Arithmetic Series instead of trying to adapt this formula; it will save you from arithmetic mistakes.
  • Check your answer with a rough estimate: the sum is approximately n22\frac{n^2}{2}, so for n=100n = 100 you expect around 5000, and 1001012=5050\frac{100 \cdot 101}{2} = 5050 matches perfectly.

Frequently asked questions

Can I use this formula if the integers don't start at 1?
No, this formula is specific to integers starting at 1. If your integers start at a different number (like 5 to 20), you need the Arithmetic Series formula, or you can subtract the unwanted part: n(n+1)2(a1)a2\frac{n(n+1)}{2} - \frac{(a-1)a}{2} where aa is your starting point.
Why is there a division by 2 in the formula?
When you pair the smallest and largest terms (1+n1 + n), the second-smallest and second-largest (2+(n1)2 + (n-1)), and so on, each pair totals n+1n+1. There are n/2n/2 such pairs, so the sum is n(n+1)2\frac{n(n+1)}{2}. This pairing trick is often attributed to the mathematician Gauss, who discovered it as a student.
What if n is very large, like n = 1,000,000?
The formula works perfectly for any positive integer, no matter how large. It is actually the only practical way to find the sum since adding a million numbers would be impossible by hand. Just be careful with arithmetic: 100000010000012=500000500000\frac{1000000 \cdot 1000001}{2} = 500000500000.
Is this the same as an arithmetic series?
It is a special case of the arithmetic series formula. An arithmetic series can have any starting point and any common difference, but this formula specifically handles the case where you start at 1 and increment by 1 each time. If you learn the general Arithmetic Series formula, you can derive this one as a special case by setting a1=1a_1 = 1 and d=1d = 1.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18