Generate a magic square where every row, column, and diagonal adds to the same magic constant.
Last updated: June 2026 | By Patchworkr Team
A magic square is a square grid of numbers where each row, each column, and both diagonals have the same sum. That shared sum is called the magic constant.
A 3x3 magic square has magic constant 15.
Why are singly even orders unsupported?
The generator currently covers odd and doubly even orders only, because singly even squares need a separate construction.
Does the order have to be a whole number?
Yes. The order must be an integer of at least 3.
Can I use negative numbers?
Not with this generator. It builds standard consecutive-number magic squares.
What if I need a larger square?
You can enter a larger supported order, but the visual grid may require scrolling on smaller screens.
Related Tools
Explore Collatz sequences.
Infinity paradox.
Infinite hotel paradox.
Taylor series error bound.
Find magic numbers.
Möbius strip properties.