# Interview Questions

# Number of squares on a chess board

- June 11, 2012
- Posted by: Kamal Rawat
- Category: Puzzles

How many squares (of any size) are there on a chess board ?

Note that there are squares of size 1, 4, 9 etc. So we need to calculate total number of squares (of all possible sizes).

Also expand your solution to the total number of rectangles on the chess board.

**Solution:**

A chess board has small 64 squares, but there are other squares which can be formed using small squares,

Squares can be formed of 2*2 size (using 4 small squares)… other squares which can be formed using 9 small squares (3*3), 16 small squares (4*4) and so on..

The key point is to find the number of squares for each combinations. To find the squares, we can think of positions where a square starts (say, top-left position). If we consider squares of smallest size, there there will be 8 horizontal positions (top-left corner of each square in the horizontal row) and 8 vertical positions (top-left corner of each square in a vertical column).. hence the total number of positions of smallest (single) square is

8*8 = 64

Similarly, we can find the larger squares (of sizes 4, 9, 16, 25, 36, 49 & 64)

Hence the total number of squares will be:

Hence, the total number of squares on a chess board is = 204.

For, total number of rectangles, let me write a new post ( may be tomorrow or day after).

helpful

thnkyou so much..

thks .. no of rectangles ?? please

http://www.ritambhara.in/number-of-rectangles-on-a-chess-board/