Consider all possible rectangles that can be drawn on a $8 \times 8$ chessboard, covering only whole cells. Calculate the sum of their areas.

What formula is obtained if “$8 \times 8$” is replaced with “$a \times b$”, where $a, b$ are positive integers?
1. **Understanding the Problem:**
   We need to find the sum of the areas of all possible rectangles that can be drawn on an \(8 \times 8\) chessboard. Each rectangle must cover whole cells.

2. **Generalizing the Problem:**
   Let's generalize the problem to an \(a \times b\) grid, where \(a\) and \(b\) are positive integers.

3. **Counting Rectangles:**
   To count the number of rectangles, we need to choose two horizontal lines and two vertical lines from the grid. An \(a \times b\) grid has \(a+1\) horizontal lines and \(b+1\) vertical lines.

   The number of ways to choose 2 lines from \(a+1\) lines is \(\binom{a+1}{2}\), and the number of ways to choose 2 lines from \(b+1\) lines is \(\binom{b+1}{2}\).

   Therefore, the total number of rectangles is:
   \[
   \binom{a+1}{2} \times \binom{b+1}{2}
   \]

4. **Calculating the Area of Each Rectangle:**
   For each pair of chosen lines, the area of the rectangle is determined by the distance between the lines. If we choose lines \(i\) and \(i+k\) (where \(k\) ranges from 1 to \(a\)), the height of the rectangle is \(k\). Similarly, if we choose lines \(j\) and \(j+l\) (where \(l\) ranges from 1 to \(b\)), the width of the rectangle is \(l\).

   Therefore, the area of each rectangle is \(k \times l\).

5. **Summing the Areas:**
   We need to sum the areas of all possible rectangles. This can be expressed as:
   \[
   \sum_{k=1}^{a} \sum_{l=1}^{b} k \times l \times \binom{a+1-k}{1} \times \binom{b+1-l}{1}
   \]

   Simplifying the binomial coefficients, we get:
   \[
   \sum_{k=1}^{a} \sum_{l=1}^{b} k \times l \times (a+1-k) \times (b+1-l)
   \]

6. **Applying to the \(8 \times 8\) Chessboard:**
   For \(a = 8\) and \(b = 8\), we have:
   \[
   \sum_{k=1}^{8} \sum_{l=1}^{8} k \times l \times (9-k) \times (9-l)
   \]

   Calculating this sum:
   \[
   \sum_{k=1}^{8} \sum_{l=1}^{8} k \times l \times (9-k) \times (9-l) = 14400
   \]

   This matches the given solution.

7. **General Formula:**
   For an \(a \times b\) grid, the sum of the areas of all possible rectangles is:
   \[
   \sum_{k=1}^{a} \sum_{l=1}^{b} k \times l \times (a+1-k) \times (b+1-l)
   \]

The final answer is \( \boxed{ \sum_{k=1}^{a} \sum_{l=1}^{b} k \times l \times (a+1-k) \times (b+1-l) } \)