The magic constant or magic sum of a magic square is the sum of numbers in any row, column, or diagonal of the magic square. For example, the magic square shown below has a magic constant of 15. In general M = n(n^2 +1)/2.
The term magic constant or magic sum is similarly applied to other "magic" figures such as magic stars and magic cubes.