Double Sum Calculator

Evaluate Σᵢ Σⱼ f(i, j) over a rectangle or triangle, with row sums and a heat map.

  1. Enter valuesUse your own inputs or an example
  2. CalculateApply your selected settings
  3. View resultExplore the answer and explanation

Enter f(i, j) and the limits

Enter your values below to get started.

Examples:
f(i, j) =
Use i for the outer index and j for the inner index: i*j, i + j, 2^(i+j), 1/(i+j), i^2*j.
Region of summation
Reset restores the default values.

Tips for this calculator

In the triangle j ≤ i, j runs from the “j from” value up to i; the “j to” box is not used.

In the triangle j ≥ i, j runs from i up to the “j to” value.

f = 1 counts the pairs (i, j) in the region.

If f(i, j) = g(i)·h(j) on a rectangle, the answer equals (Σ g)(Σ h).

A double sum calculator evaluates a sum with 2 sigma signs, Σi Σj f(i, j), by adding f over every pair (i, j) in a region. Enter the term f(i, j), the limits of the outer index i and the inner index j, and pick a rectangle or a triangular region (j ≤ i or j ≥ i). The calculator returns the exact value, the inner sum for each row, a check with the order swapped, and a heat map of all the terms.

What is a Double Sum?

A double sum is a sum of the terms f(i, j) over 2 indices, written with 2 sigma signs: the outer sum over i and the inner sum over j. The double sum Σi=13 Σj=14 (i + j) adds 12 terms, one for each cell of a 3 × 4 grid, and equals 54.

∑i=ab∑j=cdf(i,j)=∑i=ab(∑j=cdf(i,j))\sum_{i=a}^{b}\sum_{j=c}^{d} f(i,j) = \sum_{i=a}^{b}\Big(\sum_{j=c}^{d} f(i,j)\Big)

Read a double sum from the inside out: for each fixed i, add f(i, j) over all j to get a row total, then add the row totals over i. A rectangle with m values of i and n values of j holds m × n terms.

InteractiveEvery term of a double sum is one cell of a grid

How Does the Double Sum Calculator Work?

The double sum calculator fixes each value of i, adds f(i, j) over the j range for that row, then adds the row totals. It repeats the sum in the other order (columns first) as a check, and adds rational terms as exact fractions.

InteractiveInner sum, then outer sum: add one row at a time
  1. Read the region

    Rectangle: j from c to d for every i. Triangle: j stops at i or starts at i.

  2. Inner sums

    For i = a, a + 1, …, b, add f(i, j) over j. These are the row totals.

  3. Outer sum

    Add the row totals to get the double sum.

  4. Check and draw

    Add the columns first for a check and colour every term in the heat map.

Double Sum Formulas

There are 3 main double sum formulas: the product rule for separable terms, the sum rule, and the count of terms in a region. The product rule turns m × n terms into 2 single sums.

Product Rule for Separable Terms

∑i=1m∑j=1ng(i) h(j)=(∑i=1mg(i))(∑j=1nh(j))\sum_{i=1}^{m}\sum_{j=1}^{n} g(i)\,h(j) = \Big(\sum_{i=1}^{m} g(i)\Big)\Big(\sum_{j=1}^{n} h(j)\Big)

Example: Σi=110 Σj=110 ij = 55 × 55 = 3,025.

Sum Rule

∑i=1m∑j=1n(i+j)=n∑i=1mi+m∑j=1nj=mn(m+n+2)2\sum_{i=1}^{m}\sum_{j=1}^{n} (i + j) = n\sum_{i=1}^{m} i + m\sum_{j=1}^{n} j = \frac{mn(m+n+2)}{2}

For m = 3, n = 4: 3 × 4 × 9 / 2 = 54.

Number of Terms

∑i=1n∑j=1n1=n2,∑i=1n∑j=1i1=n(n+1)2\sum_{i=1}^{n}\sum_{j=1}^{n} 1 = n^2, \qquad \sum_{i=1}^{n}\sum_{j=1}^{i} 1 = \frac{n(n+1)}{2}
InteractiveProduct rule: Σ Σ g(i)h(j) = (Σ g)(Σ h)

Types of Double Sums

There are 5 common types of double sums, named by their region: rectangular, lower triangular (j ≤ i), strictly triangular (j < i), upper triangular (j ≥ i) and diagonal (j = i). The region decides the limits of the inner sum and the number of terms.

InteractiveSwitch the region and count its terms

Rectangular

j runs over the same range for every i: n × n = n² terms.

