Magic Squares

Your magic number  

Toggle colors for

Magic Squares

A magic square is a grid of numbers in which the sums of the numbers in each row, each column, and both main diagonals are the same. A famous magic square is on display in the Sagrada Família church in Barcelona. In that square the magic number is 33, but some of the numbers are duplicated.

This page shows a magic square of order 4 for all values from 0 to 1000. If the magic number is 34, all integers from 1 to 16 are used.

For values of 34 or higher, the 4 by 4 grid contains 16 different positive numbers which add up to the same number in each row, column and diagonal. This magical number appears also in several other symmetric patterns. Press ‘start’ to see this.

For magic numbers below 34 the magic square will include 0 and/or negative numbers.

You can download the square as a PNG file and use it in a “happy birthday” email.

Scroll to Top