Sum of numbers (1 to n)

Calculate 1+2+3+...+n using Gauss's formula. Or sum any range from a to b.

Fromto

Gauss's formula

Sum = n(n+1)/2

1+2+3+...+100 = 100×101/2 = 5050. Legend says 9-year-old Gauss discovered this in class.

General range

Sum from a to b = (b−a+1)(a+b)/2. Sum from 50 to 100 = 51×150/2 = 3825.

Popular sum problems
Related calculators