Lower triangular

Σj=1i: n(n + 1)/2 terms, the pairs with j ≤ i.

Strictly triangular

Σj=1i−1: n(n − 1)/2 terms, all pairs with j < i.

Upper triangular

Σj=in: n(n + 1)/2 terms, the pairs with j ≥ i.

Diagonal

Only j = i: a double sum that collapses to the single sum Σ f(i, i).

How to Calculate a Double Sum by Hand

To calculate a double sum by hand, evaluate the inner sum for each value of the outer index, then add those results. Here is Σi=13 Σj=14 (i + j):

  1. i = 1: (1+1) + (1+2) + (1+3) + (1+4) = 14.
  2. i = 2: 3 + 4 + 5 + 6 = 18.
  3. i = 3: 4 + 5 + 6 + 7 = 22.
  4. Outer sum: 14 + 18 + 22 = 54.
InteractiveStep through 3 double sums by hand

    Changing the Order of a Double Sum

    To change the order of a double sum, describe the same region with j as the outer index and rewrite the inner limits; the value does not change. On a rectangle the limits stay the same. On a triangle they swap:

    ∑i=1n∑j=1if(i,j)=∑j=1n∑i=jnf(i,j)\sum_{i=1}^{n}\sum_{j=1}^{i} f(i,j) = \sum_{j=1}^{n}\sum_{i=j}^{n} f(i,j)

    For finite sums the swap is always allowed, since addition is commutative. Guido Fubini proved the matching result for double integrals in 1907; infinite double series need absolute convergence for the swap. Example: Σi=15 Σj=1i j = 35, and Σj=15 j(5 − j + 1) = 5 + 8 + 9 + 8 + 5 = 35.

    InteractiveAdd rows first or columns first: same region, same total

    Common Mistakes with Double Sums

    • Multiplying the 2 single sums when the term does not split: Σ Σ (i + j) is not (Σ i)(Σ j). For 3 × 4: 54, not 6 × 10 = 60.
    • Keeping the old limits after a swap: on a triangle, Σj=1i becomes Σi=jn, not Σi=1n.
    • Treating i as a constant in the outer sum: i is constant only inside the inner sum.
    • Miscounting a triangle: Σi=1n Σj=1i 1 = n(n + 1)/2, not n²/2.
    • Dropping the diagonal: j ≤ i includes j = i; j < i leaves it out, n fewer terms.
    InteractiveTrue or false: double sums
    1. Σ from i = 1 to 3, Σ from j = 1 to 3 of i·j equals 36.

    2. Σ Σ (i + j) over a 3 × 4 rectangle equals (Σ i)(Σ j) = 60.

    3. Swapping the order of a finite double sum can change its value.

    4. The lower triangle j ≤ i with n = 4 has 10 terms.

    5. On a triangle, Σ (i = 1 to n) Σ (j = 1 to i) becomes Σ (j = 1 to n) Σ (i = j to n).

    Score: 0 / 5

    How to Use the Double Sum Calculator

    Type f(i, j), pick the region, enter the limits of i and j and press Calculate. The result shows the exact value and the number of terms; the tabs hold the row-by-row steps, the heat map and a table of inner sums.

    InteractiveLoad a ready-made double sum

    Each button fills the calculator and runs it.

    1. Type f(i, j)

      Use i and j, for example i^2*j or 1/(i+j).

    2. Pick the region

      Rectangle, triangle j ≤ i, or triangle j ≥ i.

    3. Enter the limits

      Whole numbers for i from/to and j from/to (one j limit is set by i in a triangle).

    4. Read the heat map

      Each cell is a term; the right edge shows each row total.

    Real-Life Uses of Double Sums

    Double sums total any table of numbers that has rows and columns. There are 5 common uses:

    • Probability: the chance that 2 dice total 7 is Σi Σj [i + j = 7] / 36 = 6/36 ≈ 16.67%.
    • Sales reports: revenue over 12 months and 8 stores is a double sum over months and stores.
    • Images: the brightness of a W × H photo is Σx Σy p(x, y) over its pixels.
    • Matrices: the sum of all entries of a matrix A is Σi Σj aij; matrix multiplication uses Σk aikbkj.
    • Physics: the potential energy of n charges is a double sum over pairs i < j.
    InteractiveTwo dice: count the cells where i + j hits a target

    Double Sum Examples

    Common double sums and their exact values. Click a row to load it.

    Double Sum Examples
    Double sumTermsValueCalculator
    ∑i=13∑j=14(i+j)\sum_{i=1}^{3}\sum_{j=1}^{4} (i + j)1254
    ∑i=13∑j=13ij\sum_{i=1}^{3}\sum_{j=1}^{3} ij936
    ∑i=110∑j=110ij\sum_{i=1}^{10}\sum_{j=1}^{10} ij1003,025
    ∑i=14∑j=1i1\sum_{i=1}^{4}\sum_{j=1}^{i} 11010
    ∑i=14∑j=1ij\sum_{i=1}^{4}\sum_{j=1}^{i} j1020
    ∑i=12∑j=13(2i−j)\sum_{i=1}^{2}\sum_{j=1}^{3} (2i - j)66
    ∑i=13∑j=131i+j\sum_{i=1}^{3}\sum_{j=1}^{3} \frac{1}{i+j}9149/60
    ∑i=03∑j=032i+j\sum_{i=0}^{3}\sum_{j=0}^{3} 2^{i+j}16225

    Popular Double Sum Problems

    Try each one, then reveal the answer or solve it in the calculator.

    1. Evaluate the double sum over a 2 × 3 rectangle.

      \sum_{i=1}^{2}\sum_{j=1}^{3} (i + j)
      Show answer21
    2. Evaluate with the product rule.

      \sum_{i=1}^{3}\sum_{j=1}^{2} i^2 j
      Show answer14 \times 3 = 42
    3. Count the terms of the triangle.

      \sum_{i=1}^{5}\sum_{j=1}^{i} 1
      Show answer15
    4. Evaluate the antisymmetric double sum.

      \sum_{i=1}^{3}\sum_{j=1}^{3} (i - j)
      Show answer0
    5. Count the pairs with j ≥ i for n = 4.

      \sum_{i=1}^{4}\sum_{j=i}^{4} 1
      Show answer10
    6. Evaluate the triangular double sum.

      \sum_{i=1}^{3}\sum_{j=1}^{i} ij
      Show answer25

    Explore More Sum Calculators

    Discover 67 free sum calculators across different categories. Find the right calculator for your needs.

    Browse All 67 Calculators
    Questions and answers

    Frequently Asked Questions

    What is a double sum?

    A double sum is a sum over 2 indices, Σ<sub>i</sub> Σ<sub>j</sub> f(i, j), that adds f once for every pair (i, j) in a region. Σ<sub>i=1</sub><sup>3</sup> Σ<sub>j=1</sub><sup>4</sup> (i + j) = 54.

    How do you evaluate a double sum?

    Evaluate the inner sum over j for each fixed i, then add those row totals over i. For a separable term g(i)h(j) on a rectangle, multiply the 2 single sums instead.

    Can you switch the order of a double sum?

    Yes, a finite double sum can always be added in either order. On a triangle the limits change: Σ<sub>i=1</sub><sup>n</sup> Σ<sub>j=1</sub><sup>i</sup> becomes Σ<sub>j=1</sub><sup>n</sup> Σ<sub>i=j</sub><sup>n</sup>.

    Is a double sum the product of two sums?

    No, only when the term splits as g(i)·h(j) and the region is a rectangle. Σ Σ ij over 3 × 3 is 6 × 6 = 36, but Σ Σ (i + j) over 3 × 4 is 54, not 60.

    How many terms does a double sum have?

    A rectangular double sum with m values of i and n values of j has m × n terms. The triangle j ≤ i with i from 1 to n has n(n + 1)/2 terms.

    What is the difference between a double sum and a nested sum?

    A double sum has exactly 2 sigma signs. A nested sum can have 3 or more levels, such as Σ<sub>i</sub> Σ<sub>j</sub> Σ<sub>k</sub>, where each inner limit can depend on the outer indices.

    What does the heat map show?

    The heat map draws one cell per term f(i, j), with rows for i and columns for j. Darker cells hold larger values, and the number at the end of each row is the inner sum for that i.

    Can the limits of a double sum be negative?

    Yes, any whole numbers work. Σ<sub>i=−1</sub><sup>1</sup> Σ<sub>j=−1</sub><sup>1</sup> ij = 0, since (−1 + 0 + 1)² = 0.

    Conclusion

    A double sum adds f(i, j) over a grid or a triangle of index pairs, and the double sum calculator does it row by row, checks it column by column and draws every term. Split separable terms into 2 single sums, use the sum rule for i + j, and swap the order with rewritten limits when the inner sum is easier the other way.

    Not sure how to attack your double sum? Answer the questions below.

    InteractiveHow should you evaluate this double sum?