Magic Squares
A classic number puzzle where rows, columns, and diagonals all add up to the same magic sum.
A quick idea
A magic square is a grid of numbers.
It is “magic” because:
- Every row adds up to the same total
- Every column adds up to the same total
- Both diagonals add up to the same total
- No number is repeated
That shared total is called the magic sum.
A tiny bit of history
The most famous 3×3 magic square is called the Lo Shu (pronounced “low shoo”).
A very old story from China says a turtle rose from a river with a pattern on its shell. People noticed something surprising: the numbers could be arranged so the sums matched in many directions.
Whether the turtle story is true or not, magic squares are real—and people have studied them for thousands of years.
How does it work?
Step 1: Find the magic sum
If you are using 9 different numbers, add them all up. Then divide by 3.
That works because a 3×3 grid has 3 rows, and each row must add to the same total.
Example with numbers 1–9:
- Total: (1+2+3+4+5+6+7+8+9 = 45)
- Magic sum: (45 ÷ 3 = 15)
Step 2: Check rows, columns, diagonals
When a square is finished, you can test it like a scientist:
- Add each row
- Add each column
- Add the two diagonals
If every total matches the magic sum, you did it.
Examples
Below you can explore two example magic squares in a nicer visual style (hover a cell to see the row and column sums).
Try it yourself
- Start with the interactive demo at the top of this page (hover to see sums)
- Then try the practice problems below
- Or open the sandbox to build your own puzzles and share them
Design custom puzzles with any set of 9 numbers, choose which cells to prefill as clues, and share your puzzles with friends via a link!
Open Sandbox