Magic square puzzle
Fill the grid so every row, column, and diagonal has the same sum.
Three squares are filled in.
Worked answer
- The numbers 1 to 9 add up to 45, and they fill 3 rows, so every row, column and diagonal adds up to 45 ÷ 3 = 15.
- The centre is the constant divided by 3: 15 ÷ 3 = 5.
- Row 2: 3 + 5 + ? = 15, so ? = 7 (row 2, column 3).
- Column 2: 1 + 5 + ? = 15, so ? = 9 (row 3, column 2).
- Column 3: ? + 7 + 2 = 15, so ? = 6 (row 1, column 3).
- Diagonal from top left: ? + 5 + 2 = 15, so ? = 8 (row 1, column 1).
- Diagonal from top right: 6 + 5 + ? = 15, so ? = 4 (row 3, column 1).
How to play
Place every number once so that each row, column and both diagonals add up to the same total. The sums around the grid change as you type, and a tick appears when a line is right.
- The middle square is the total divided by 3.
- Start with a line that has one empty square.
- Corners take even numbers, edges take odd numbers.

Print with answers
The board on page one, the answers on page two.
Magic square puzzle
A magic square is a grid where every row, column, and diagonal adds to the same total. Solve this three by three puzzle by placing each number from 1 to 9 once, using the line sums to guide you.
Why every line adds to 15
The numbers from 1 to 9 add up to 45. The three rows share that total equally, so each row must add to 45 divided by three, or 15. The columns and diagonals must reach the same sum.
For a four by four square using the numbers from 1 to 16, the constant is 34. The same idea applies: divide the sum of all the numbers by the number of rows.
Why the center must be 5
In a three by three square, the center is always the constant divided by three, which is 5. The even numbers sit in the corners, and the odd numbers sit on the edges. These rules narrow the choices before you fill the remaining cells.
Build a magic square from nothing
For odd-sized squares, use the step method. Start in the middle of the top row, then move up and right. Wrap around an edge when needed. If the next cell is already taken, move down one cell instead.
Every three by three magic square using 1 to 9 is a turn or mirror of one square. That gives eight arrangements in all.
Where magic squares come from
The best-known early three by three magic square is the Lo Shu, from an ancient Chinese legend. A four by four magic square appears in a well-known early sixteenth century engraving.
Questions
How many three by three magic squares are there?
There are eight arrangements. Each is a turn or mirror of the same basic square, so the eight versions share the same number pattern and line sum.
Can the magic constant be another number?
Yes. Add the same number to every cell, or use a different consecutive run of numbers, and the constant changes. Each row, column, and diagonal still has to reach the same sum.
Is there a four by four magic square?
Yes. A four by four square can use the numbers from 1 to 16. Each row, column, and diagonal adds to 34.
Can you solve a magic square without guessing?
Yes. Use the center rule and place the even numbers in the corners. The odd numbers belong on the edges. Then use the required line sums to narrow down the remaining placements.
More puzzles
Math crossword
Fill the grid so every row and column adds up.All levelsMath riddles
Short riddles with a checked answer.All levelsMatchstick puzzles
Move a match to fix the sum.All levelsMissing number
Find the rule, fill the gap.All levelsNumber pyramid
Each brick is the sum of the two below.All levelsPicture puzzles
Work out what each picture is worth.All levelsMake the target
Today’s puzzle: combine the tiles to hit the number.Daily
More ways to play
- Puzzles for kidsTry simple, checked puzzles that let kids practice counting, patterns, shapes, and number moves.
- Puzzles for adultsTry a varied set of puzzles that asks you to plan, calculate, and check each step.
- Target number solverEnter four to six numbers and a target to find routes using plus, minus, times, and divided by.
- 4 × 4 magic squareFill each cell so every row, column and diagonal adds to 34.
- Magic square solverEnter the numbers you know and see whether the solver can complete the square.
- Math mazeFollow the operations from start to target and find the one path that works.
- Magic trianglePlace the numbers so each side of the triangle has the same total.
- ArithmagonFind the hidden corner numbers from the sums shown on each edge.
- Tricky math questionsTest your quick answer, then check the steps that reveal where it went wrong.
- Math logic puzzlesUse the clues to crack a secret code and check your answer on the page.
- Printable crosswordsChoose your level and size, then print a fresh set of math crosswords to solve on paper.
- Daily puzzle archivePlay a make-the-target puzzle for any of the last thirty days at your level.