About the Magic Square Generator
In a magic square every row, column and both diagonals add up to the same number — the magic constant n(n² + 1)/2. This generator builds one of any order from 3 to 20 using the three classic constructions: the Siamese method for odd sizes, the complement pattern for multiples of four, and the LUX/Strachey method that combines four odd squares for the remaining even sizes.
Each square is checked automatically. Turn on puzzle mode to hide some numbers and print a worksheet; the magic constant is the clue that lets students fill the gaps.
How to use the Magic Square Generator
- Choose the order (size).
- Turn on puzzle mode for a worksheet if you like.
- Download or copy the square.
Features
- Orders 3 to 20
- Three construction methods
- Automatic verification
- Puzzle worksheet mode
- SVG, PNG and text
Supported formats
- Plain text
Frequently asked questions
Why is there no 2×2 magic square?
With the numbers 1–4 it is impossible; every order from 3 up has solutions.
Are my numbers saved?
No. Calculations happen in your browser and nothing you enter is sent anywhere or stored.