Puzzle · counting

How many squares are on a chessboard?

Most people say 64. Those are only the smallest ones. A block of 2 by 2 cells is a square too, and so is 3 by 3, all the way up to the whole board. Count them yourself below.

Board
Square size to count

SizeHow manyRunning total

How many squares are on a chessboard? · Brain vs Math

The answer for an 8 by 8 chessboard: 204

A square of 2 by 2 cells can start in 7 columns and 7 rows, so there are 7 × 7 = 49 of them. A 3 by 3 square fits 6 × 6 = 36 ways, a 4 by 4 square 25 ways, and so on until the single 8 by 8 square that is the whole board.

64 + 49 + 36 + 25 + 16 + 9 + 4 + 1 = 204.

In general a square of size k fits (n − k + 1) times across and (n − k + 1) times down an n by n board, so the total is 1² + 2² + … + n², which is n(n + 1)(2n + 1) ÷ 6. For n = 8 that is 8 × 9 × 17 ÷ 6 = 204. A 10 by 10 board holds 385.

A harder one: how many rectangles?

Every rectangle on the board is fixed by two of the 9 vertical grid lines and two of the 9 horizontal ones. There are 36 ways to choose two lines from nine, so the board holds 36 × 36 = 1,296 rectangles, and the 204 squares are among them.

Watch it in under a minute

Video still: a chessboard with a 2 by 2 square highlighted

The video plays from YouTube when you press play, and not before.

Subscribe to Brain vs Math on YouTube

More visual proofs, one idea at a time.

Frequently asked questions

Why isn't the answer 64?

64 counts only the single cells. Any block of cells that is as wide as it is tall is also a square, so the 2 by 2, 3 by 3 and larger blocks add 140 more.

How many squares are on a 10 by 10 grid?

10 × 11 × 21 ÷ 6 = 385. Pick the 10 by 10 board above to step through it.

Do rectangles that are not squares count?

Not in this puzzle. Counting every rectangle gives 1,296 on a chessboard.

Use this puzzle in a class

Paste this code into a class page or a learning platform to show the counting board there. It is free to use for teaching, with the link back kept.

More puzzles