Skip to main content
Back to Numbers generators

Numbers

Magic Square Generator

Used by developers, writers, and creators worldwide.

A magic square generator builds a grid of numbers where every row, every column, and both main diagonals add up to the same total, called the magic constant. These elegant puzzles have fascinated mathematicians and artists for centuries and still appear in recreational maths, classroom activities, and design. Constructing one by hand is tricky, but odd-order squares follow a neat rule — the Siamese method — that places the numbers one by one. This tool uses that method to build a correct magic square of order 3, 5, 7, or 9 instantly, filling it with the numbers from one upward. Choose the order and copy the grid. It is ideal for teaching arithmetic and patterns, setting puzzles, exploring number properties, and creating decorative number art. Because the construction follows the rule exactly, every square it produces is genuinely magic.

Loading usage…

Free forever — no account required

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Choose an odd order from 3 to 9.
  2. Click Generate to build the square.
  3. Check the matching row and column sums.
  4. Copy the grid for your use.

Use Cases

  • Teaching arithmetic and patterns
  • Setting maths puzzles
  • Exploring number properties
  • Creating number art
  • Demonstrating the Siamese method

Tips

  • Even orders round up to the next odd.
  • Order 3 uses numbers 1 to 9.
  • Every direction shares one total.
  • Great for puzzles and teaching.

FAQ

what makes a square magic

In a magic square, every row, every column, and both main diagonals add up to the same number, the magic constant. For an order-3 square using 1 to 9, that constant is 15. Larger squares have larger constants.

why only odd orders

Odd-order squares can be built directly with the simple Siamese method, which places each number in turn. Even-order squares need different, more complex constructions, so this tool focuses on the reliable odd cases from 3 to 9.

are the numbers always 1 upward

Yes. The square is filled with the consecutive whole numbers from 1 up to the order squared — so an order-5 square uses 1 to 25. This is the classic, normal form of a magic square.