Counting Every Square and Rectangle on an 8×8 Grid

Take a standard 8×88 \times 8 chessboard and count every square whose sides lie along the grid lines — not just the 64 unit cells, but squares of every size. How many are there? As a follow-up, count all the grid-aligned rectangles the board contains.

Answer

The worked solution is free with any TraderPrep account.