Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently came a across a question about calculating the number of squares in 8x8 chessboard. Being not that good in maths my answer was 64 but to my surprise it was 204.So how is it?And how to go about calculating number of squares in $n\times n$ chessboard??

share|cite|improve this question
They are considering "squares" that are 1x1, 2x2, ..., up to 8x8. With this in mind, maybe you could come up with a way to calculate how many are in an n x n chessboard. – The Chaz 2.0 Mar 6 '12 at 5:51
up vote 3 down vote accepted

The number of squares on an $n \times n$ chessboard is $$\dfrac{n(n+1)(2n + 1)}{6}$$

share|cite|improve this answer
I was kinda hoping that this answer would generate some discussion with the OP... or at least a "I see how you deduced that" ... – The Chaz 2.0 Mar 6 '12 at 6:21
well thnks @The Chaz. i got the answer from your hint.Taking 1 square at a time we have 8*8 squares in total,taking 2 squares at a time we have 7*7 squares in total,taking 3 squares at a time we have 6*6 squares in total and so on taking 8 squares at a time we have 1*1 finally what we get is 8^2+7^2+6^2+5^2+4^2+3^2+2^1+1^1 which is sum of squares from 1 to 8 and putting it in general we get your expression. – Jay Mar 6 '12 at 6:46
Exactly! Good work. – The Chaz 2.0 Mar 6 '12 at 13:47

There are indeed exactly $n^2$ instances of $1\times1$ squares. However, there are also $m\times m$ squares for all $1\le m\le n\;$ on the chessboard! Now any $m\times m\;$ square's position on the board is determined by the location of its upper leftmost square. So, working locally (i.e. for a given number $m$), how many squares are on the board with at least $m-1$ squares both to the right of it and below it?

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.