Squares on a Checkerboard

How many squares, of any size, are on a 3 x 3 checkerboard? 4 x 4? 8 x 8? n x n? Explain how you arrived at your answers.