I really did not measure the cubes.
I used the sticks out of the box for the first cube then I just laid a stick across the opening of the cube and separated it at that length.I knew that if the stick would fit in the cube so would the next cube. Magnets you can put the magnets anywhere you desire as the whole structure is metal. So you make it appear any way you want. The effect I was going for was that the cubes were floating.