Summation Calculator Formula

Understand the math behind the summation calculator. Each variable explained with a worked example.

Formulas Used

Sum Integers

sum_integers = n * (n + 1) / 2

Sum Squares

sum_squares = n * (n + 1) * (2 * n + 1) / 6

Sum Cubes

sum_cubes = pow(n * (n + 1) / 2, 2)

Requested

requested = k == 0 ? n : (k == 1 ? n * (n + 1) / 2 : (k == 2 ? n * (n + 1) * (2 * n + 1) / 6 : pow(n * (n + 1) / 2, 2)))

Variables

VariableDescriptionDefault
nUpper Limit (n)10
kPower (k)2

How It Works

Summation Formulas

Sum of Integers

sum(i, 1, n) = n(n+1)/2

Sum of Squares

sum(i², 1, n) = n(n+1)(2n+1)/6

Sum of Cubes

sum(i³, 1, n) = [n(n+1)/2]²

Notice that the sum of cubes equals the square of the sum of integers.

Worked Example

Sum of i² from 1 to 10.

n = 10k = 2
  1. 01Sum of integers: 10×11/2 = 55
  2. 02Sum of squares: 10×11×21/6 = 2310/6 = 385
  3. 03Sum of cubes: (55)² = 3025

Ready to run the numbers?

Open Summation Calculator