Tools

Magic Square Generator

Generate magic squares of order 3 to 9 . Every row, column and both diagonals sum to the magic constant n(n²+1)/2 . Uses the Siamese method for odd orders, a diagonal swap for doubly-even, and the LUX method for singly-even.

Order
Magic constant
15
3(9+1)/2
Cells
9
values 1 – 9
Valid
yes
all lines match
Method
Siamese (De La Loubere) method
Squarerow sums on the right, column sums below, diagonal sums in the corners
8
1
6
15
3
5
7
15
4
9
2
15
15
15
15
↘ main diagonal15↗ anti diagonal15target15
Grid as text
8	1	6
3	5	7
4	9	2
Share

marduc812

© 202620260812_d5568b8